Turning informal dialog into structured data

Dear community. I’ve been working on an sales Agent which recieves data from clients by Telegram. The ultimate goal is to structure and send a purchase order through a Gmail Tool. This workflow provides company’s products and prices to clients and they provide quantities they want to include into their orders. Our Agent calculates and presents the final order into the chat very well and it asks clients for their Fiscal ID and email to prepare the final email. Until this step my workflow works very good, the Agent presents a final order for users to confirm, but the issue emerges when it’s time to collect order’s data from the chat to structure and include it on my final Gmail Tool. How could I please proceed? I’ll be greatful.

can you add your workflow please? an image will suffice
if i understand correctly, you are using an AI agent in your workflow?
if so, you can force structured data as output of an AI agent, by using structured output added to the AI agent, do you think that will help?

if you think so, please look here:

1 Like

Hello Eddy. Thank you for responding. Here is an image of my workflow.
Do you think that If I add a new Structured Output Parser node between our Agent and the final Telegram Send Message Node could work? Thank you in advance

Hi Rafael,

you can definitely try using a Structured output Parser, likewise you can also add a splitout node so that you can put in order what infromation you need and where you want to send it

1 Like

yes, you need to change the ai agent node options to add the structured parser, look here for live example

1 Like

Hello TjM. Thank you for helping me. I was even trying to parse data from the chat using a Code Node, but it didn’t work. I am a begginner and I was even trying to connect this new Structured Output Parser to my Agent but it didn’t connect. I believe that a solution is to change my Agent’s strcuture as Eddy_Sralber has recommended.

Hello Eddy. Thank you very much for tracking this case. I believe that the video you just recommended has touched on the vital issue. I need to restructure my workflow in order to parse the chat between users and this Agent. I was trying to extract purchase variables from the chat, such as (client_name, client_FiscalID, product_name, product_price, etc), using an Edit Fields (Set) Node after my final Telegram Node and I could pull some of them but I will apply your recommendation. Thank you my friend.

1 Like

your welcome, good luck