🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Apify + Gmail: send cold emails, log in Sheets

Lisa Granqvist Partner Workflow Automation Expert

You find leads, then the “simple part” starts. Copy the website, hunt for an email, paste into a sheet, write a message, send it, update the status, follow up, repeat. It’s slow, and it’s the kind of slow that quietly kills consistency.

This Apify Gmail automation hits agency owners hardest because pipeline is oxygen. A freelancer doing outreach between client work feels it too. Same for marketing managers who want lead gen running without babysitting a spreadsheet.

This workflow pulls fresh B2B leads, uses AI to extract contact emails, sends personalized cold emails through Gmail, then logs every send and status in Google Sheets (with Telegram alerts). You’ll see what it automates, what results to expect, and what to watch out for.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Apify + Gmail: send cold emails, log in Sheets

The Problem: Cold outreach turns into spreadsheet labor

Cold email outreach sounds straightforward until you do it at volume. You scrape a list, half the websites are junk, the “contact” page is buried, and you end up guessing emails or skipping good leads because you’re short on time. Then you send messages inconsistently because writing personal intros is tiring after the tenth tab. And the real kicker: tracking. If you don’t log every send, you lose control of follow-ups and you can’t tell what worked last week.

The friction compounds. Not because one step is hard, but because there are too many steps that demand attention.

  • Lead scraping and cleanup turns into an hour of “just checking websites” before you even start emailing.
  • Email addresses get missed or copied wrong, which leads to bounces and wasted sends.
  • Personalization often gets skipped, so your emails read generic and replies dry up.
  • Status tracking breaks the moment you’re busy, so follow-ups happen late (or never).

The Solution: Scrape leads, extract emails, send, and log automatically

This workflow turns outreach into a controlled, repeatable system. You start by entering a keyword and location (for example, “marketing agencies in London”) through a form trigger. n8n sends that query to Apify via an HTTP request, pulls back businesses and websites, and filters out records that don’t look usable. Next, an AI extractor scans what it has (website text, structured fields, whatever Apify returns) and pulls out contact emails. If the email passes a format check, the workflow writes the lead into Google Sheets, drafts a personalized cold email using an OpenAI chat model based on your chosen tone, adds send metadata, and sends through Gmail. Finally, it updates the sheet with send status and pings you in Telegram so you can monitor progress live.

The workflow starts with your search criteria and ends with a sent email plus a spreadsheet row you can trust. In the middle, it batches leads, pauses between sends, and uses AI where it actually helps: extracting emails and writing first drafts that don’t sound like a template.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you want to email 40 fresh leads every week. Manually, you might spend about 5 minutes per lead finding a usable site and a contact email, then another 5 minutes writing and sending, plus 1 minute logging status. That’s roughly 7 hours of repetitive work. With this workflow, you spend about 10 minutes entering your search and reviewing the sheet, then let n8n process and send in the background with built-in pauses. You’re still in control, but you’re not stuck doing the typing.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Apify to scrape targeted B2B business records
  • Gmail to send outreach from your mailbox
  • Google Sheets for lead logging and send tracking
  • OpenAI API key (get it from the OpenAI dashboard)
  • Apify API token (get it from Apify Console settings)
  • Telegram bot token + chat ID (get it from BotFather and your chat)

Skill level: Intermediate. You’ll connect accounts, map a Google Sheet, and tweak AI prompts for your offer.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

You submit a search request. The workflow starts from a form input trigger (or manual run) where you enter the business type and location you want to target.

Leads are scraped and cleaned. n8n calls Apify through an HTTP request, then filters website records so you aren’t wasting time on blank sites, duplicates, or obviously low-quality entries.

AI finds emails and writes the draft. An information extractor pulls contact emails, then an email format check keeps bad addresses from entering your pipeline. A chat model drafts the outreach message and a composer shapes it into a send-ready email with your tone.

Gmail sends and Sheets becomes your source of truth. The workflow sends emails with a short pause between messages, updates each row in Google Sheets with the current status, and sends Telegram notifications so you can spot failures quickly.

You can easily modify the email tone and the Google Sheets columns based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Form Trigger

Set up the form that initiates lead collection and launches the API lookup.

  1. Add and open Form Input Trigger.
  2. Set Form Title to Lead Collect Tool and Form Description to Provide the info below....
  3. Configure form fields in Form Fields with labels and placeholders: Business Type, Location, Lead Number (number), and Email Style (dropdown options: Friendly, Professional, Simple).
  4. Set Options → Button Label to Submit GO 🚀.
  5. Connect Form Input Trigger to External API Request.

Step 2: Configure Lead Retrieval from the External API

Use the submitted form data to request lead records from the external API and filter valid websites.

  1. Open External API Request and set URL to https://api.apify.com.
  2. Enable Send Body and set Specify Body to json.
  3. Set JSON Body to the provided payload using form expressions, including {{ $json.Location }}, {{ $json['Lead Number'] }}, and {{ $json['Business Type'] }}.
  4. Open Filter Website Records and add a condition that checks leftValue ={{ $json.website }} exists.
  5. Connect External API RequestFilter Website Records.

Step 3: Connect Google Sheets

Store leads and update status in Google Sheets as the workflow progresses.

  1. Open Add Sheet Entry and set Operation to append.
  2. Map columns to values using expressions like {{ $('Filter Website Records').item.json.title }} for Company Name and {{ $json.output['Email Address'] }} for Email Address.
  3. Open Upsert Sheet Status and set Operation to appendOrUpdate with Matching Columns set to Email Address.
  4. Map SEND Time to {{ $('Set Send Metadata').item.json['Send Time'] }} and Cold Mail Status to .
  5. Connect Email Format CheckAdd Sheet Entry and Upsert Sheet StatusBatch Iterator.

