Automate Gmail lead follow-up with OpenAI GPT-4O, HubSpot, Slack & Google Sheets
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Worth a look
- Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (📧 Gmail: New Lead Response)
Nodes used (9)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - HubSpot
n8n-nodes-base.hubspot - Slack
n8n-nodes-base.slack - Google Sheets
n8n-nodes-base.googleSheets - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent
What it does
How it works This workflow automates the handling of new lead responses received in Gmail. It captures emails with a specific label, analyzes the message using AI to determine sentiment, intent, urgency, next action, and priority, and then decides whether follow-up is needed. If required, it creates tasks in HubSpot, notifies the sales team via Slack, and logs all details into Google Sheets for tracking. Step-by-step Trigger on New Lead Email - Workflow starts whenever a new email with a defined Gmail label arrives. - Captures the sender’s email, subject, message snippet, and timestamp. Normalize Email Data - Standardizes Gmail fields into structured values: - leadEmail (sender’s address) - subject (email subject) - message (email content snippet) - source (Gmail) - receivedAt (timestamp) AI-Powered Lead Analysis - Uses OpenAI to analyze the lead’s message. - Extracts: - Sentiment (Positive / Neutral / Negative) - Intent (Interested, Not Interested, Needs Info, Ready to Buy, Objection) - Urgency (High / Medium / Low) - Next Action (Call, Email, Demo, Quote, No Action) - Summary (1–2 sentence description) - Priority (Hot / Warm / Cold) - Parsed results are merged with the original email data. - Flags are added: - needsFollowUp (true/false) - isHighPriority (true/false) Decision: Needs Follow-Up? - If AI suggests a follow-up action, the workflow continues. - Otherwise, the process stops here. Create HubSpot Task - Automatically creates a HubSpot CRM task for the sales team. - Task includes email subject, body, and lead details. Notify Sales Team on Slack - Sends a formatted message to Slack with key lead insights: - Summary - Lead email - Priority - Urgency - Date of analysis Log Lead Data to Google Sheets - Appends structured data to Google Sheets for record-keeping. - Stores all fields: Email, Date, Subject, Message, Sentiment, Intent, Urgency, Next Action, Summary, and Priority. Why use this? - Automates lead triage directly from Gmail. - Saves time by using AI-powered analysis instead of manual review. - Ensures no potential lead is missed by logging into Google Sheets. - Provides instant sales team alerts on high-priority leads. - Integrates seamlessly with HubSpot CRM for structured follow-up. - Keeps your sales pipeline efficient, organized, and proactive.