AI-powered outreach & follow-up automation (GPT-4o + Gmail + Google Sheets)
Description
Automate your AI-powered outreach and follow-up pipeline end-to-end with GPT-4o, Gmail, and Google Sheets. π€π¬ This workflow personalizes emails for each lead, manages follow-ups automatically, tracks client replies, and updates CRM records in real time β all from a single Google Sheet. Ideal for sales and growth teams looking to convert leads faster without manual effort. βοΈπ
What This Template Does
1οΈβ£ Starts manually when you click βExecute workflow.β πΉοΈ 2οΈβ£ Fetches all leads from the Google Sheet (sample_leads_50). π 3οΈβ£ Validates email format and filters only active (unbooked) leads. π 4οΈβ£ Uses Azure OpenAI GPT-4o to generate short, personalized outreach emails in HTML. βοΈ 5οΈβ£ Cleans and parses the AI output (subject + HTML body). π§ 6οΈβ£ Sends the first outreach email via Gmail and stores its thread ID. π€ 7οΈβ£ Waits 24 hours, then checks for a client reply in the Gmail thread. β±οΈ 8οΈβ£ If a positive reply is found β marks lead as BOOKED and updates in Sheets. β 9οΈβ£ If no reply β triggers a polite follow-up email, waits again 24 hours, and checks the thread a second time. π π If a second reply is found β marks BOOKED and logs the client message.
1οΈβ£1οΈβ£ If still no response β updates status to Declined in Google Sheets. β
1οΈβ£2οΈβ£ Logs invalid or incomplete leads to a separate sheet for data cleanup. π§Ύ
Key Benefits
β Eliminates manual outreach and follow-up effort. β Produces personalized, context-aware AI emails for every lead. β Auto-tracks replies and updates CRM status with zero input. β Prevents duplicate or repeated contact with booked clients. β Keeps lead database synchronized and audit-ready.
Features
- Google Sheets integration for dynamic lead retrieval and updates.
- Regex-based email validation for clean data pipelines.
- Azure OpenAI GPT-4o for contextual email writing.
- Two-stage Gmail automation (initial + follow-up).
- JavaScript parsing for AI output and Gmail thread analysis.
- Automated 24-hour wait and recheck logic.
- Conditional branches for Booked / Declined / Invalid outcomes.
- End-to-end CRM synchronization without manual review.
Requirements
- Google Sheets OAuth2 credentials with read/write access.
- Azure OpenAI API key for GPT-4o model access.
- Gmail OAuth2 credentials with send, read, modify permissions.
Environment Variables
- GOOGLE_SHEET_LEADS_ID
- GOOGLE_SHEET_OUTREACH_TAB_ID
- AZURE_OPENAI_API_KEY
- GMAIL_OAUTH_CLIENT_ID
- GMAIL_OAUTH_SECRET
Target Audience
πΌ Sales and Business Development teams automating outreach. π Marketing and Growth teams running re-engagement campaigns. π€ Automation and RevOps teams integrating AI lead workflows. π¬ Freelancers and agencies managing large prospect lists. π Operations teams maintaining CRM cleanliness and tracking.
Step-by-Step Setup Instructions
1οΈβ£ Connect your Google Sheets, Azure OpenAI, and Gmail credentials. 2οΈβ£ Set your Google Sheet ID and tab name (outreach automation). 3οΈβ£ Update the GPT-4o system prompt to match your tone and signature. 4οΈβ£ Verify column headers (Company Name, Email, Booking Status, etc.). 5οΈβ£ Test the email validation branch with sample data. 6οΈβ£ Run once manually to confirm Gmail thread creation and reply detection. 7οΈβ£ Confirm successful CRM updates in Google Sheets. 8οΈβ£ Activate for continuous lead outreach and follow-up automation. β
AI-Powered Outreach & Follow-up Automation with GPT-4o, Gmail, and Google Sheets
This n8n workflow automates personalized outreach and follow-up emails, leveraging AI to generate tailored content based on prospect data stored in Google Sheets. It streamlines communication, ensures timely follow-ups, and helps manage your outreach pipeline efficiently.
What it does
This workflow performs the following key steps:
- Triggers Manually: The workflow is initiated manually, allowing you to control when the outreach process begins.
- Reads Prospect Data from Google Sheets: It fetches a list of prospects from a specified Google Sheet, including their names, email addresses, and any other relevant information required for personalized outreach.
- Prepares Data for AI: It transforms the raw data from Google Sheets into a structured format suitable for the AI agent, ensuring all necessary fields are present.
- Generates Personalized Outreach Email with AI: An AI Agent (likely using a large language model like GPT-4o, although the specific model is configured within the
Azure OpenAI Chat Modelnode) generates a highly personalized initial outreach email for each prospect. - Sends Initial Outreach Email via Gmail: The generated email is then sent to the prospect using Gmail.
- Waits for a Defined Period: The workflow pauses for a specified duration (e.g., a few days) to allow time for the prospect to respond.
- Checks for Follow-up Condition: After the wait period, it checks if a follow-up is required based on a condition (e.g., if no response was received, or a specific status in the Google Sheet).
- Generates Personalized Follow-up Email with AI: If a follow-up is needed, the AI Agent generates a personalized follow-up email.
- Sends Follow-up Email via Gmail: The follow-up email is sent to the prospect using Gmail.
- Updates Google Sheets (Implicit): Although not explicitly shown in the provided JSON, a typical AI outreach workflow would include steps to update the Google Sheet with outreach status (e.g., "Email Sent", "Follow-up Sent", "Responded") to maintain an accurate record of interactions.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- Google Account: A Google account with access to Google Sheets and Gmail.
- Google Sheets Credential: An n8n credential for Google Sheets (OAuth 2.0).
- Gmail Credential: An n8n credential for Gmail (OAuth 2.0).
- Azure OpenAI Service: Access to an Azure OpenAI service with a deployed chat model (e.g., GPT-4o) and corresponding n8n credentials for the
Azure OpenAI Chat Modelnode.
Setup/Usage
- Import the Workflow: Download the provided JSON and import it into your n8n instance.
- Configure Credentials:
- Set up your Google Sheets credential.
- Set up your Gmail credential.
- Configure the Azure OpenAI Chat Model node with your Azure OpenAI service credentials, deployment name, and API version.
- Prepare Google Sheet: Create a Google Sheet with your prospect data. Ensure it includes columns for at least
NameandEmail, and any other data points you want to use for personalization (e.g.,Company,Role,Pain Point). - Configure Nodes:
- Google Sheets Node: Configure this node to read from your specific Google Sheet and tab.
- Edit Fields (Set) Node: Adjust this node to map your Google Sheet columns to the variables expected by the AI Agent.
- AI Agent Node: Customize the prompt and instructions for the AI to generate the desired outreach and follow-up content.
- Gmail Nodes: Configure the "Send Email" operations with dynamic data from previous nodes for recipient, subject, and body.
- Wait Node: Set the desired delay for the follow-up.
- If Node: Define the conditions under which a follow-up email should be sent.
- Activate the Workflow: Once configured, activate the workflow.
- Execute Manually: Click "Execute Workflow" on the
Manual Triggernode to start the outreach process.
Related Templates
Document RAG & chat agent: Google Drive to Qdrant with Mistral OCR
Knowledge RAG & AI Chat Agent: Google Drive to Qdrant Description This workflow transforms a Google Drive folder into an intelligent, searchable knowledge base and provides a chat agent to query it. Itβs composed of two distinct flows: An ingestion pipeline to process documents. A live chat agent that uses RAG (Retrieval-Augmented Generation) and optional web search to answer user questions. This system fully automates the creation of a βChat with your docsβ solution and enhances it with external web-searching capabilities. --- Quick Implementation Steps Import the workflow JSON into your n8n instance. Set up credentials for Google Drive, Mistral AI, OpenAI, and Qdrant. Open the Web Search node and add your Tavily AI API key to the Authorization header. In the Google Drive (List Files) node, set the Folder ID you want to ingest. Run the workflow manually once to populate your Qdrant database (Flow 1). Activate the workflow to enable the chat trigger (Flow 2). Copy the public webhook URL from the When chat message received node and open it in a new tab to start chatting. --- What It Does The workflow is divided into two primary functions: Knowledge Base Ingestion (Manual Trigger) This flow populates your vector database. Scans Google Drive: Lists all files from a specified folder. Processes Files Individually: Downloads each file. Extracts Text via OCR: Uses Mistral AI OCR API for text extraction from PDFs, images, etc. Generates Smart Metadata: A Mistral LLM assigns metadata like documenttype, project, and assignedto. Chunks & Embeds: Text is cleaned, chunked, and embedded via OpenAIβs text-embedding-3-small model. Stores in Qdrant: Text chunks, embeddings, and metadata are stored in a Qdrant collection (docaiauto). AI Chat Agent (Chat Trigger) This flow powers the conversational interface. Handles User Queries: Triggered when a user sends a chat message. Internal RAG Retrieval: Searches Qdrant Vector Store first for answers. Web Search Fallback: If unavailable internally, the agent offers to perform a Tavily AI web search. Contextual Responses: Combines internal and external info for comprehensive answers. --- Who's It For Ideal for: Teams building internal AI knowledge bases from Google Drive. Developers creating AI-powered support, research, or onboarding bots. Organizations implementing RAG pipelines. Anyone making unstructured Google Drive documents searchable via chat. --- Requirements n8n instance (self-hosted or cloud). Google Drive Credentials (to list and download files). Mistral AI API Key (for OCR & metadata extraction). OpenAI API Key (for embeddings and chat LLM). Qdrant instance (cloud or self-hosted). Tavily AI API Key (for web search). --- How It Works The workflow runs two independent flows in parallel: Flow 1: Ingestion Pipeline (Manual Trigger) List Files: Fetch files from Google Drive using the Folder ID. Loop & Download: Each file is processed one by one. OCR Processing: Upload file to Mistral Retrieve signed URL Extract text using Mistral DOC OCR Metadata Extraction: Analyze text using a Mistral LLM. Text Cleaning & Chunking: Split into 1000-character chunks. Embeddings Creation: Use OpenAI embeddings. Vector Insertion: Push chunks + metadata into Qdrant. Flow 2: AI Chat Agent (Chat Trigger) Chat Trigger: Starts when a chat message is received. AI Agent: Uses OpenAI + Simple Memory to process context. RAG Retrieval: Queries Qdrant for related data. Decision Logic: Found β Form answer. Not found β Ask if user wants web search. Web Search: Performs Tavily web lookup. Final Response: Synthesizes internal + external info. --- How To Set Up Import the Workflow Upload the provided JSON into your n8n instance. Configure Credentials Create and assign: Google Drive β Google Drive nodes Mistral AI β Upload, Signed URL, DOC OCR, Cloud Chat Model OpenAI β Embeddings + Chat Model nodes Qdrant β Vector Store nodes Add Tavily API Key Open Web Search node β Parameters β Headers Add your key under Authorization (e.g., tvly-xxxx). Node Configuration Google Drive (List Files): Set Folder ID. Qdrant Nodes: Ensure same collection name (docaiauto). Run Ingestion (Flow 1) Click Test workflow to populate Qdrant with your Drive documents. Activate Chat (Flow 2) Toggle the workflow ON to enable real-time chat. Test Open the webhook URL and start chatting! --- How To Customize Change LLMs: Swap models in OpenAI or Mistral nodes (e.g., GPT-4o, Claude 3). Modify Prompts: Edit the system message in ai chat agent to alter tone or logic. Chunking Strategy: Adjust chunkSize and chunkOverlap in the Code node. Different Sources: Replace Google Drive with AWS S3, Local Folder, etc. Automate Updates: Add a Cron node for scheduled ingestion. Validation: Add post-processing steps after metadata extraction. Expand Tools: Add more functional nodes like Google Calendar or Calculator. --- Use Case Examples Internal HR Bot: Answer HR-related queries from stored policy docs. Tech Support Assistant: Retrieve troubleshooting steps for products. Research Assistant: Summarize and compare market reports. Project Management Bot: Query document ownership or project status. --- Troubleshooting Guide | Issue | Possible Solution | |------------|------------------------| | Chat agent doesnβt respond | Check OpenAI API key and model availability (e.g., gpt-4.1-mini). | | Known documents not found | Ensure ingestion flow ran and both Qdrant nodes use same collection name. | | OCR node fails | Verify Mistral API key and input file integrity. | | Web search not triggered | Re-check Tavily API key in Web Search node headers. | | Incorrect metadata | Tune Information Extractor prompt or use a stronger Mistral model. | --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. We can help you set it up for free β from connecting credentials to deploying it live. Contact: shilpa.raju@digitalbiz.tech Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digital-biz-tech/ You can also DM us on LinkedIn for any help. ---
Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution
AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) π§ AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative β all powered by AI logic, sir. --- π‘ Key Advantages β‘ Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. π§ AI Qualification Engine An OpenAI-powered Agent evaluates the leadβs industry, region, and needs to generate a persona summary and routing rationale. π Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. π¬ Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. π Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- βοΈ How It Works HubSpot Trigger β Captures a new lead as soon as itβs created in HubSpot. Fetch Contact Data β Retrieves all relevant fields like name, company, and industry. Clean & Format Data β A Code node standardizes and structures the data for consistency. Airtable Record Creation β Logs the lead data into the βLeadsβ table for centralized tracking. AI Agent Qualification β The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update β Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification β Sends a real-time message tagging the rep with lead info. Gmail Notification β Sends a personalized handoff email with context and follow-up actions. HubSpot Sync β Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- π οΈ Setup Steps Trigger Node: HubSpot β Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the βLeadsβ table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- π Credentials Required HubSpot OAuth2 API β To fetch and update leads. Airtable Personal Access Token β To store and update lead data. OpenAI API β To power the AI qualification and matching logic. Slack OAuth2 β For sending team notifications. Gmail OAuth2 β For automatic email alerts to assigned reps, sir. --- π€ Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- π¬ Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular β perfect for scaling across global sales teams, sir.
Newsletter signup flow with Email Verification API, Gmail & Google Sheets tracking
Newsletter Sign-up with Email Verification & Welcome Email Automation π Description A complete, production-ready newsletter automation workflow that validates email addresses, sends personalized welcome emails, and maintains comprehensive logs in Google Sheets. Perfect for marketing teams, content creators, and businesses looking to build high-quality email lists with minimal manual effort. β¨ Key Features Email Verification Real-time validation using Verifi Email API Checks email format (RFC compliance) Verifies domain existence and MX records Detects disposable/temporary email addresses Identifies potential spoofed emails Automated Welcome Emails Personalized HTML emails with subscriber's first name Beautiful, mobile-responsive design with gradient headers Branded confirmation and unsubscribe links Sent via Gmail (or SMTP) automatically to valid subscribers Smart Data Handling Comprehensive logging to Google Sheets with three separate tabs Handles incomplete submissions gracefully Preserves original user data throughout verification process Tracks source attribution for multi-channel campaigns Error Management Automatic retry logic on API failures Separate logging for different error types Detailed technical reasons for invalid emails No data loss with direct webhook referencing π― Use Cases Newsletter sign-ups on websites and landing pages Lead generation forms with quality control Marketing campaigns requiring verified email lists Community building with automated onboarding SaaS product launches with email collection Content creator audience building E-commerce customer list management π What Gets Logged Master Log (All Subscribers) Timestamp, name, email, verification result Verification score and email sent status Source tracking, disposable status, domain info Invalid Emails Log Detailed rejection reasons Technical diagnostic information MX record status, RFC compliance Provider information for troubleshooting Invalid Submissions Log Incomplete form data Missing required fields Timestamp for follow-up π§ Technical Stack Trigger: Webhook (POST endpoint) Email Verification: Verifi Email API Email Sending: Gmail OAuth2 (or SMTP) Data Storage: Google Sheets (3 tabs) Processing: JavaScript code nodes for data formatting π Setup Requirements Google Account - For Sheets and Gmail integration Verifi Email API Key - (https://verifi.email) Google Sheets - Pre-configured with 3 tabs (template provided) 5-10 minutes - Quick setup with step-by-step instructions included π Benefits β Improve Email Deliverability - Remove invalid emails before sending campaigns β Reduce Bounce Rates - Only send to verified, active email addresses β Save Money - Don't waste email credits on invalid addresses β Better Analytics - Track conversion rates by source β Professional Onboarding - Personalized welcome experience β Scalable Solution - Handles high-volume sign-ups automatically β Data Quality - Build a clean, high-quality subscriber list π¨ Customization Options Email Template - Fully customizable HTML design Verification Threshold - Adjust score requirements Brand Colors - Match your company branding Confirmation Flow - Add double opt-in if desired Multiple Sources - Track different signup forms Language - Easily translate email content π¦ What's Included β Complete n8n workflow JSON (ready to import) β Google Sheets template structure β Responsive HTML email template β Setup documentation with screenshots β Troubleshooting guide β Customization examples π Privacy & Compliance GDPR-compliant with unsubscribe links Secure data handling via OAuth2 No data shared with third parties Audit trail in Google Sheets Easy data deletion/export π‘ Quick Stats 12 Nodes - Fully automated workflow 3 Data Paths - Valid, invalid, and incomplete submissions 100% Uptime - When properly configured Instant Processing - Real-time email verification Unlimited Scale - Based on your API limits π Perfect For Marketing Agencies SaaS Companies Content Creators E-commerce Stores Community Platforms Educational Institutions Membership Sites Newsletter Publishers π Why Use This Workflow? Instead of manually verifying emails or dealing with bounce complaints, this workflow automates the entire process from sign-up to welcome email. Save hours of manual work, improve your email deliverability, and create a professional first impression with every new subscriber. Start building a high-quality email list today! ---