Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🚀 Automated Cold Email Outreach Pipeline (n8n Workflow)

An intelligent automation workflow built with n8n that manages cold email outreach campaigns, tracks delivery status in Google Sheets, and uses AI for personalization.

(Note: The scraping tools feeding this pipeline are proprietary and not included in this repo.)


📋 Overview

This workflow is the "engine" behind a lead generation business. It takes raw lead data and turns it into sent emails automatically:

  1. Reads Leads: Pulls verified leads from a Google Sheet.
  2. Logic Check: Checks if the lead has already been contacted to prevent spam.
  3. AI Personalization: Uses Groq LLM to customize the email intro based on the company name.
  4. Sends Email: Dispatches the email via Gmail API with randomized delays.
  5. Updates Status: Writes "sent" back to the Google Sheet for tracking.

Built by: [SHIVAM KUMAR] | Engineering Student @ DTU
Tech Stack: n8n, Google Sheets API, Gmail API, Groq AI


✨ Features

  • Duplicate Prevention: Intelligent logic to skip rows marked as "sent".
  • Human-Like Behavior: Time delays (15 second) to mimic manual sending.
  • AI-Powered: Generates unique opening lines for each email to improve open rates.
  • Error Handling: Automatically handles failed sends and logs errors.
  • Scalable: Can handle hundreds of rows (with proper time-spacing).

🛠️ The Workflow Logic

n8n Workflow Diagram

  1. Trigger: Manual execute or Scheduled (Cron).
  2. Google Sheets Node: Reads the "Leads" sheet.
  3. Loop Node: Iterates through each row.
  4. If Node: Status != "sent"?
    • True: Proceed to send.
    • False: Skip row.
  5. AI Agent (Groq): "Write a short, professional opening line for [Company Name]."
  6. Gmail Node: Sends email with the generated content.
  7. Google Sheets Node: Updates Status column to sent.
  8. Wait Node: Pauses for 180-300 seconds (Safety Buffer).

🚀 Setup Instructions

Prerequisites

  • n8n (self-hosted or cloud)
  • Google Cloud Console Project (with Gmail & Sheets API enabled)
  • Groq API Key (for AI features)

Installation

  1. Import the Workflow:

    • Download agency_coldEmails.json from this repo.
    • Open your n8n dashboard → Click "Import from File".
    • Select the JSON file.
  2. Configure Credentials:

    • Gmail: Add your OAuth2 credentials or App Password.
    • Google Sheets: Authenticate your account.
    • Groq: Add your API key.
  3. Prepare Your Sheet:

    • Create a Google Sheet with these columns: Name | Email | Website | Status
    • Paste the Sheet ID into the Google Sheets node.
  4. Run:

    • Click "Execute Workflow" to start the campaign.

⚙️ Configuration Tips

Safety Settings (Crucial)

To avoid Gmail spam filters, I have configured the workflow with conservative limits:

  • Delay: I have add delay of just 15 sec for 100 email but it is advisable to add 3 minutes minimum between emails for 100+ emails.
  • Batch Size: Process 20-30 leads per run.

AI Customization

You can modify the "System Prompt" in the AI Agent node to change the tone of the emails (e.g., Formal vs. Casual).


🎯 Use Cases

  • Agency Outreach: Automating sales calls for digital marketing agencies.
  • Freelance Lead Gen: Selling niche lead lists (Real Estate, Healthcare) with outreach included.
  • Event Invites: Sending personalized invites to a guest list.

📬 Contact

Shivam
Engineering Student @ DTU

I am available for freelance work to build custom n8n automations for your business.


📜 License

MIT License - Workflow JSON is free to use.

About

Intelligent Cold Email Automation workflow built with n8n. Features AI personalization (Groq), duplicate prevention logic, and randomized "human-like" delays to bypass spam filters. Syncs real-time status with Google Sheets. Perfect for automating B2B outreach campaigns safely.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors