Quick overview
This workflow captures website and Google Ads leads via webhooks, logs them to Google Sheets, and uses Google Gemini to qualify them against a Business Profile sheet, then creates HubSpot contacts and call tasks and sends Slack and Gmail alerts, reminders, and daily reports.
How it works
- Receives new leads from a website form or Google Ads lead form via webhook, validates a shared secret key, normalizes the fields, and appends the lead to a Google Sheets Lead Log.
- Loads services, service area, and qualification rules from a Google Sheets Business Profile and sends the lead details (or a matched Gmail reply) to Google Gemini to classify the lead and draft any needed email.
- Updates the Lead Log with the AI outcome, priority, summary, and missing information details.
- For qualified or not-a-fit leads, upserts the contact in HubSpot, creates an associated call task with a calculated due time, and emails the lead a confirmation.
- For qualified leads, sends real-time alerts to a Slack channel and to the owner via Gmail.
- For missing-info leads, emails the lead questions once and stores the Gmail thread ID so their reply can be matched and re-evaluated.
- Runs hourly to check HubSpot task completion, send Slack/Gmail reminders for open qualified tasks, and escalate no-reply missing-info leads to “please call,” and runs daily at 6 PM to email a summary report from the Lead Log.
Setup
- Create a Google Sheets Lead Log spreadsheet and a Business Profile spreadsheet with tabs and headers matching the notes for the Lead Log, Services, Service Area, and About and Rules.
- Add credentials for Google Sheets, Gmail, Slack, and Google Gemini (Gemini API / Google AI), and create a HubSpot private app token with access to contacts and tasks.
- Update the Config values for both sheet URLs, webhookSecret, businessName, alertEmail, slackChannel, timezone, and (optionally) hubspotOwnerId and reminder timing settings.
- Copy the two webhook URLs and configure your website form and Google Ads Lead Form webhook to post leads with the secret key (header x-webhook-key or ?key= parameter).