WhatsApp single confirmation from multiple messages

Hi all,

I’m creating a whatsapp integration that listens for messages, uploads media from those messages to Box.com and then sends a confirmation back to the whatsapp user.

What I’m running into is that when a user submits multiple images at a time they will receive individual confirmations for each image since WhatsApp triggers one scenario run for each image received. I don’t think I can change how Whatsapp receives the images, but could anyone point me in the direction of how I could aggregate a response, so only one response message is given if multiple images are received?

I have tried ending the scenario with a write to a data store and setting the “send thank you” variable to 5 seconds in the future. That way as multiple writes happen the last image will just set the time to 5 seconds in the future and another scenario will trigger when that date/time hits and one response will be sent. The Problem with this scenario is that Data Store cannot run immediately, it needs to be run on a schedule.

Any other thoughts on how I could achieve this?

Thanks!

Hi there,

There may be a way to accomplish this through the “Array aggregator” module, and then configure the module by specifying all the images you wish to aggregate and sending a single response message with the aggregated data.

Hope this helps! :slight_smile:

2 Likes