Reply to grouped WhatsApp messages with Wafly and OpenAI
Needs changesWhat this workflow does
This AI workflow has 11 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects OpenAI Chat Model and Wafly (community).
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- 1. Group split messages (Wafly): set message buffer (instance)
- Text or voice, one field (Code): runs custom JavaScript code
- 2. Transcribe voice notes (optional) (Wafly): set transcription (instance)
- A customer said something? (If): checks a condition and branches into true / false
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; memory: Memory per phone number
- Reply on WhatsApp (Wafly): send text (message)
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (9)
- Manual Trigger
n8n-nodes-base.manualTrigger - Wafly
n8n-nodes-wafly.wafly - Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - No Operation, do nothing
n8n-nodes-base.noOp
From the author
Quick overview This workflow receives WhatsApp webhooks from Wafly, groups rapid-fire messages into a single question (and optionally transcribes voice notes), then uses an OpenAI-powered agent with per-contact memory to generate a short reply and sends it…