A comprehensive AI system for lead qualification, conversation quality control, and sales analytics built with n8n, Zoho CRM, PostgreSQL, Google Sheets, and LLMs.
Project details
Context:
- Business/industry: B2B and B2C companies that receive inquiries through a website and work with a CRM.
- Current process: Managers manually communicate with leads, qualify them, create CRM records, analyze conversations, and prepare reports for management.
Problem:
- Initial lead qualification takes too much time.
- Managers qualify customers differently.
- There is no automatic control of dialogue quality.
- There is no unified system connecting CRM, conversation history, and AI analytics.
- Management does not receive regular analytics on the sales team’s performance.
Solution
<aside>
🧠
A comprehensive AI platform was developed with three interconnected workflows that automate the full lead lifecycle — from the first customer message to the CEO’s weekly report.
Tools used: n8n, Zoho CRM, PostgreSQL, Google Sheets, LLM.
</aside>
Solution logic:
Workflow 1 — AI Lead Qualification
- The user starts a conversation with an AI chatbot through a website widget (Chat Trigger).
- The AI Agent qualifies the lead using the BANT methodology, asking one question at a time.
- After collecting enough information, the agent:
- calculates an AI Score,
- creates an AI Context,
- calls the Zoho CRM tool.
- A new lead is automatically created in Zoho CRM.
- The full conversation history is stored in PostgreSQL Chat Memory and linked to the lead via Session ID (Skype_ID).
Workflow 2 — AI Conversation Analysis
- On a schedule, the system retrieves all leads from Zoho CRM.
- Only leads created by the chatbot are selected.
- Using the Session ID, the Chat Memory Manager finds the corresponding conversation in PostgreSQL.
- The AI Agent analyzes each conversation individually.
- For each dialogue, it identifies:
- AI agent mistakes,
- the client’s main problem,
- successful communication patterns.
- The results are automatically written to Google Sheets.
Workflow 3 — AI Sales Monitoring
- Every week, the system retrieves all leads from Zoho CRM.
- A JavaScript Code node calculates the key sales funnel metrics.
- The conversation analysis results are additionally loaded from Google Sheets.
- The AI Agent combines quantitative and qualitative data.
- A structured management report is generated with:
- funnel issues,
- bottlenecks,
- manager workload,
- improvement recommendations.
- A Telegram bot automatically sends the finished report to the CEO.