AI & Bots Guide
Multiple ways to connect WhatsApp with AI: N8N Bot, webhooks, and OpenAI / Dify / Flowise integrations. The easiest path is N8N Bot + n8n workflow.
Method 1 — N8N Bot + n8n (recommended)
Flow: WhatsApp → Omdaa → sends text to n8n webhook → n8n runs AI → n8n returns reply → Omdaa sends it as a WhatsApp message.
Steps
- Enable N8N: In .env (backend):
N8N_ENABLED=true - Create a Bot in Omdaa dashboard: From Integrations / N8N Bot — create a new bot for the session: name, n8n webhook URL (e.g.
https://n8n.example.com/webhook/alaabeh), trigger type: “All” or “Keyword”. Save and enable. - Create a workflow in n8n: Webhook (POST) → AI node (e.g. OpenAI Chat or HTTP Request to Dify/Flowise) → Respond to Webhook. In Respond to Webhook, return body as JSON with the reply in one of:
output,answer,text,message. Example:{"output": "Reply from AI"}. - Activate the workflow in n8n. Incoming messages (per trigger) will be sent to the bot then n8n, and the reply will be sent automatically as a WhatsApp message.
Notes: The bot URL must match the n8n webhook URL. Keyword = reply only when the message contains the keyword. You can add Basic Auth to the webhook and set it in the bot settings.
Method 2 — User webhook only (no N8N Bot)
Omdaa sends the message.received event to your webhook URL and does not wait for a response. You must send the reply from n8n (or your system) by calling Omdaa API.
- Set the webhook URL in Omdaa (user or session) to your n8n webhook URL.
- In n8n: Webhook receives POST → extract
sessionId,from, message text → AI node → HTTP Request to Omdaa:POST /api/v1/messages/send-textwithAuthorization: Bearer <JWT>orX-API-Keyand body:{"sessionId":"...","to":"...@s.whatsapp.net","message":"reply text"}. - You need an API key (or JWT) for the user who owns the session so n8n can call the send API on their behalf.
Method 3 — OpenAI / Dify / Flowise from Omdaa
The project includes ready integrations: OpenAI (Chat Completion or Assistant), Dify, Flowise. If the dashboard has a “Connect chatbot” (OpenAI/Dify/Flowise) screen, you can enable auto-reply from there without n8n.
Quick start summary
- In .env:
N8N_ENABLED=true - In Omdaa: Create N8N Bot for the session; webhook URL = your n8n webhook URL.
- In n8n: Workflow = Webhook (POST) → AI node (e.g. OpenAI Chat) → Respond to Webhook with body e.g.
{"output": "Reply text"}. - Activate the workflow and test by sending a WhatsApp message to the number linked to the session.
The message will reach n8n, AI will generate the reply, and Omdaa will send it automatically as a WhatsApp message.
Related links
← All guides · Docs · العربية