Qualify leads from Gemini chat to Google Sheets and Slack with self-optimization
Needs changesWhat this workflow does
This AI workflow has 18 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Google Gemini Chat Model, Google Sheets and Slack.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- Qualify Lead Conversationally (AI Agent): runs an AI agent, with model: Chat Logic Brain; memory: Chat Session Memory
- Fetch Historical Lead Data (Google Sheets): uses Google Sheets
- Extract Lead State (Code): runs custom JavaScript code
- Send Response to Chat Interface (Respond to Webhook): sends the response back to the webhook caller
- Audit Lead Performance (AI Agent): runs an AI agent, with model: Audit Analyst Brain
- Check if Lead is Qualified (Filter): keeps only the items that match a condition
- Send Optimization Report (Slack): uses Slack
- Scoring Logic (Code): runs custom JavaScript code
- AI Council: Strategist (Basic LLM Chain): sends a prompt to an LLM, with model: Chat Logic Brain
- Is High ROI? (If): checks a condition and branches into true / false
…plus 3 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Qualify Lead Conversationally (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Qualify Lead Conversationally (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (12)
- Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Code
n8n-nodes-base.code - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Slack
n8n-nodes-base.slack - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Filter
n8n-nodes-base.filter - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Who is this for? This workflow is designed for growth agencies, SaaS founders, and sales teams who want to move beyond static lead forms. It is ideal for those who need a "living" system that not only captures leads but also provides immediate value through…