First to contextualizate you: I build a Chatbot using a Whatsapp number hosted in Zenvia Server (Webhook and HTTPS request) and IA Agent of Make.
The Chatbot runs 100% correctly, it follow the prompt and chat with leads like planned.
When the lead finish the chat, the AI sends a pre-writed message. I’d setup a “send an email” module and used a filter to recognize the pre-writed message to send an email to my pre-sales team with the content of the chat. The problem appears here.
If I just use “response” item from the “run an agent” module, the e-mail will be sent only with the last interation of chatbot, not with the whole chat content.
I need to find a way to send an email to my pre-sales teams with the whole chat content.
Searching in web, I find a way to do this using Make Data Store, but, I don’t know how to configure it to storage the whole content of the chat.
Someone can help me with this challenge?
Here a screenshot of my scenario without the data store:
What if you store and create an empty array (before run the agent) and then add the responses to that? After the HTTP module, you then add the response to that array. In the next section, you iterate over the array, use a text aggregator to combine the data, and send the email.
Based on the Zenvia API, I don’t see any method (endpoint) to get the full conversation.
Therefore you will have to log/store each message and response as they reach your webhook, then fetch all the messages from the same conversation ID sorted by time, and aggregate them into a Text string using a Text Aggregator module.