How to storage whole whatsapp chat content in a Make Data Store

Hello everyone.

I’m need some help with my Whatsapp Chatbot!

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:

Hi there Alexander,

What output does the Make AI Agent give you?

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.

Hello @dimi.

This is the outputs that the Make AI Agent give me!

I’

I’m learning about automation yet. I try to put an array agregator, but, don’t understand very well how it works.

Take a look on the screenshot of last funcional version:

It works, but I wasn’t able to send the whole message to the e-mail yet.

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.

You can use a data store, or other storage integrations on Make.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

1 Like