Templates / Qualify, log, and route inbound WhatsApp leads with OpenAI and Google Sheets

Qualify, log, and route inbound WhatsApp leads with OpenAI and Google Sheets

Ready for 3.0

by achiya ✓ · 124 views · created 2026-07-08 · 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 13 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model and Google Sheets.

How it runs

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

  1. Extract Message (Edit Fields (Set)): sets 3 fields: message, phone, name
  2. Classify Lead (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Segment Schema
  3. Flatten Result (Edit Fields (Set)): sets 9 fields: Phone, Name, Message…
  4. Log Lead to Google Sheet (Google Sheets): append or update (sheet)
  5. Is Buyer? (If): checks a condition and branches into true / false
  6. Reply to Buyer (WAHA) (HTTP Request): calls an HTTP API (POST)
  7. Is Spam? (If): checks a condition and branches into true / false
  8. Notify Owner of Hot Lead (WAHA) (HTTP Request): calls an HTTP API (POST)
  9. Respond (Respond to Webhook): sends the response back to the webhook caller
  10. Polite Reply (Non-Buyer) (HTTP Request): calls an HTTP API (POST)

Services it uses

OpenAI Chat ModelGoogle 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 (9)

From the author

Quick overview This workflow receives inbound WhatsApp lead messages via a webhook, uses OpenAI to classify each sender's intent (buyer, job seeker, or spam), logs the enriched lead to Google Sheets — and then acts on the classification: buyers get an instant…

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