How to make my workflow aggregate multiple consecutive messages before sending to AI?

My workflow works fine when it receives one message at a time, but I’m having issues when multiple messages arrive quickly (e.g., within a few seconds).
For example:
“Hi”
“How are you?”
”I want to charge my car”
Right now, my setup sends each of those messages separately to the AI agent, but I’d like to make it combine them into one message (if they’re sent within, say, 30 seconds) — so the AI can generate a single, better response.
I tried saving the messages in a Google Sheet and using a timer, but that didn’t work as expected.
Goal:
If multiple messages are sent consecutively (within 30s), aggregate them into one combined message and send one API call to the AI agent instead of multiple.
Has anyone implemented something like this? Or any suggestions for how to handle message grouping / buffering in Make (or whichever platform)?

1 Like

Hi @Batoul_Shrara

Why? How did you implement it? It should work unless you’re expecting something different.

Here’s how I’d do it:
Add incoming messages to a queue → wait 30 seconds → get the queued messages and delete them → aggregate the messages → send to AI Agent

1 Like

No it didn’t work, My workflow is:
incoming messages → add them to data table or google sheet (any one would work) → wait 30 sec → aggregate → agent → send message → delete the messages in data table
but when executing the workflow I’ve got 2 messages one for each input (the input messages were two). so same error

oh okay!!

If you’d like, sharing a sample or screenshots of your workflow would make it easier to help at this point, since it’s not clear what outcome you’re expecting or what the exact error is..


These in red are the aggregation logic with agent and messages, the nodes in the middle are another logic not related to aggregation.

Thanks @Batoul_Shrara

Please try moving the Delete row(s) node to before the Aggregate node,
I think this way, each new trigger will insert the rows during the wait time, then retrieve and delete them before aggregation and passing them to the agent.

Also, make sure you’re using the same column for both getting and deleting rows (for example, the sender ID).

2 Likes

It worked thank you so much!!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.