Answer study-visa enquiries on WhatsApp and capture leads with an n8n agent

An n8n builder ran an after-hours WhatsApp agent for a study-visa consultancy for a one-week trial on real messages; it answered from the firm's own material and saved leads itself.

Done withn8ninWhatsAppn8nPostgresqlGemini· Oct 24, 2026

What they did

The poster built an after-hours WhatsApp assistant for a real study-visa consultancy, using only the firm's public information: services, document lists, intakes and offices. Incoming messages hit an n8n webhook, pass a filter and go to an AI Agent node running Gemini 3.5 Flash Lite, with Postgres chat memory keyed by chat ID. The agent answers only from that material, hands fees, band scores and visa odds to a counsellor, asks for name, service, country and a good time to call one question at a time, and calls a save_lead Data Table tool itself. It replies in English, Hindi or Punjabi to match the student. WAHA in Docker relayed messages for the demo, and the stack ran on EC2 behind Caddy.

How it went

It ran on real WhatsApp traffic for a week as a free trial, but the consultancy is not using it for students yet. Getting a Meta business account set up and receiving messages in n8n took about 60% of the poster's time. Other problems: sender IDs arriving as @lid broke the allowlist, setting the webhook in two places doubled every message, and a retired Gemini model plus 503 errors left the bot silent until retries and a fallback reply were added. Bursts of messages were handled by waiting about eight seconds and answering them together.

Worth knowing

Without an explicit rule to confirm only after save_lead succeeds, the model told students their details were saved when they were not. A per-chat rate limit of roughly ten messages a minute protects the token budget. WAHA is a stopgap; the poster says production should use the official WhatsApp Cloud API.

Try it

With n8n· 8 parts to fill in

Build an n8n workflow that answers WhatsApp enquiries for [my business] after hours. Use an AI Agent node with [my model], chat memory keyed by chat ID, and answer only from [my services, documents and FAQ text]. Never quote [fees, prices or outcomes]; hand those to [a human contact] instead. Collect [name, service, country, best time to call] one question at a time, save them with a lead tool, and tell the person their details are saved only after that tool succeeds. Combine messages that arrive within [seconds] of each other, rate limit each chat, and send a fallback reply if the model fails. Test on [my own number] and stop for my review before going live.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related