Typeform + WhatsApp: reply to leads by sentiment
Your Typeform notifications come in. You open one, skim the message, guess how urgent it is, then manually reply (or forget until it’s too late). That’s how good leads go cold.
This Typeform WhatsApp automation hits sales reps first, but support managers and operators running lean teams feel it too. The outcome is simple: every lead gets a fast WhatsApp reply that matches their tone, and the truly hot ones get prioritized automatically.
Below you’ll see how the workflow routes leads by sentiment with Google Gemini, stores them in Supabase, then sends the right WhatsApp Cloud API message without you hovering over inboxes.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Typeform + WhatsApp: reply to leads by sentiment
flowchart LR
subgraph sg0["Classify Sentiment ( Flow"]
direction LR
n0@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/webhook.dark.svg' width='40' height='40' /></div><br/>Receive New Lead (Typeform)"]
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Prepare Lead Data", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Classify Sentiment (Gemini o..", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/supabase.svg' width='40' height='40' /></div><br/>Store Hot Lead"]
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/supabase.svg' width='40' height='40' /></div><br/>Store Neutral Lead"]
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/supabase.svg' width='40' height='40' /></div><br/>Store Cold Lead"]
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Combine Lead Data"]
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/whatsapp.svg' width='40' height='40' /></div><br/>Send WhatsApp Message"]
n4 --> n7
n6 --> n7
n7 --> n8
n2 --> n3
n5 --> n7
n0 -.-> n3
n1 --> n2
n3 --> n4
n3 --> n5
n3 --> n6
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n3 ai
class n0 aiModel
class n1 api
classDef customIcon fill:none,stroke:none
class n1,n4,n5,n6,n7,n8 customIcon
The Problem: Leads Need a Fast Reply, Not a Manual Triage Queue
Most lead capture flows fall apart after the form submit. Typeform collects the details, sure, but then the real work starts: reading the message, figuring out urgency, deciding who should reply, finding a template, and finally sending a WhatsApp message that doesn’t feel copy-pasted. Do that a dozen times a day and you’re losing about an hour on context-switching alone. Worse, your “priority” decisions are inconsistent. On a busy day, the calm but high-intent buyer waits while the loud complainer gets your attention.
It adds up fast. Here’s where it usually breaks down.
- Leads get replied to in batches, which means the first-touch speed is all over the place.
- Someone has to read every message to understand the tone, and that mental load is real.
- Hot prospects are mixed in with neutral and negative messages, so follow-up is inconsistent.
- Manual copy-paste into a spreadsheet or CRM creates typos, missing fields, and awkward handoffs.
The Solution: Typeform → Gemini Sentiment → Supabase → WhatsApp Replies
This workflow turns every Typeform submission into a routed, categorized lead with an instant WhatsApp response. It starts the moment your form is submitted. n8n grabs the payload, cleans it up (name, email, message, any custom fields), and passes the lead message into Google Gemini for sentiment analysis. Gemini labels the message as positive, neutral, or negative, which your team can treat as hot, warm, or cold. Based on that one decision, the workflow stores the lead in Supabase under the matching category, merges the paths back together, then sends a tailored WhatsApp Cloud API message that fits the situation. Quick, consistent, and trackable.
The workflow starts with a Typeform webhook trigger. From there, it standardizes fields and runs Gemini sentiment classification to decide the route. Finally, it writes the lead to Supabase and sends the correct WhatsApp reply automatically.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you get 20 Typeform leads a day. Manually, it’s maybe 3 minutes to read and judge sentiment, 2 minutes to log the lead somewhere, and another 2 minutes to craft and send a WhatsApp reply, so roughly 2 hours daily. With this workflow, you spend about 10 minutes upfront setting message templates, then day-to-day it’s basically zero: the webhook triggers instantly, Gemini classifies, Supabase stores it, and WhatsApp sends the response. You still follow up personally on hot leads, but now you’re starting from a prioritized list.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Typeform to collect inbound lead submissions.
- Google Gemini for sentiment classification on messages.
- Supabase to store leads by category for tracking.
- WhatsApp Cloud API access (get it from Meta for Developers in your WhatsApp app setup).
Skill level: Intermediate. You’ll connect accounts, set API credentials, and adjust one or two message templates.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A Typeform submission triggers the workflow. The webhook receives the lead in real time, so you’re not waiting on email notifications or manual exports.
The lead data gets cleaned up and mapped. n8n standardizes key fields like name, email, and message so the rest of the workflow works reliably (and so your database isn’t a mess later).
Gemini assesses message sentiment. The sentiment analysis step classifies the message as positive, neutral, or negative, which your team can interpret as hot, warm, or cold lead intent. That single result drives routing.
Supabase stores the lead and WhatsApp sends the reply. The workflow records the lead to the matching Supabase table (or category), merges the routes back together, then dispatches a WhatsApp Cloud API message tailored to the sentiment outcome.
You can easily modify the WhatsApp message templates to match your brand voice based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Webhook Trigger
Set up the inbound webhook so your workflow can receive new lead messages and start processing.
- Add or open Inbound Lead Webhook.
- Set HTTP Method to
POST. - Set Path to
lead-webhook. - Click Test URL to obtain the webhook endpoint you’ll send leads to.
Step 2: Connect Supabase for Lead Storage
Configure the three Supabase nodes that store leads based on sentiment.
- Open Record Hot Prospect and connect credentials. Credential Required: Connect your supabaseApi credentials.
- Open Record Neutral Prospect and connect credentials. Credential Required: Connect your supabaseApi credentials.
- Open Record Cold Prospect and connect credentials. Credential Required: Connect your supabaseApi credentials.
Step 3: Set Up Sentiment Processing with Gemini
Map inbound fields and analyze sentiment using the Gemini language model.
- Open Map Lead Fields and define any field mappings needed for your inbound payload.
- Open Assess Message Sentiment and set Input Text to
={{$json["message"] || $json["mensagem"] || $json["resposta"]}}. - Ensure Gemini Chat Engine is connected as the language model for Assess Message Sentiment, and add credentials to Gemini Chat Engine as required by your Gemini provider.
Step 4: Configure Routing and WhatsApp Response
Route sentiment results to the correct Supabase node and send a response back via WhatsApp.
- Verify Assess Message Sentiment routes to Record Hot Prospect, Record Neutral Prospect, and Record Cold Prospect based on sentiment output.
- Open Merge Lead Streams and set Number of Inputs to
3. - Open Dispatch WhatsApp Reply and set Operation to
send. - Confirm the flow: Record Hot Prospect, Record Neutral Prospect, and Record Cold Prospect → Merge Lead Streams → Dispatch WhatsApp Reply.
Step 5: Test and Activate Your Workflow
Run a full test to confirm sentiment routing, database writes, and WhatsApp responses.
- Use Inbound Lead Webhook’s test URL to send a sample payload containing a message field.
- Confirm Assess Message Sentiment outputs the expected sentiment and routes to the correct Supabase node.
- Verify records are created in Supabase via Record Hot Prospect, Record Neutral Prospect, or Record Cold Prospect.
- Check that Dispatch WhatsApp Reply sends a message successfully.
- When satisfied, toggle the workflow to Active for production use.
Common Gotchas
- WhatsApp Cloud API credentials can expire or need specific permissions. If things break, check your Meta app dashboard and token status first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Frequently Asked Questions
About 30 minutes if your accounts and API access are ready.
No. You’ll mostly paste credentials and edit a few fields in n8n. The only “technical” part is copying the WhatsApp Cloud API details from Meta into the workflow.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Google Gemini usage and WhatsApp Cloud API messaging costs based on your conversation volume.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but you’ll want to adjust the field mapping and the routing logic. You can keep Gemini sentiment as-is and add another decision layer using the “Map Lead Fields” step (for example, company size or budget) before you store the lead in Supabase. Common customizations include different WhatsApp templates per product line, routing “hot” leads to a faster follow-up queue, and writing to separate Supabase tables per segment.
Usually it’s an expired access token or the wrong phone number ID from your Meta app setup. Regenerate the token, confirm the WhatsApp Cloud API permissions, then update the credentials in n8n. If it fails only during busy periods, you may be hitting rate limits or sending to numbers that aren’t allowed in your current WhatsApp setup mode.
A lot.
Often, yes, especially once you add branching and database writes. n8n is comfortable with “hot/warm/cold” routing, merging paths, and storing records in Supabase without turning every extra step into an added fee. It also plays nicer with more advanced AI steps (like sentiment analysis plus custom prompts), and self-hosting removes execution caps if volume spikes. Zapier or Make can still be great for simple two-step flows, but this one benefits from n8n’s control. If you want a quick sanity check before you commit, Talk to an automation expert.
Fast replies and clean routing aren’t “nice to have” when leads are impatient. Set this up once, and your first-touch WhatsApp follow-up stops depending on someone having a calm afternoon.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.