Credential Required: Connect your Google Sheets credentials in Add Sheet Entry and Upsert Sheet Status.

⚠️ Common Pitfall: Both documentId and sheetName are empty in Add Sheet Entry and Upsert Sheet Status. Select the correct spreadsheet and sheet before running the workflow.

Step 4: Set Up AI Extraction, Validation, and Email Drafting

Extract emails from websites, validate format, iterate through leads, and generate cold emails with AI.

  1. Open Email Extractor AI and set Text to Website: {{ $json.website }}.
  2. Ensure OpenAI Chat Engine is connected as the language model for Email Extractor AI; add credentials to OpenAI Chat Engine.
  3. Configure Email Format Check to validate leftValue ={{ $json.output['Email Address'] }} contains @.
  4. In Batch Iterator, keep default settings to process leads in batches, and connect Add Sheet EntryBatch Iterator.
  5. Insert Pause for Response after Batch Iterator (second output) to control timing, then connect it to Cold Email Composer.
  6. Open Cold Email Composer and keep the provided prompt, ensuring expressions like {{ $('Batch Iterator').item.json['Company Name'] }} and {{ $('Form Input Trigger').item.json['Email Style'] }} are preserved.
  7. Ensure OpenAI Draft Engine is connected as the language model for Cold Email Composer; add credentials to OpenAI Draft Engine.

Credential Required: Connect your OpenAI credentials in OpenAI Chat Engine and OpenAI Draft Engine. Add credentials to these parent nodes, not to Email Extractor AI or Cold Email Composer.

Step 5: Configure Email Dispatch and Notifications

Send the generated email, update sheet status, and notify Telegram in parallel.

  1. Open Set Send Metadata and set Send Time to {{$now.toFormat("dd-MM-yyyy (h:mm:s a)")}} and Email Address to {{ $('Pause for Response').item.json['Email Address'] }}.
  2. Open Dispatch Email and set Send To to {{ $json['Email Address'] }}, Subject to {{ $('Cold Email Composer').item.json.output['Mail Subject'] }}, and Message to {{ $('Cold Email Composer').item.json.output['Mail Body'] }}.
  3. Confirm Dispatch Email outputs to both Upsert Sheet Status and Telegram Status Notice in parallel.
  4. Open Telegram Status Notice and keep the message template using expressions like {{ $('Batch Iterator').item.json['Company Name'] }} and {{ $('Set Send Metadata').item.json['Email Address'] }}.

Credential Required: Connect your Gmail credentials in Dispatch Email.

Credential Required: Connect your Telegram credentials in Telegram Status Notice.

Tip: Keep the email generation prompt in Cold Email Composer consistent to prevent missing Mail Subject or Mail Body outputs.

Step 6: Test and Activate Your Workflow

Run a manual test to verify end-to-end functionality before activating the workflow.

  1. Click Execute Workflow and submit a sample entry via Form Input Trigger.
  2. Verify that External API Request returns data and Filter Website Records passes items with a website.
  3. Confirm that Email Extractor AI outputs a valid email and Email Format Check routes it to Add Sheet Entry.
  4. Ensure Dispatch Email sends an email and that Upsert Sheet Status and Telegram Status Notice both run in parallel.
  5. When satisfied, toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Apify credentials can expire or the actor may require extra permissions. If things break, check your Apify token in n8n Credentials and confirm the actor still runs in Apify Console.
  • If you’re using Wait nodes or external scraping, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Gmail can be picky about sending patterns, especially from newer accounts. Keep the batch size modest at first, and make sure your “From” identity and signature are set up in Gmail before you automate sends.

Frequently Asked Questions

How long does it take to set up this Apify Gmail automation automation?

About an hour if your accounts and sheet are ready.

Do I need coding skills to automate Apify Gmail automation?

No. You will mostly connect accounts and adjust a few prompts and column mappings.

Is n8n free to use for this Apify Gmail automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API usage (often a few cents per batch of emails) and Apify run costs depending on your actor and volume.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Apify Gmail automation workflow for a different email tone and follow-up message?

Yes, and you should. Change the tone by editing the prompt used in the OpenAI Draft Engine and Cold Email Composer nodes, then add a second “follow-up” branch that reuses the same lead row from Google Sheets. Common tweaks include inserting a custom opener based on industry, swapping “friendly” to “professional,” and adding a conditional that skips sending if a lead already has a “Sent” status.

Why is my Gmail connection failing in this workflow?

Most of the time it’s an expired or revoked Google authorization in n8n. Reconnect the Gmail credential, then confirm the Gmail node is using the right Google account and “From” alias. It can also fail if your Google Workspace admin blocks third-party access, or if Gmail flags the send as suspicious after a big spike. If it works for a few emails and then stops, slow the batch down and reduce daily volume.

How many leads can this Apify Gmail automation automation handle?

It depends on your n8n plan and how cautious you want to be with Gmail, but handling a few hundred leads a week is realistic for many setups.

Is this Apify Gmail automation automation better than using Zapier or Make?

For this workflow, n8n is usually a better fit because the logic is not just “trigger then send.” You’ve got batching, filters, an email format gate, AI extraction, AI drafting, and status upserts back into Google Sheets. Zapier and Make can do parts of that, but costs climb fast once you add branching and high task volume. Also, self-hosting in n8n changes the math if you run outreach every day. If you only need a simple “new row in Sheets → send email” flow, Zapier can be quicker. Talk to an automation expert if you want help choosing.

Set it up once, then let your outreach run with guardrails. The workflow handles the repetitive parts, and you keep the visibility in Sheets and Telegram when it matters.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal