WhatsApp AI customer support and 24-hour window workflow
This n8n workflow captures incoming WhatsApp Business API messages and checks whether the 24-hour Meta service window is still open. Conversation history sits in PostgreSQL memory so the AI assistant replies with full thread context. When the window has closed, it sends an approved template to reopen contact on your own server.
- Catalogue ID
- #1521
- Functional nodes
- 11
- Connections
- 10
- Trigger
- whatsAppTrigger
- AI layer
- AI-assisted
Business problem solved
Support teams lose minutes searching past WhatsApp threads, and free-form replies silently fail once the 24-hour Meta window expires. Without shared conversation memory across shifts, customers receive inconsistent answers to the same enquiry.
Trigger
The WhatsApp trigger starts the workflow immediately whenever a new customer message reaches your business number.
Connected systems
- WhatsApp Business API
- PostgreSQL
- OpenAI
- HTTP API tool
- Self-hosted n8n
Every workflow is deployed on your own server with documentation, a run log and an error queue.
Workflow steps
- 01
Message intake and 24-hour window check
The WhatsApp trigger reads the sender number and timestamp, then checks whether the active Meta 24-hour window allows a free-form reply.
- 02
PostgreSQL conversation memory
Prior messages for that contact are loaded from your PostgreSQL store so each reply reflects earlier context.
- 03
AI response and live HTTP lookup
The language model node calls permitted HTTP endpoints for order or account lookups and drafts a clear reply.
- 04
Direct reply or approved template dispatch
Inside the open window, the reply goes straight out; outside the window, a pre-approved Meta template reopens the thread.
Error queue and human approval
Built-in state in the catalogue workflow
The verified catalogue workflow contains zero node-level error flags. The 24-hour window split is handled through workflow branching.
Production layer added by ALTAI
During live deployment, ALTAI adds a retry and error queue for rejected Meta templates, human handover for uncertain or sensitive intents and a full run log.
WhatsApp AI customer support workflow Frequently asked questions
Instead of sending a free-form message that Meta would reject, the workflow detects the closed window and sends an approved template to reopen the conversation.
Conversation memory runs inside your own PostgreSQL database. Retention windows and access permissions are set during deployment to align with GDPR.
Our production safeguard stops the workflow from guessing. The enquiry and its conversation summary are routed directly to a human specialist.
Yes. The HTTP tool node is wired to your internal API endpoints with read-only permissions for the exact fields approved during discovery.
Related n8n workflows
WhatsApp webhook verification workflow
Answers the Meta verification handshake, drops delivery and read-receipt noise and passes only genuine user messages downstream.
Slack human escalation support workflow
Answers routine chat enquiries with buffered memory, collects a visitor email on uncertain cases and hands the thread off to Slack.
Voice message support workflow
Separates voice and text messages, transcribes audio recordings, generates replies with Gemini and splits long answers into safe message chunks.

We write the proposal after we have found the problem together
In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.
30 minutes · no preparation needed
The call and the week of discovery are both free.Read the terms