🎣 Sync leads from Google Sheets to instantly email campaigns with data tables

505 views · 🎣 Lead Generation & Enrichment

Description

🚀 Automated Lead Management: Google Sheets → Instantly + n8n Data Tables

📋 Overview

This workflow automates lead management by syncing data from Google Sheets to Instantly email campaigns while maintaining tracking through n8n Data Tables. It processes leads in batches to avoid rate limits and ensures no duplicates are sent.


⚙️ Complete Setup Guide

1️⃣ Create Your Google Sheet

Option A: Use Our Template (Recommended)

  1. Copy this template with test data: Google Sheets Template
  2. Click File → Make a copy to create your own version
  3. Populate with your lead data

Option B: Create Your Own Create a Google Sheet with these required columns:

💡 Pro Tip: Add as many leads as you want - the workflow handles batching automatically!


2️⃣ Set Up n8n Data Table

The workflow uses one Data Table to track leads and their sync status.

Create the “Leads” Data Table:

  1. In your n8n workflow editor, add a Data Table node
  2. Click “Create New Data Table”
  3. Name it: Leads
  4. Add the following columns:
Column NameTypePurpose
FirstnamestringContact’s first name
LastnamestringContact’s last name
emailstringContact’s email (unique identifier)
websitestringCompany website
companystringCompany name
titlestringJob title
campaignstringSync status (e.g., “start”, “added to instantly”)
focusareastringEnriched data from Title field
  1. Click Save

📌 Important: The campaign field is crucial - it tracks which leads have been synced to prevent duplicates!


3️⃣ Connect Your Google Sheets Account

  1. In the “Get row(s) in sheet” node, click “Create New Credential”
  2. Select Google Sheets OAuth2 API
  3. Follow the OAuth flow:
    • Sign in with your Google account
    • Grant n8n permission to access your sheets
  4. Select your spreadsheet from the dropdown
  5. Choose the correct sheet name (e.g., “instantly leads”)
  6. Test the connection to verify it works

4️⃣ Connect Your Instantly Account

  1. Go to Instantly.ai and log in
  2. Navigate to Settings → API
  3. Copy your API Key
  4. Back in n8n, open the “Create a lead” node
  5. Click “Create New Credential”
  6. Select Instantly API
  7. Paste your API key
  8. Important: Update the campaign ID:
    • Current ID: 100fa5a2-3ed0-4f12-967c-b2cc4a07c3e8 (example)
    • Replace with your actual campaign ID from Instantly
    • Find this in Instantly under Campaigns → Your Campaign → Settings

5️⃣ Configure the Data Table Nodes

You’ll need to update three Data Table nodes to point to your newly created “Leads” table:

Node 1: “Get row(s)”

Node 2: “Update row(s)1” (Top Flow)

Node 3: “Update row(s)” (Bottom Flow)


6️⃣ Configure the Schedule (Optional)

The workflow includes a Schedule Trigger for automation:

Default: Runs every hour

To customize:

  1. Click the “Schedule Trigger” node
  2. Choose your interval:
    • Every 30 minutes
    • Every 2 hours
    • Daily at specific time
    • Custom cron expression

💡 For testing: Use the “When clicking ‘Execute workflow’” manual trigger instead!


🔄 How It Works

Flow 1: Data Transfer (Top Path)

This flow moves leads from Google Sheets → n8n Data Table

Manual Trigger → Get Google Sheets → Batch Split (30) → Update Data Table → Loop

Step-by-step:

  1. Manual Trigger - Click to start the workflow manually
  2. Get row(s) in sheet - Fetches ALL leads from your Google Sheet
  3. Loop Over Items - Splits into batches of 30 leads
  4. Update row(s)1 - For each lead:
    • Searches Data Table by email
    • Updates or creates the lead record
    • Stores Titlefocusarea for enrichment
  5. Loop continues - Processes next batch until all leads transferred

⚙️ Why 30 at a time?


Flow 2: Instantly Sync (Bottom Path)

This flow syncs qualified leads from Data Table → Instantly

Schedule Trigger → Get Data Table (filtered) → Individual Loop → Create in Instantly → Update Status

Step-by-step:

  1. Schedule Trigger - Runs automatically (every hour by default)
  2. Get row(s) - Queries Data Table for leads where campaign = "start"
    • Only fetches NEW, unsynced leads
    • Ignores leads already processed
  3. Loop Over Items1 - Processes ONE lead at a time
  4. Create a lead - Sends lead to Instantly:
    • Campaign: “Launchday 1”
    • Maps: Email, Firstname, Company, Website
    • Adds to email sequence
  5. Update row(s) - Updates Data Table:
    • Sets campaign = "added to instantly"
    • Prevents duplicate sends on next run
  6. Loop continues - Next lead until all processed

🔍 Why one at a time?


✅ Key Features Explained

Batch Processing

Duplicate Prevention

Data Enrichment

Two-Trigger System

Error Tolerance


🧪 Testing Your Workflow

Step 1: Test Data Transfer (Flow 1)

  1. Add 5 test leads to your Google Sheet
  2. Click the Manual Trigger node
  3. Click “Execute Node”
  4. Check your Leads Data Table - should see 5 new rows
  5. Verify focusarea field has data from Title column

Step 2: Test Instantly Sync (Flow 2)

  1. In Data Table, ensure at least one lead has campaign = "start"
  2. Click the Schedule Trigger node
  3. Click “Execute Node” (bypasses schedule for testing)
  4. Check Instantly dashboard - should see new lead(s)
  5. Check Data Table - campaign should update to "added to instantly"

Step 3: Test Duplicate Prevention

  1. Re-run the Schedule Trigger
  2. No new leads should be created in Instantly
  3. Data Table shows no changes (already marked as synced)

🚨 Troubleshooting

Issue: Google Sheets not fetching data

Issue: Data Table not updating

Issue: Instantly not receiving leads

Issue: Workflow runs but nothing happens


💡 Pro Tips & Best Practices

For Beginners:

  1. Start small - Test with 5-10 leads first
  2. Use manual trigger - Don’t enable schedule until tested
  3. Check each node - Execute nodes individually to debug
  4. Monitor Data Table - Use it as your source of truth
  5. Keep backups - Export Data Table regularly

For Optimization:

  1. Adjust batch size - Increase to 50-100 for large datasets
  2. Add delays - Insert “Wait” nodes if hitting rate limits
  3. Filter in Google Sheets - Only fetch new rows (use formulas)
  4. Archive old leads - Move synced leads to separate table
  5. Add error notifications - Connect Slack/email for failures

For Scaling:

  1. Use multiple campaigns - Add campaign selection logic
  2. Implement retry logic - Add “IF” nodes to retry failed syncs
  3. Add data validation - Check email format before syncing
  4. Log everything - Add “Set” nodes to track execution details
  5. Monitor API usage - Track Instantly API quota

📊 Expected Results

After Setup:

Performance Metrics:


📬 Need Help?

Customization Services:

Contact:


🎓 What You’ll Learn

By setting up this workflow, you’ll master:

n8n Data Tables - Creating, querying, and updating data
Batch Processing - Handling large datasets efficiently
API Integrations - Connecting Google Sheets and Instantly
Workflow Logic - Building complex multi-path automations
Error Prevention - Implementing duplicate checking
Scheduling - Automating workflows with triggers


Happy Flogramming! 🎉

🔗 Nodes Used

Google Sheets, Schedule Trigger, Data table

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup