Hi everyone, I’m struggling to build a relatively complex workflow and could use some guidance.
The goal is to launch a support agent named Fernanda, who handles customer interactions via WhatsApp and a Chatwoot widget. This agent connects to a PostgreSQL database (used for memory and client data) and triggers other workflows that handle:
Financial queries via CNPJ
Generating second copies of invoices (with discounts, limited to one per NPJ)
Processing payment receipts via OCR
Responding to user messages using a data extractor + LLM
The workflow needs to detect the input format (text, PDF, or audio), apply filters, and process accordingly—reading PDFs or transcribing audio before generating a response.
If the user requests human support (e.g., “I want to talk to an agent”), the flow should escalate the conversation to a human via Chatwoot.
All relevant data is stored in PostgreSQL. Has anyone built something similar or could point me in the right direction?
I’m working on a similar project and facing a few issues, as I’m still a beginner with N8N.
If you can, reach out to me on Instagram — it’s the same username as here.
Let me share my thoughts on Chatwoot:
WhatsApp Version:
I’ve been following some tutorials in Portuguese:
In both of these tutorials, the instructor teaches how to create macros so the bot doesn’t conflict with a human agent, basically making the bot pause for a while.
This template from Thiago might help you too:
Regarding the Chatwoot widget:
I’ve been running into a lot of issues, especially because I need to run several checks (like CNPJ validation, checking if the client already exists, etc.) to personalize the response.
My biggest issue right now is with the pre-form, as it’s not consistently capturing the name, phone number, and email.
George’s template flow has helped me a lot:
I believe we can join forces to solve this problem together.