🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Gemini + Gmail, AI lead scoring that routes follow ups

Lisa Granqvist Partner Workflow Automation Expert

Your lead form works. The problem starts right after it. New inquiries land in a messy pile, you skim for “budget” and “timing,” then you either overreact (push too hard) or underreact (reply too late).

This Gemini lead scoring setup hits marketing managers who need speed, but founders and agency owners feel it too. You get consistent “hot / mid / cold” qualification and the right follow-up gets triggered automatically, so you’re not guessing who deserves attention first.

Below is the workflow, what it automates, and what changes when you stop manually triaging every single inbound lead.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Gemini + Gmail, AI lead scoring that routes follow ups

The Problem: Lead follow-up is inconsistent (and you feel it)

Manually qualifying leads sounds simple until you do it all week. One person replies instantly, another waits “until after lunch,” and suddenly you’ve trained your best prospects to book with someone else. The worst part is the mental load. You are interpreting vague answers, trying to read intent, and rewriting the same follow-up messages over and over. Even if you have a CRM, the first response still tends to happen in email, Slack, or a random tab you swear you’ll come back to.

It adds up fast. Here’s where it usually breaks down.

  • A good lead can sit for a few hours because it looked “similar” to lower-quality inquiries at first glance.
  • Two people can score the same lead differently, which means you can’t trust your pipeline signals.
  • Mid-tier leads get ignored because they don’t feel urgent, even though they’re often the easiest to convert with the right message.
  • Cold leads get a sales-heavy email, so they ghost instead of staying in your orbit.

The Solution: BANT-based AI scoring that routes the follow-up for you

This workflow acts like an automated sales assistant inside n8n. A lead fills out your intake form with questions designed around BANT (Budget, Authority, Need, Timing). That data is sent to Google Gemini with a prompt that scores each BANT component and returns a clean overall rating: hot, mid, or cold. From there, a routing step (a Switch node) sends the lead down the right path automatically. Hot leads get redirected to your calendar booking link, mid leads get a personalized WhatsApp intro drafted and pre-filled, and cold leads receive a helpful nurture email through Gmail with resources instead of pressure. Honestly, it’s the “first response” problem solved.

The workflow starts at your public form. Gemini scores the lead and returns structured output, which means routing is predictable. Finally, the lead is pushed into the correct follow-up channel (calendar, WhatsApp, or Gmail) without you touching anything.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you get 15 inbound leads a week. Manually, you might spend about 10 minutes reading answers, scoring them, and writing the first reply, which is roughly 2.5 hours weekly (and it’s never in one clean block). With this workflow, scoring and routing happens automatically after the form submit, and you only spend time on real conversations. Even if you just review the “hot” ones and spot-check the rest, you usually get about 2 hours back every week.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Gemini (Google AI) for BANT scoring and copy generation.
  • Gmail to send cold-lead nurture emails automatically.
  • Google AI API key (get it from Google AI Studio at aistudio.google.com/app/apikey)

Skill level: Beginner. You’ll connect accounts, paste an API key, and tweak a few text fields like your calendar link and WhatsApp number.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

Lead submits your intake form. The workflow begins when someone fills out the public “Lead Intake Form” with their budget, role, start timeline, and what they want to build.

Gemini scores the lead using BANT. Those answers go into the “Evaluate Lead Score” prompt. Gemini returns structured data (including the final hot/mid/cold label), and n8n parses it so you’re not relying on messy free-text.

Routing decides the follow-up channel. The “Route by Score” switch sends hot leads to a calendar redirect, mid leads to a WhatsApp message draft plus your number, and cold leads to an email-writing prompt.

Cold leads get nurtured via Gmail. Gemini writes a helpful follow-up email, n8n parses the email JSON, and “Send Nurture Email” delivers it through your connected Gmail account.

You can easily modify the scoring criteria to match your sales process and change the resources in the cold-lead email based on your offer. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Form Trigger

This workflow starts when a lead submits your intake form.

  1. Add the Lead Intake Form node as your trigger.
  2. Set Form Title to Contact Form.
  3. Set Form Description to Please fill out the form below to get in touch with us. We're excited to hear about your n8n project!.
  4. Configure the form fields exactly as shown: Full Name, Email (type email), What would you want to build in n8n ? (textarea), What's you budget ?, When would you want to start building ?, What is your current job ?.
  5. In Options, set Path to n8n-contact-form and Button Label to Send Message.

Step 2: Connect Google Gemini

The AI steps use Google Gemini to score leads and generate messages.

  1. Open Evaluate Lead Score and confirm the model is set to models/gemma-3-27b-it with Temperature 0.
  2. Credential Required: Connect your googlePalmApi credentials in Evaluate Lead Score.
  3. Open Draft WhatsApp Intro and verify the model is models/gemini-2.5-flash-lite with Temperature 0.
  4. Credential Required: Connect your googlePalmApi credentials in Draft WhatsApp Intro.
  5. Open Compose Follow-up Email and confirm JSON Output is enabled.
  6. Credential Required: Connect your googlePalmApi credentials in Compose Follow-up Email.

Step 3: Set Up Lead Scoring and Parsing

These nodes score the lead and parse the AI JSON before routing.

  1. In Evaluate Lead Score, keep the prompt intact and ensure the form inputs are referenced with expressions like {{ $json['What would you want to build in n8n ?'] }} and {{ $json['What\'s you budget ?'] }}.
  2. Configure Parse Score JSON with Mode set to raw.
  3. Set JSON Output in Parse Score JSON to ={{ $json.content.parts[0].text.replaceAll("```json", "").replaceAll("```", "").trim().parseJson() }}.
  4. Confirm the connection flow is Lead Intake FormEvaluate Lead ScoreParse Score JSONRoute by Score.

Tip: If the AI ever returns markdown or extra text, the parser will fail. Keep the prompts in Evaluate Lead Score unchanged to guarantee clean JSON.

Step 4: Configure the Score-Based Routing

The switch directs each lead to the correct path based on the score.

  1. In Route by Score, ensure three outputs are defined: hot, mid, and cold.
  2. Set the Left Value for each rule to ={{ $json.score }} and match the Right Value to hot, mid, and cold.
  3. Connect the hot output to Calendar Redirect with Redirect URL https://call.workflows.ac.
  4. Connect the mid output to Draft WhatsApp IntroSet WhatsApp NumberOpen WhatsApp Chat.
  5. Connect the cold output to Website Redirect with Redirect URL https://workflows.ac.

⚠️ Common Pitfall: If the Route by Score rules are set to the wrong value (e.g., Hot instead of hot), leads will fall through and never reach the right path.

Step 5: Configure WhatsApp and Email Output Actions

Mid-score leads get WhatsApp guidance, while cold leads receive a nurture email.

  1. In Set WhatsApp Number, set first_message to ={{ $json.content.parts[0].text }}.
  2. In Open WhatsApp Chat, set Redirect URL to =https://wa.me/{{ $json.whatsapp_phone }}?text={{ $json.first_message.urlEncode() }}.
  3. In Compose Follow-up Email, keep JSON Output enabled so it returns subject and body keys.
  4. In Parse Email JSON, set JSON Output to ={{ $json.content.parts[0].text.replaceAll("```json", "").replaceAll("```", "").trim().parseJson() }}.
  5. In Send Nurture Email, set Send To to ={{ $('Lead Intake Form').last().json.Email }}, Subject to ={{ $json.subject }}, and Message to ={{ $json.body }}.
  6. Credential Required: Connect your gmailOAuth2 credentials in Send Nurture Email.

⚠️ Common Pitfall: Open WhatsApp Chat will fail if whatsapp_phone is empty. Make sure you populate it in Set WhatsApp Number or update the node to derive it from your form data.

Step 6: Test and Activate Your Workflow

Validate each path and turn on the workflow for production use.

  1. Click Test Workflow and submit a sample entry through Lead Intake Form.
  2. Verify the execution flow: Lead Intake FormEvaluate Lead ScoreParse Score JSONRoute by Score.
  3. For a hot lead, confirm the response redirects to https://call.workflows.ac via Calendar Redirect.
  4. For a mid lead, confirm Open WhatsApp Chat opens a chat URL with the prefilled message.
  5. For a cold lead, confirm Send Nurture Email sends an email with the parsed subject and body.
  6. When everything works, toggle the workflow to Active to enable live form submissions.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Google Gemini (Google AI) credentials can expire or need specific permissions. If things break, check your Google AI Studio API key and the credential attached to “Evaluate Lead Score” 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.
  • Gmail sending can fail if the connected Google account has restricted access or the OAuth consent changes. Reconnect the credential on “Send Nurture Email” and confirm the mailbox is allowed to send from that address.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Gemini lead scoring automation?

About 15 minutes if you already have your Google AI key and Gmail ready.

Do I need coding skills to automate Gemini lead scoring?

No. You’ll connect accounts and edit a few prompts and redirect links.

Is n8n free to use for this Gemini lead scoring 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 API usage costs, which vary based on volume.

Where can I host n8n to run this automation?

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.

Can I customize this Gemini lead scoring workflow for different scoring rules?

Yes, and you should. Update the prompt and criteria inside “Evaluate Lead Score” to match your ideal customer profile, then adjust the “Route by Score” switch if you want different buckets. Common tweaks include raising the “hot” threshold for budget, treating certain job roles as higher authority, and changing how you interpret timing.

Why is my Gmail connection failing in this workflow?

Usually it’s an expired or disconnected Google OAuth credential in n8n. Reconnect the account on the “Send Nurture Email” node and confirm the Gmail address is allowed to send (especially if you’re using a workspace with tighter security). If the workflow suddenly started failing after working fine, check your Google admin settings and any recently changed consent screens.

How many leads can this Gemini lead scoring automation handle?

If you self-host n8n, there’s no fixed execution limit (it mostly depends on your server). On n8n Cloud, your monthly execution limit depends on your plan. Practically, this workflow can handle typical SMB lead volume easily, and you’ll feel limits first from API rate limits or your email sending policies, not from the logic itself.

Is this Gemini lead scoring automation better than using Zapier or Make?

It can be. n8n makes this kind of branching logic straightforward, and you’re not forced into extra costs just because you have three routes (hot, mid, cold). You also get a self-hosted option, which matters when lead volume spikes. Zapier or Make are still fine for a simple two-step follow-up, but this workflow is more of a mini system than a single zap. If you want a second opinion before you build, Talk to an automation expert.

Once your first response is routed automatically, your pipeline gets calmer. The workflow handles the repetitive sorting, and you spend your time where it actually pays off.

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.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal