📌 Context & Background
This project was designed as a production-ready demonstration model for a B2B consulting agency receiving approximately 50–100 inbound lead inquiries monthly across chat and web channels. Prior to automation, sales managers manually qualified incoming leads using basic chat tools, entered contact details into CRM spreadsheets, and manually compiled weekly sales summaries for executive leadership. This manual workflow resulted in delayed lead outreach, inconsistent BANT qualification, and a lack of systematic dialogue analysis for continuous process improvement. (Educational / Demo Project based on realistic business parameters).
📌 Tech Stack: n8n OpenAI API (LLM) Google Gemini API Zoho CRM API PostgreSQL Google Sheets Telegram Bot API
📌 Problem Statement
- High Manual Overhead: Sales managers spent excessive time manually vetting cold or non-target leads instead of focusing on high-value closing calls.
- Lack of Oversight & Analytics: No structured mechanism existed to analyze lead conversation quality, detect bot error flags, or systematically extract customer pain points.
- Human Error & Reporting Delays: Inconsistent BANT evaluation during manual intake led to misqualified leads and slow delivery of daily performance digests to management.
📌 Solution:
A 3-part automated ecosystem designed to handle intake, conversation analysis, and executive reporting:
- WF1 (AI Lead Qualification Chatbot): Built an automated assistant using OpenAI API and Postgres Chat Memory that qualifies leads using the BANT framework (Need → Budget → Authority → Timeline) and automatically creates enriched lead profiles in Zoho CRM with calculated AI Scores and context summaries.
- WF2 (AI Dialogue Analyst): Designed a background workflow using Google Gemini API to evaluate every chat session, identifying error flags, customer pain points, and conversation sentiment, logging structured data into Google Sheets mapped to CRM IDs.
- WF3 (Executive Telegram Digest): Implemented a scheduled workflow that aggregates CRM data and analysis logs to synthesize executive performance summaries sent directly to a Telegram channel.
📌 Process (Project Lifecycle)
- Discovery & Architecture Planning: Mapped the B2B sales funnel, defined BANT qualification criteria, and structured the 3-part workflow ecosystem architecture.
- Database & Memory Setup: Configured PostgreSQL chat memory storage with session IDs to maintain dialogue context across multi-turn interactions.
- Prompt Engineering & Logic Building: Developed system prompts to enforce strict output language rules, eliminate character artifacts, and prioritize pain point extraction before budget inquiries.
- Integration & Data Mapping: Interconnected n8n with Zoho CRM APIs, mapped root record IDs (
{{ $json.id }}) to Google Sheets to ensure 1-to-1 data consistency, and linked Telegram Bot API.
- Testing & Edge-Case Validation: Conducted iterative simulation tests across diverse lead scenarios (hostile input, ambiguous budgets, non-standard language) to verify BANT scoring accuracy and duplicate-free CRM logging.
- Deployment & Monitoring: Deployed the 3-part ecosystem in a staging environment with scheduled triggers for daily executive Telegram digests and background dialogue quality checks.
📌 Results & Validation