The context

This project was born to handle four different digital offers from the same WhatsApp number. Each product needs a different conversation, tone, landing page, and security rules. A generalist bot could mix up information, repeat questions, or send a person to the wrong page.

The challenge

The system had to recognize which product a contact was interested in, remember what had been discussed, answer real questions without turning every turn into a rigid script, and keep a clear path for a person to take over. It also had to distinguish contacts coming from ads versus referrals, and handle external failures without leaving the customer in silence.

The solution

I built a central workflow in n8n connected to the WhatsApp Cloud API. A router identifies the product from the customer's selection or the message's origin data and activates the corresponding context. The four journeys work as separate assistants: Sofía, Lucía, Valentina, and Sara — each with its own information, boundaries, conversation style, and landing page.

How the journey works

  1. WhatsApp receives the message and validates it's a real conversation, not a technical event.
  2. The system logs the contact and detects whether it came from an ad, a referral, or an unknown source.
  3. The router selects the product and isolates memory by phone number and context to prevent cross-talk between agents.
  4. The specialized agent responds in short messages and shares only its authorized landing page.
  5. Chatwoot keeps a supervision inbox where an operator can observe or take over the conversation.
  6. If a person intervenes or a critical failure occurs, the automation pauses and preserves context.

The four agents

Key features

Tech stack

n8n · WhatsApp Cloud API · Google Gemini · Chatwoot · Docker · Webhooks · JavaScript

Current status

Routing, memory, the four commercial journeys, source attribution, and human hand-off have passed functional testing. The system is still under active development, with conversation follow-up and closing logic being refined. For privacy, no panel access is published and no real customer conversations are shown.