Templates / Score inbound B2B leads with OpenAI, Gmail, and Google Sheets

Score inbound B2B leads with OpenAI, Gmail, and Google Sheets

Ready for 3.0

by Zongwei Yang · 1 views · created 2026-11-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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 10 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Gmail and Google Sheets. It also calls api.openai.com over HTTP.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Config (Edit Fields (Set)): sets 4 fields: ideal_customer, score_threshold, model…
  2. Clean and validate (Code): runs custom JavaScript code
  3. Valid lead? (If): checks a condition and branches into true / false
  4. Score lead (HTTP Request): calls api.openai.com (POST)
  5. Log rejected (Google Sheets): append
  6. Parse score (Code): runs custom JavaScript code
  7. Good fit? (If): checks a condition and branches into true / false
  8. Create Gmail draft (Gmail): work with draft
  9. Log to Sheets (Google Sheets): append

Services it uses

GmailGoogle Sheets

HTTP calls to: api.openai.com

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 (7)

From the author

Quick overview This workflow receives inbound web form leads via webhook, validates and scores them using the OpenAI Chat Completions API, creates a Gmail draft reply for high-fit leads, and logs both accepted and rejected submissions to Google Sheets. How it…

Excerpt from Zongwei Yang'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.