Collect structured attributes from chat

I’ve found Conversational data collection, Conversational data collection - #3 by ihortom and Organise Agent response in Json format, but can’t really make the transfer to my own usecase.