AutomationFlowsAI & RAG › Classify Lead Sentiment with Google Gemini and Send Whatsapp Responses via…

Classify Lead Sentiment with Google Gemini and Send Whatsapp Responses via…

Original n8n title: Classify Lead Sentiment with Google Gemini and Send Whatsapp Responses via Typeform & Supabase

ByDanielle Gomes @daniellegomes on n8n.io

Automatically classify incoming leads based on the sentiment of their message using Google Gemini, store them in Supabase by category, and send tailored WhatsApp messages via the official WhatsApp Cloud API.

Webhook trigger★★★★☆ complexityAI-powered11 nodesGoogle Gemini ChatSentiment AnalysisSupabaseWhatsApp
AI & RAG Trigger: Webhook Nodes: 11 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #4322 — we link there as the canonical source.

This workflow follows the Google Gemini Chat → WhatsApp recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Lead Sentiment Qualifier",
  "tags": [],
  "nodes": [
    {
      "id": "e74de2ca-d3e1-499b-893c-972bb6bd9ad0",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        760,
        580
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "01b4b86b-8798-405e-93c9-5881f3d27d20",
      "name": "Receive New Lead (Typeform)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        340,
        360
      ],
      "parameters": {
        "path": "lead-webhook",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "b4007cc1-6332-42d3-a7d1-12db9bc35fec",
      "name": "Prepare Lead Data",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        360
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "d274436b-f5f6-4c13-948d-f1e2f822e85c",
      "name": "Classify Sentiment (Gemini or other ai model)",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        780,
        360
      ],
      "parameters": {
        "options": {},
        "inputText": "={{$json[\"message\"] || $json[\"mensagem\"] || $json[\"resposta\"]}}\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1322317f-fbc6-4a9d-a764-f6dc68b7a02b",
      "name": "Store Hot Lead",
      "type": "n8n-nodes-base.supabase",
      "position": [
        1156,
        160
      ],
      "parameters": {},
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "856a57e9-4d21-4a7c-9dd4-90d5df595468",
      "name": "Store Neutral Lead",
      "type": "n8n-nodes-base.supabase",
      "position": [
        1156,
        360
      ],
      "parameters": {},
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1d3ab942-66f3-4aff-a46e-7cc040e7f6db",
      "name": "Store Cold Lead",
      "type": "n8n-nodes-base.supabase",
      "position": [
        1156,
        560
      ],
      "parameters": {},
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "20839991-6176-4485-98fe-1d188ac552f1",
      "name": "Combine Lead Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1376,
        360
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.1
    },
    {
      "id": "fa4ac251-30a5-4ab4-8bd3-54036b810648",
      "name": "Send WhatsApp Message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        1596,
        360
      ],
      "parameters": {
        "operation": "send",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "1c49034d-c7fe-4f1f-acab-01a1efe0f474",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        140
      ],
      "parameters": {
        "width": 480,
        "height": 600,
        "content": "## Lead Sentiment Qualifier \u2013 Classify incoming leads using AI and reply via WhatsApp\n\n\nShort Description:\nAutomatically classify leads from a Typeform based on sentiment using Google Gemini. Store them in Supabase by category (hot, neutral, cold) and send personalized WhatsApp responses using the official WhatsApp Cloud API.\n\nFull Description:\nThis workflow helps you qualify leads instantly by analyzing the sentiment of their message.\n\nNew leads are captured through a Typeform webhook\n\nThe message is processed and analyzed using Google Gemini (sentiment classification: Positive, Neutral or Negative)\n\nDepending on the result, the lead is stored in Supabase under the appropriate label (hot, neutral, or cold)\n\nA personalized WhatsApp message is sent using the official WhatsApp Cloud API to confirm receipt and provide feedback\n\nIdeal for sales teams, onboarding funnels, and support flows that want to prioritize leads based on tone, urgency, or engagement level."
      },
      "typeVersion": 1
    },
    {
      "id": "e8d20736-9419-445e-ab25-dd63a7605cf2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        720
      ],
      "parameters": {
        "content": "## Prompt sugestion \nClassify the sentiment of the message below as Positive, Neutral or Negative:\n\n\"{{$json[\"message\"]}}\"\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "Store Hot Lead": {
      "main": [
        [
          {
            "node": "Combine Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Cold Lead": {
      "main": [
        [
          {
            "node": "Combine Lead Data",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Combine Lead Data": {
      "main": [
        [
          {
            "node": "Send WhatsApp Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Lead Data": {
      "main": [
        [
          {
            "node": "Classify Sentiment (Gemini or other ai model)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Neutral Lead": {
      "main": [
        [
          {
            "node": "Combine Lead Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Classify Sentiment (Gemini or other ai model)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Receive New Lead (Typeform)": {
      "main": [
        [
          {
            "node": "Prepare Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Sentiment (Gemini or other ai model)": {
      "main": [
        [
          {
            "node": "Store Hot Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store Neutral Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store Cold Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Automatically classify incoming leads based on the sentiment of their message using Google Gemini, store them in Supabase by category, and send tailored WhatsApp messages via the official WhatsApp Cloud API.

Source: https://n8n.io/workflows/4322/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

@Brightdata/N8N Nodes Brightdata, Information Extractor, Google Gemini Chat +2
AI & RAG

Who is this for? Event organizers, conference planners, and marketing teams fighting registration drop-off who want 4-field forms with LinkedIn-level attendee intelligence. What problem is this workfl

Data Table, HubSpot, Email Send +4
AI & RAG

Agendamento Instituto Ariana Borges - Corrigido. Uses lmChatGoogleGemini, googleCalendar, informationExtractor. Webhook trigger; 14 nodes.

Google Gemini Chat, Google Calendar, Information Extractor
AI & RAG

⏺ 🚀 How it works

Agent, Anthropic Chat, Output Parser Structured +6
AI & RAG

Agent: IPTV (instance_e2165d22_1762376395079). Uses openAi, redis, supabase, httpRequest. Webhook trigger; 56 nodes.

OpenAI, Redis, Supabase +7