Templates / Qualify and score omnichannel leads with OpenAI, Gmail, and Google Sheets

Qualify and score omnichannel leads with OpenAI, Gmail, and Google Sheets

Ready for 3.0

by ahmad · 48 views · created 2026-09-13 · Lead Generation, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 22 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Gmail and Google Sheets.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. Set Gmail Lead Data (Edit Fields (Set)): sets 11 fields: source, sender_name, sender_email…
  2. Set Webhook Lead Data (Code): runs custom JavaScript code
  3. Set Lead Configuration (Edit Fields (Set)): sets 17 fields: pf_business_name, pf_business_description, pf_services_offered…
  4. If: checks a condition and branches into true / false
  5. Read Existing Leads from Sheets (Google Sheets): uses Google Sheets
  6. Check for Duplicate Leads (Code): runs custom JavaScript code
  7. If: checks a condition and branches into true / false
  8. Restore Lead Data (Code): runs custom JavaScript code
  9. Analyze Lead with AI (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI GPT-5.6 Analyzer; output parser: Parse AI Analysis Output
  10. Calculate Lead Score (Code): runs custom JavaScript code

…plus 6 more steps. See the full node list below.

Services it uses

OpenAI Chat ModelGmailGoogle Sheets

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (11)

From the author

Quick overview This workflow captures inbound leads from Gmail or a webhook, uses OpenAI to extract qualification signals, scores and classifies each lead, logs it to Google Sheets, and creates a personalized Gmail draft for HOT leads to review before…

Excerpt from ahmad's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.