Skip to main content

Auto-respond and classify WhatsApp leads with Ollama AI and log to Google Sheets

Workflow preview

Workflow preview
100%
Auto-respond and classify WhatsApp leads with Ollama AI and log to Google Sheets preview
Open on n8n.io

1. Workflow Overview

Who is this for This workflow is built for sales teams, agencies, and small businesses that receive inbound leads via WhatsApp and want to automate their first response, lead qualification, and CRM...

Best for

  • Lead Generation automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.switch, n8n-nodes-base.googlesheets, n8n-nodes-base.googlecalendar, n8n-nodes-base.whatsapp, n8n-nodes-base.whatsapptrigger, @n8n/n8n-nodes-langchain.memorybufferwindow

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Tony Adijah.

Original n8n.io source

1.1 Workflow description

Title
Auto-respond and classify WhatsApp leads with Ollama AI and log to Google Sheets
Workflow name
Auto-respond and classify WhatsApp leads with Ollama AI and log to Google Sheets

Who is this for

This workflow is built for sales teams, agencies, and small businesses that receive inbound leads via WhatsApp and want to automate their first response, lead qualification, and CRM logging — without missing a single message.

What this workflow does

It listens for incoming WhatsApp messages, uses an AI agent to classify each message by intent (hot lead, warm lead, support, or needs qualification), sends a tailored auto-reply, logs every interaction to Google Sheets, and automatically books Google Calendar meetings with Meet links for qualified leads.

How it works

  • WhatsApp Trigger receives incoming messages and filters out bot/status messages to prevent loops.
  • AI Agent (powered by Ollama or any connected LLM) classifies the message into one of four intent categories with confidence scoring.
  • Smart Router directs each intent down a dedicated path.
  • Hot & Warm Leads receive an instant reply, get logged to Google Sheets, have a Google Calendar meeting auto-booked, and receive the Meet link via WhatsApp.
  • Support requests are logged and receive a ticket confirmation.
  • Vague or incomplete messages trigger a smart follow-up question. Conversation memory ensures the AI re-classifies correctly when the user replies with more context.

Setup steps

  • Connect your WhatsApp Business API credentials (Meta Cloud API).
  • Connect Google Sheets OAuth and set your spreadsheet ID in all three logging nodes.
  • Connect Google Calendar OAuth and select your calendar in both booking nodes.
  • Configure your LLM (Ollama endpoint, OpenAI, or any supported model).
  • Update the BOT_NUMBERS array in the "Parse WhatsApp Message" node to match your WhatsApp Business phone number ID.
  • Update the phoneNumberId in all WhatsApp Send nodes to your number.
  • Send a test message and verify the full flow.

Requirements

  • WhatsApp Business API (Meta Cloud API) access
  • Google Sheets and Google Calendar accounts with OAuth credentials
  • An LLM endpoint (Ollama, OpenAI, or any n8n-supported model)
  • n8n instance (cloud or self-hosted)

How to customize

  • Swap the AI model in the Ollama Chat Model node for OpenAI, Anthropic, or any supported LLM.
  • Edit the auto-reply templates in each Reply code node to match your brand voice.
  • Adjust meeting booking times (default: Hot = 2 hours out, Warm = 4 hours out).
  • Add Slack or email notifications by branching from the Google Sheets logging nodes.
  • Modify the AI classification prompt to add custom intent categories for your business.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - 🔧 Parse WhatsApp Message

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 2 - 🤖 AI Intent Classifier

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 3 - 🎯 Extract Classification

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - 🔀 Route by Intent

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 5 - 💬 Hot Lead Reply

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - 💬 Warm Lead Reply

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - 💬 Support Reply

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - 🧠 Smart Qualification Reply

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - 📊 Log Hot Lead

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 10 - 📊 Log Warm Lead

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 11 - 📊 Log Support

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 12 - 📅 Book Meeting (Hot)

Type / Role
n8n-nodes-base.googleCalendar - googleCalendar
Config choices
Version 1.2

Block 13 - 📅 Book Meeting (Warm)

Type / Role
n8n-nodes-base.googleCalendar - googleCalendar
Config choices
Version 1.2

Block 14 - 📱 Send Meeting (Hot)

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1.1

Block 15 - 📱 Send Meeting (Warm)

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1.1

Block 16 - 📱 Send Support Reply

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1.1

Block 17 - 📱 Send Qualifying Question

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1.1

Block 18 - WhatsApp Trigger

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 19 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 20 - Ollama Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOllama - lmChatOllama
Config choices
Version 1

Block 21 - Sticky Note - Main Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note - Incoming

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note - AI

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note - Router

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 29 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Auto-respond and classify WhatsApp leads with Ollama AI and log to Google Sheets
Complexity advanced
Nodes 29
Categories Lead Generation, AI Chatbot
Author Tony Adijah
Published 17 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13450/13450.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Auto-respond and classify WhatsApp leads with Ollama AI and log to Google Sheets do?

Who is this for This workflow is built for sales teams, agencies, and small businesses that receive inbound leads via WhatsApp and want to automate their first response, lead qualification, and CRM...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, AI Chatbot use case.