I already had a local RAG system for searching Obsidian, Drive, and Nextcloud. I wrote about building it in an earlier article. I used it through an assistant whenever I needed some information. I wanted to try the same search for handling Nice Events enquiries.
I built an n8n workflow that reads the customer's message, retrieves service information, and drafts a reply. It also records the lead in Twenty CRM and sends me a Telegram notification.
From a Gmail message to a reply draft
Labelling a message as a lead in the Nice Events Gmail account starts the workflow:
- the message is cleaned into a machine-readable format
- DeepSeek classifies whether it is a sales lead
- local RAG retrieves the relevant Nice Events information
- DeepSeek drafts a reply using that information and the customer's message
- the contact and opportunity are checked in Twenty CRM
- a draft appears in Gmail and I get a Telegram notification

The workflow in the n8n editor. Classification, local retrieval, the CRM update, and the Gmail draft are separate stages.
Classification and drafting are separate steps. Drafting starts after the message has been identified as a lead and retrieval has returned sources. In n8n, I can check whether a failure happened during classification, retrieval, drafting, or the CRM update. That is why I chose a visual workflow over a free-running agent for this job.
Searching Nice Events documents
My local store contains thousands of text chunks from different projects, including client notes and artist records. I made a separate search API for this workflow. Its sources are the 2026 service price list, sales packages, service model, and approved artist information. Biletti material, other clients' records, diaries, and old proposal folders are excluded. The full CRM history and mailbox are also outside the source set.
Vector search finds similar meanings, while keyword search catches names and exact terms. A local model reranks the results. The final selection contains at most three sources and 4,000 characters. If reranking fails or retrieval finds no suitable approved sources, the API returns an error.
The store, embeddings, retrieval, and reranking run inside my network. n8n accesses them through a token-protected, read-only HTTP API. The firewall accepts connections from the TrueNAS machine running n8n.
DeepSeek receives the customer's message and the selected Nice Events excerpts to write the draft. The whole Obsidian vault stays on my network, but these selected details go to the cloud model.
Reviewing the reply
The writing instructions ask for a warm reply in the customer's language, without mentioning internal sources or RAG. Prices, availability, and equipment must be supported by the retrieved information. The draft asks for a missing date, venue, guest count, or other details needed for a quote.
The model can still invent information despite these instructions. I check the sources and message in Telegram, read the Gmail draft, and edit it before sending. A wrong reply can damage a customer's trust. Sending, confirming an artist's availability, accepting an offer, setting the final price, and agreeing discounts remain my responsibility.
A company event enquiry exposed a retrieval bug
Before publishing, I tested a query asking for DJ services and sound reinforcement for a 150-person company event. The API returned 503, even though ChromaDB, the embedding service, and the reranker all passed their health checks.
The problem was in candidate retrieval. The generic customer message contained too few Nice Events-specific terms, so approved sales documents did not reach the first 60 candidates. Sources from other projects were filtered out, leaving no material for the reply.
I wrote a regression test and added Nice Events search terms, including the service price list and sales packages, to candidate retrieval. The local model still evaluates the results against the customer's original question.
All 161 tests passed. After the fix, the same query returned three approved sources: the price list, the Nice Events service model, and the sales packages. The context contained 3,086 characters. A realistic enquiry exposed the failure that the health checks had missed.
Following up in Twenty CRM
The workflow checks whether the person or company already exists in Twenty CRM. When needed, it creates or updates the opportunity and marks the draft as waiting for review. I can later see what has happened to the lead.
The Telegram notification tells me a new draft is ready. Reading the enquiry, finding the information, and recording the lead happen in the background, so I can start by reviewing the reply.
