See llms.txt for all machine-readable content.

Back to Templates

Score and log form leads with Google Gemini, Google Sheets and Gmail

Quick overview

This workflow captures quote enquiries via an n8n Form, filters spam, uses Google Gemini to classify and score each lead, appends the results to Google Sheets, and sends a Gmail alert with an AI-drafted reply when the score meets your hot-lead threshold.

How it works

  1. Receives a new enquiry from an n8n Form trigger.
  2. Normalizes the submitted fields, validates the email, and flags likely spam using a hidden honeypot field and excessive-link detection.
  3. For non-spam submissions, sends the lead details plus your business context to Google Gemini to return a structured category, score (0–100), urgency, reason, missing info, and a reply draft.
  4. Combines the original lead data and Gemini output into a single row with a default status and appends it to a Google Sheets tab named “Leads”.
  5. Checks whether the lead score meets or exceeds your configured hot-lead threshold.
  6. Sends a Gmail email alert for hot leads that includes the lead details, scoring rationale, and the suggested reply draft.

Setup

  1. Create a Google Sheet with a tab named “Leads” and add columns that match the workflow fields (received_at, name, email, phone, service, location, message, category, score, urgency, ai_reason, missing_info, reply_draft, status).
  2. Add credentials for Google Gemini (API key), Google Sheets, and Gmail in n8n.
  3. In the Settings values, set your business details, the alert email address, and the hot_score threshold.
  4. In the Google Sheets append step, select your target spreadsheet document ID and confirm the sheet name is “Leads”.
  5. Publish the n8n Form and use its URL on your website, then submit a test enquiry to verify rows are saved and hot-lead emails are delivered.