Templates / Automate WhatsApp lead capture and replies with Whapi, Ollama and Sheets

Automate WhatsApp lead capture and replies with Whapi, Ollama and Sheets

Ready for 3.0

by Ali HAIDER ✓ · 945 views · created 2026-04-14 · Lead Nurturing, AI Chatbot

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 11 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Sheets and Ollama Chat Model. It also calls gate.whapi.cloud over HTTP.

How it runs

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

  1. Extract Message Data (Code): runs custom JavaScript code
  2. Is Text From Customer? (If): checks a condition and branches into true / false
  3. Read Conversation History (Google Sheets): uses Google Sheets
  4. Build AI Prompt (Code): runs custom JavaScript code
  5. Generate AI Reply (Basic LLM Chain): sends a prompt to an LLM, with model: Ollama Model
  6. Log User Message (Google Sheets): append
  7. Log AI Reply (Google Sheets): append
  8. Upsert Lead in CRM (Google Sheets): append or update
  9. Send Reply via Whapi (HTTP Request): calls gate.whapi.cloud (POST)

Services it uses

Google SheetsOllama Chat Model

HTTP calls to: gate.whapi.cloud

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

Receive WhatsApp messages via Whapi, generate AI replies with a local Ollama model, log conversations in Google Sheets, and auto-capture leads — all without touching a cloud LLM. This n8n template builds a fully automated WhatsApp AI CRM using Whapi.cloud for…

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