Automate WhatsApp lead capture and replies with Whapi, Ollama and Sheets
Ready for 3.0What 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.
- Extract Message Data (Code): runs custom JavaScript code
- Is Text From Customer? (If): checks a condition and branches into true / false
- Read Conversation History (Google Sheets): uses Google Sheets
- Build AI Prompt (Code): runs custom JavaScript code
- Generate AI Reply (Basic LLM Chain): sends a prompt to an LLM, with model: Ollama Model
- Log User Message (Google Sheets): append
- Log AI Reply (Google Sheets): append
- Upsert Lead in CRM (Google Sheets): append or update
- Send Reply via Whapi (HTTP Request): calls gate.whapi.cloud (POST)
Services it uses
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)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Ollama Chat Model
@n8n/n8n-nodes-langchain.lmChatOllama - HTTP Request
n8n-nodes-base.httpRequest
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…