Email Automation Workflow
1. Purpose
This workflow runs a campaign email pipeline from Google Sheets: optional platform / page audit, template merge, filtered recipient send via SMTP, and sheet updates for sent / failed status. It is used for outreach campaigns where rows in a campaign sheet drive who gets emailed and when.
Path in n8n: Personal / Email automation
Status: Active
2. Trigger
Type: Manual
Details:
Node: Manual Trigger
Follow-up: USER INPUT - edit before run - set campaign / run parameters in n8n before executing.
Operators start the workflow from the Editor when a campaign is ready (audit + send, or send-only).
3. Step-by-Step Process
Step 1: Manual Trigger
What happens here: Operator starts the workflow.
Why this step is needed: Campaign sends are intentional, not cron-driven.
Step 2: USER INPUT - edit before run
What happens here: Capture / confirm run parameters (campaign id, skip-audit flag, send-now vs wait, etc.) before the rest of the flow.
Why this step is needed: Same canvas supports audit-only, send-only, and full runs without editing many nodes.
Step 3: Read Campaign Data for Audit
What happens here: Reads campaign rows from Google Sheets for the audit phase.
Why this step is needed: Platform URLs and recipient rows come from the campaign sheet.
Step 4: Skip Audit?
What happens here: IF branch - skip audit and jump to send phase, or continue into platform audit.
Branches:
- Skip - go to Start Send Phase
- Do not skip - continue to dedupe / platform audit
Step 5: Dedupe Platform URLs
What happens here: Code step removes duplicate platform URLs so each site is audited once.
Step 6: Has Platform?
What happens here: IF - if there is no platform to audit, jump to send phase; otherwise enter the platform loop.
Step 7: Loop One Platform at a Time (audit loop)
Inside the loop:
- Wix / DNS Page Audit API - HTTP call to audit the platform / page
- Parse Audit Results - normalize API response
- Expand to All Matching Rows - map audit result back onto all campaign rows for that platform
- Update Campaigns Sheet - write audit findings to Google Sheets
- Wait 1s - rate-limit between platforms
Why this step is needed: Enrich campaign rows with host / DNS / Wix-style audit data before emailing.
Step 8: Start Send Phase
What happens here: Marks the transition from audit to email send (also entry when audit was skipped).
Step 9: Read Email Templates
What happens here: Loads email templates from Google Sheets.
Step 10: Re-read Campaign Data for Send
What happens here: Reloads campaign sheet (including any audit updates) before filtering recipients.
Step 11: Filter Unsent + CampaignID
What happens here: Keeps only unsent rows for the selected campaign id.
Why this step is needed: Prevents duplicate sends on re-runs.
Step 12: Build Email from Template
What happens here: Code step merges recipient / campaign fields into the template body and subject.
Step 13: Send Now?
What happens here: IF - send immediately or wait until a scheduled send time.
Branches:
- Wait - Wait until Send Time, then continue
- Send now - go straight to recipient loop
Step 14: Loop One Recipient at a Time
Inside the loop:
- Send via SMTP - send the built email
- On success - Mark Sent (update Google Sheet)
- On failure - Mark Failed (update Google Sheet)
- Wait 2s (debouncing) - pace SMTP / sheet writes
Why this step is needed: Controlled one-by-one send with durable status in the sheet.
4. Workflow Logic Summary
- Operator starts run and confirms user inputs
- Optionally audit each unique platform URL and write results to the campaign sheet
- Load templates and re-read campaign rows
- Filter to unsent rows for the campaign
- Build each email from template
- Wait until send time if needed, then send via SMTP one recipient at a time
- Mark sent or failed back on the Google Sheet
5. Diagram / Screenshot
High-level flow:
Manual Trigger
-> USER INPUT - edit before run
-> Read Campaign Data for Audit
-> Skip Audit?
yes -> Start Send Phase
no -> Dedupe Platform URLs
-> Has Platform?
no -> Start Send Phase
yes -> Loop platforms:
Audit API -> Parse -> Expand rows
-> Update Campaigns Sheet -> Wait 1s
-> Start Send Phase
-> Read Email Templates
-> Re-read Campaign Data for Send
-> Filter Unsent + CampaignID
-> Build Email from Template
-> Send Now?
no -> Wait until Send Time
yes -> (continue)
-> Loop recipients:
Send via SMTP -> Mark Sent / Mark Failed -> Wait 2s
6. Dependencies
Google Sheets
- Campaign data (audit + send)
- Email templates
- Sent / failed status columns
- Requires Auth: Yes (Google Sheets OAuth in n8n)
SMTP
- Purpose: Deliver campaign emails
- Node: Send via SMTP
- Requires Auth: Yes (SMTP credentials in n8n)
Page / Platform Audit API
- Purpose: Wix / DNS style page audit per platform URL
- Node: Wix / DNS Page Audit API (HTTP)
- Requires Auth: As configured on the HTTP node / API key in n8n
External Services
| Service | Role |
|---|---|
| Google Sheets | Campaign + templates + status |
| SMTP provider | Outbound email |
| Audit / page API | Platform URL checks |
7. Source Links
n8n Instance
Workflow URL: https://agent.fsgarage.in/workflow/705c1VbvDQeEsink
Workflow Name: Email automation
Workflow ID: 705c1VbvDQeEsink
n8n Instance URL: https://agent.fsgarage.in
Related Workflows
- Zoho CRM Automation - Hourly Zoho leads to Google Sheets
- Lemlist Brevo Sync - Contact sync for marketing lists
- Workflows Index - View all workflows
- Workflow Template - Template for new workflow docs