๐Ÿ’ฌ Re-engage HubSpot leads using Azure OpenAI GPT-4o, Gmail and Slack

โšก 64 views ยท ๐Ÿ’ฌ Lead Nurturing & AI Sales Agents

Description

๐Ÿ“˜ Description

This workflow automates daily re-engagement for HubSpot leads that were previously paused due to timing. It runs every 24 hours, fetches recent leads with activity data, and filters only those marked as โ€œbad timing,โ€ ensuring active opportunities are not disturbed. Qualified leads are processed in batches, and an AI agent generates a short, polite follow-up email designed to reopen the conversation without sounding salesy. Instead of sending automatically, the workflow creates a Gmail draft for human review and notifies the assigned owner in Slack. If AI generation fails, the workflow sends a Slack alert with the lead details so manual follow-up can still happen. This ensures consistent reactivation of cold leads without silent failures or missed opportunities.

โš™๏ธ What This Workflow Does (Step-by-Step)

โฐ Daily Trigger (Every 24h) Runs the workflow once per day. ๐Ÿ“ฅ HubSpot: Fetch Recent Leads + Activity Fields Pulls up to 20 leads with key activity and lifecycle properties needed for follow-up timing. ๐Ÿšฆ Filter: Lead Status = BAD_TIMING Keeps only leads that were previously paused due to timing (targets cold opportunities only). ๐Ÿ”„ Batch Leads (Split In Batches) Processes leads one-by-one / in batches to prevent rate-limit issues and keep execution stable. โœ๏ธ AI: Generate Re-Engagement Follow-Up Email Body Creates a short, friendly follow-up message based on lead context (no CRM labels, no salesy tone). ๐Ÿงฉ Parse AI JSON Normalizes AI output into usable fields (subject/body/toEmail/owner details). ๐Ÿ“ฉ Gmail: Create Follow-Up Draft Email Creates a Gmail draft (human-in-the-loop; no auto-send). ๐Ÿ”” Slack: Notify Owner to Re-Engage Lead Notifies the assigned owner that a draft is ready and the lead is worth revisiting. โš ๏ธ Build AI Error Payload Builds a clean error context (lead name/email + AI error message). ๐Ÿšจ Slack: Alert AI Draft Failure Alerts the owner when AI fails so the lead can be followed up manually.

๐Ÿงฉ Prerequisites

โ€ข n8n instance โ€ข HubSpot App Token (read access to leads + properties) โ€ข Azure OpenAI credentials (GPT-4o) for email generation โ€ข Gmail OAuth2 (draft creation permissions) โ€ข Slack API token (DM user messaging permissions)

๐Ÿ’ก Key Benefits

โœ” Daily automated re-engagement for paused leads โœ” Prevents random outreach to active leads โœ” Human-in-the-loop safety via Gmail drafts (no auto-send) โœ” Owner notifications ensure follow-up execution โœ” Batch processing avoids rate-limit instability โœ” Strong failure handling prevents silent lead drops

๐Ÿ‘ฅ Perfect For

๐Ÿ”— Nodes Used

Slack, HubSpot, Gmail, Schedule Trigger, AI Agent, Azure OpenAI Chat Model

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup