Webhook Data Tables Combine Multiple Chat Messages Into One

    What this workflow does

    The workflow contains these steps: Run Once to Create Buffer Table → Receive Chat Message → Retry Every 30 Minutes → Buffer Settings → Setup Run? → Create Buffer Table → Check Request → Request Valid? → Reject Invalid Message → Find Buffer Table → Buffer Table Found? → Caller Waiting? → Report Missing Table → From Webhook? → Add to Buffer → Message Stored? → Report Store Failure → Accept Message → Wait for Quiet Period → Load Sender Waiting Messages → Decide Who Sends → Load Overdue Messages → Group Overdue by Sender → Loop Over Batches → Claim Batch → Load Claimed Messages → Build Combined Message → Anything Claimed? → Send to Bot Workflow → Clear Delivered Messages → Check Bot Result → Bot Failed? → Count Failed Attempt → Release or Park Batch → Find Parked or Stuck Batches → Fail Run for Parked or Stuck Batches → When Batch Is Ready (Example Bot) → Example Bot Reply.

    What you need

    • An n8n instance to import and run the workflow.
    • StickyNote access for the StickyNote steps listed in this workflow.
    • ManualTrigger access for the ManualTrigger steps listed in this workflow.
    • Webhook access for the Webhook steps listed in this workflow.
    • Schedule access for the Schedule steps listed in this workflow.
    • Set access for the Set steps listed in this workflow.
    • IF access for the IF steps listed in this workflow.
    • DataTable access for the DataTable steps listed in this workflow.
    • Code access for the Code steps listed in this workflow.
    • RespondToWebhook access for the RespondToWebhook steps listed in this workflow.
    • Wait access for the Wait steps listed in this workflow.
    • Batch access for the Batch steps listed in this workflow.
    • ExecuteWorkflow access for the ExecuteWorkflow steps listed in this workflow.
    • StopAndError access for the StopAndError steps listed in this workflow.
    • ExecuteWorkflowTrigger access for the ExecuteWorkflowTrigger steps listed in this workflow.

    Workflow nodes

    1. Run Once to Create Buffer Table (n8n-nodes-base.manualTrigger)
    2. Receive Chat Message (n8n-nodes-base.webhook)
    3. Retry Every 30 Minutes (n8n-nodes-base.scheduleTrigger)
    4. Buffer Settings (n8n-nodes-base.set)
    5. Setup Run? (n8n-nodes-base.if)
    6. Create Buffer Table (n8n-nodes-base.dataTable)
    7. Check Request (n8n-nodes-base.code)
    8. Request Valid? (n8n-nodes-base.if)
    9. Reject Invalid Message (n8n-nodes-base.respondToWebhook)
    10. Find Buffer Table (n8n-nodes-base.dataTable)
    11. Buffer Table Found? (n8n-nodes-base.if)
    12. Caller Waiting? (n8n-nodes-base.if)
    13. Report Missing Table (n8n-nodes-base.respondToWebhook)
    14. From Webhook? (n8n-nodes-base.if)
    15. Add to Buffer (n8n-nodes-base.dataTable)
    16. Message Stored? (n8n-nodes-base.if)
    17. Report Store Failure (n8n-nodes-base.respondToWebhook)
    18. Accept Message (n8n-nodes-base.respondToWebhook)
    19. Wait for Quiet Period (n8n-nodes-base.wait)
    20. Load Sender Waiting Messages (n8n-nodes-base.dataTable)
    21. Decide Who Sends (n8n-nodes-base.code)
    22. Load Overdue Messages (n8n-nodes-base.dataTable)
    23. Group Overdue by Sender (n8n-nodes-base.code)
    24. Loop Over Batches (n8n-nodes-base.splitInBatches)
    25. Claim Batch (n8n-nodes-base.dataTable)
    26. Load Claimed Messages (n8n-nodes-base.dataTable)
    27. Build Combined Message (n8n-nodes-base.code)
    28. Anything Claimed? (n8n-nodes-base.if)
    29. Send to Bot Workflow (n8n-nodes-base.executeWorkflow)
    30. Clear Delivered Messages (n8n-nodes-base.dataTable)
    31. Check Bot Result (n8n-nodes-base.code)
    32. Bot Failed? (n8n-nodes-base.if)
    33. Count Failed Attempt (n8n-nodes-base.code)
    34. Release or Park Batch (n8n-nodes-base.dataTable)
    35. Find Parked or Stuck Batches (n8n-nodes-base.code)
    36. Fail Run for Parked or Stuck Batches (n8n-nodes-base.stopAndError)
    37. When Batch Is Ready (Example Bot) (n8n-nodes-base.executeWorkflowTrigger)
    38. Example Bot Reply (n8n-nodes-base.set)
    StickyNoteManualTriggerWebhookScheduleSetIFDataTableCodeRespondToWebhookWaitBatchExecuteWorkflowStopAndErrorExecuteWorkflowTrigger
    45 nodesOther
    View on GitHub

    Need this workflow customized or debugged? Book a 30-min scope call →

    Want this set up for you? Book a 30-min scope call

    I build and fix n8n workflows for agencies and SaaS teams. 30-minute scope call — bring the problem, leave with an estimate.

    Related workflows