Hello community,
I am currently building an AI Sales Chatbot for Facebook Messenger using the AI Agent node.
my workflow triggers immediately on every incoming Webhook message. If a user sends multiple short messages in a row (e.g., "Hello", "I want to buy", "a drone"), the workflow runs 3 times separately. This wastes AI tokens and results in the bot replying 3 separate times, which creates a bad user experience.
I want the following sequence of events:
- When a message arrives, it is stored/appended temporarily.
- The workflow initiates a short delay (e.g., 5-10 seconds).
- If a new message arrives from the same sender_id during this delay, the timer resets, and the new message is appended to the previous ones.
- Only after the silence period (no new messages) does the workflow send the full concatenated text block to the AI Agent for processing.
My Question: What is the simplest way to achieve this workflow?
Thank you for your advice!