Tutorial Last updated September 28, 2026

How to Build a Speed to Lead Alert System With n8n and Groq

Most small businesses get leads from several places and have nobody watching all of them every minute. A new enquiry lands during a busy hour, nothing tells you it is still unanswered, and by the time you notice, the lead may have gone elsewhere. I built a real workflow that checks a Google Sheet every 5 minutes, finds leads nobody has replied to, and emails you an alert that escalates the longer they wait, complete with a drafted first reply you can edit and send. It was tested with real alerts through a live mail server, not simulated data.

Does this sound like your business?

TOTAL TIME2-3 hours to build
TOOLS NEEDED
n8n Groq Google Sheets SMTP email
WHAT YOU GET
  • An unanswered lead can no longer sit unnoticed, you get an alert after 5 minutes, 30 minutes, and 2 hours
  • Each alert includes the lead's details and a suggested first reply, so you start from a draft instead of a blank page
  • Every stage is sent at most once, and alerts stop the moment you record a reply
  • Drafts never quote prices or make promises, and a fixed fallback covers any failure
  • Every alert is logged, and any failed step emails you instead of failing silently

Auto-replies are good at acknowledging a lead. They are no help when the lead needs a real person and nobody has picked it up. This speed to lead alert system watches a Google Sheet every 5 minutes, spots any lead that is still unanswered, and emails you an alert that gets more urgent the longer it waits. Each alert includes the lead’s details and a suggested first reply, so you answer from a draft instead of a blank page. I built it and ran it for real, with alerts sent through a live mail server. The real, tested workflow file is free to download near the bottom of this page.

Diagram showing the three escalating alerts an unanswered lead triggers

Who Is This For

This build is for service businesses, freelancers, and small agencies that get leads from forms, ads, and chat, and have no one watching the inbox every minute of the day.

What Problem Does This Workflow Solve

  • Leads Sit Unanswered Without Anyone Noticing: A new enquiry lands during a busy hour and quietly waits, because nothing tells you it is still open.
  • Slow Replies Put Leads at Risk: A lead who has to wait is a lead who may already be talking to someone else.
  • Starting the Reply Is the Slow Part: Staring at a blank message is often why a reply gets put off, so the alert hands you a draft to edit.

How to Build a Speed to Lead Alert System With n8n and Groq

A Schedule Trigger runs every 5 minutes and reads a Lead Tracker tab in Google Sheets. A Code node keeps only the leads where nobody has replied yet and the wait has passed a threshold. Groq drafts a suggested first reply from the lead’s own words, a QA check reviews it, and an email lands in your inbox with the lead, how long they have waited, and the draft. The lead is then marked as alerted and the alert is logged. This sits alongside the auto-reply builds, such as my contact form auto-reply, and the wider approach in routing new website leads to sales in under a minute.

Screenshot of the real n8n workflow canvas behind this speed to lead alert system

Three Alerts, Each Sent Once

A lead that has waited 5 minutes gets a heads-up alert. At 30 minutes it gets a second alert marked as still waiting, and at 2 hours a final urgent one. The sheet remembers the last stage alerted, so each stage is sent at most once, and the alerts stop the moment you type a time into the first_response_at column. A lead that has already waited 3 hours when the workflow first sees it jumps straight to the urgent alert instead of sending three in a row. Leads older than 72 hours are ignored, so switching the workflow on for the first time never floods your inbox with old enquiries.

A Drafted Reply Keeps Groq on a Short Leash

Groq only sees the lead’s first name, how they got in touch, and what they wrote. It is told to respond to what they said, ask one question, and never quote a price, a timeline, or a guarantee. My first version of the prompt still let the model write “Yes, we can build AI chat agents tailored for a small clinic” in reply to a clinic enquiry, which confirms a capability nobody had given it. I added a rule to never confirm that anything specific can be delivered, and the next draft I checked only thanked the lead and suggested a call. Every draft is also checked for banned filler words, prices, guarantees, and time promises, and a fixed fallback reply takes over if a draft fails or the Groq call itself fails. I tested that by pointing the Groq node at a dead URL: the alert still arrived, with the fallback reply.

What the Tests Showed

I seeded seven sample leads covering every case: three at different waiting times, one too recent, one already replied to, one already alerted at its current stage, and one far too old. The first run sent exactly three alerts and left the others alone. A lead 3 minutes old was correctly skipped, then alerted at exactly 5 minutes on the next run, and a re-run sent no repeats. I built in two lessons from my invoice follow-up tutorial from the start: per-lead Code nodes run once for each item, and the log writes are spaced a second apart, and all three log rows landed correctly. One small gotcha did show up: a phone number typed as +15550100003 came back as 15550100003, because Google Sheets treats it as a number. Format the contact column as plain text.

Setup Guide

Prerequisites

  • A free Groq API key (the openai/gpt-oss-120b model, an OpenAI-compatible API)
  • A Google account with Sheets access, connected through OAuth or a service account
  • An SMTP email credential for the address the alerts come from
  • A hosted instance of n8n, cloud or self-hosted

Setup Steps

  1. Download the workflow file near the bottom of this page and import it into your n8n instance.
  2. Connect your credentials for Groq, Google Sheets, and your SMTP account.
  3. Create the Lead Tracker tab with these columns: lead_id, received_at, name, contact, source, message, first_response_at, alert_stage, last_alert_at.
  4. Create the Lead Alert Log tab with these columns: timestamp, lead_id, name, stage, minutes_waiting, subject, draft_source, source.
  5. Point the Sheets nodes at your own spreadsheet and set the alert email address in the Send Lead Alert node.
  6. Add a few test leads with received_at set to recent ISO timestamps such as 2026-09-28T14:05:00Z, then run the workflow manually.
  7. Check your inbox and the sheet to confirm each alert arrived once and the alert_stage column updated.
  8. Send real leads to the tab from your forms and ads, then activate the workflow. It is exported inactive on purpose.

When you reply to a lead, type the time into first_response_at. That single cell stops every further alert for that lead.

How to Customize This Workflow

  • Change the thresholds in the picking Code node to match how fast you promise to reply.
  • Add business hours so alerts do not fire at 3am. This version alerts around the clock.
  • Send alerts somewhere faster than email, such as WhatsApp, SMS, or a team chat channel.
  • Pull leads from your CRM instead of a sheet, and fill in first_response_at automatically when a reply is sent.

One known simplification: a received_at value with no timezone is read in the timezone of your n8n server, so use timestamps that end in Z.

Need Help Customizing?

Connect with me on LinkedIn, or find more real builds on YouTube, Facebook, and Instagram.

Read the nine steps in full below, or download the real, tested workflow file to import directly into your own n8n and stop letting leads go cold.

  1. 1

    Keep Every Lead in One Lead Tracker Sheet

    A Lead Tracker tab holds one row per lead: lead_id, received_at, name, contact, source, message, first_response_at, alert_stage, and last_alert_at. It is the single source of truth for who is waiting and what has already been alerted.

  2. 2

    Check the Sheet Every 5 Minutes

    A Schedule Trigger runs the workflow every 5 minutes, and a Manual Trigger feeds the same first step so the whole workflow can be tested on demand without waiting for the clock.

  3. 3

    Pick Only Leads That Are Unanswered and Past a Threshold

    A Code node keeps leads where first_response_at is empty, the wait has passed 5, 30, or 120 minutes, and that stage's alert has not already been sent. Leads older than 72 hours are skipped so a first activation never floods you.

  4. 4

    Draft a Suggested First Reply With Groq

    One Groq call per lead writes a short reply from only the lead's first name, source, and message. The prompt forbids prices, timelines, guarantees, and confirming that anything specific can be delivered.

  5. 5

    QA-Lint the Draft and Fall Back to a Fixed Reply

    Each draft is checked for banned filler words, prices, guarantees, and time promises. A failed check, or a failed Groq call, swaps in a fixed fallback reply so the alert still goes out.

  6. 6

    Email You an Alert With the Lead and the Drafted Reply

    The Send Email node delivers an alert whose subject escalates by stage, with the lead's details, how many minutes they have waited, what they wrote, the suggested reply, and how to stop further alerts.

  7. 7

    Mark the Lead as Alerted

    Right after a successful send, the lead's alert_stage and last_alert_at are written back to its row, which is what stops the same stage from ever being sent twice.

  8. 8

    Log Every Alert, Spaced Out to Avoid Overwrites

    Each alert is appended to a Lead Alert Log tab with the stage, minutes waiting, subject, and whether the AI draft or the fallback was used. The append node uses batching, one item per batch a second apart, so back-to-back appends cannot overwrite each other.

  9. 9

    Alert on Any Failed Step

    If the send, the sheet update, or the log write fails, an alert email explains which step broke, and whether the lead will be alerted again on the next run or needs its alert_stage set by hand to avoid a duplicate.

GET THE WORKFLOW

This is the real, tested n8n workflow from this tutorial, not a mockup. Tell me where to send it and it'll land in your inbox as a ready-to-import .json file.

Does this sound like your business?

Text me on WhatsApp