TodoPlagas · AI Assistant Suite
WhatsApp + phone calls, 24/7. Automated lead capture and customer support for a pest-control company, orchestrated on n8n.
I designed and built an AI assistant suite that automates the entire lead-capture cycle: it handles WhatsApp and phone calls 24/7, extracts lead data with AI, persists it in PostgreSQL and automatically pushes it into the industry CRM (iGEO), leaving the conversation ready for a technician to pick up. A second agent handles real-time voice calls reusing the same infrastructure.
Architecture
Channels
n8n · Orchestration
Data & Outputs
Components
Sofía — WhatsApp assistant
main workflow · ~93 nodes
- Conversational agent (LangChain + OpenAI GPT-4.1-mini) with memory persisted in PostgreSQL.
- Voice-note transcription with Whisper and a pest knowledge base fed from Google Drive (lightweight RAG).
- Message debounce, response chunking and human handoff via Chatwoot (a label pauses the AI).
Dante — Voice call assistant
real-time voice
- Answers inbound calls with VAPI wired to n8n via webhook.
- Personalized greeting depending on whether the caller is already in the DB (reply in <20 s) and live tools (pest KB, customer data).
- Post-processing with GPT-4o-mini: extracts the lead from the transcript as structured JSON.
iGEO integration (industry CRM)
async · RabbitMQ
- Valid leads are transformed into iGEO's proprietary payload and sent over a RabbitMQ queue, decoupling the bot from the CRM.
- A result listener and a timeout watcher close the async loop; anti-duplicate flag in the DB.
Support workflows
6+ in production
- FAQ / state machine shared by both bots, lead insertion, email lead capture.
- New-lead notifications and centralized error alerts via Telegram at every critical point of the pipeline.
Tech stack
Technical challenges solved
- Real conversational memory and state on WhatsApp: telling new conversations from continuations, grouping fragmented messages and chunking long replies.
- Two channels, one business logic: WhatsApp and voice share the knowledge base, FAQ engine and CRM output.
- Decoupled integration with an external CRM via queues, with a result listener and timeout watcher.
- Transparent human handoff: the system detects when to step aside and hands over without friction.
- Observability: centralized Telegram alerts at every failure point.
- GDPR compliance: consent is captured and gates the push to the CRM.
Real project built for a client. The code lives in n8n and is not public (NDA); this page summarizes the architecture and behavior without exposing real data or configuration.