Google Sheets + SMTP: cleaner double opt-in leads
Your lead list looks “fine” until you send a campaign and get slammed with bounces, spam traps, and typo emails that never should’ve made it in.
double opt-in automation fixes that at the source. A marketing manager trying to protect deliverability feels it first. A small business owner watching ad spend leak into fake signups feels it too. And if you run client funnels, you already know the awkward “your list quality is the issue” conversation.
This workflow uses n8n + Google Sheets + SMTP to verify every new email with a 6-digit code before the person reaches your real signup form. You’ll see how it works, what you need, and what to tweak for your brand.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Sheets + SMTP: cleaner double opt-in leads
flowchart LR
subgraph sg0["Form Submit Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Form Submit Trigger"]
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Email Capture Form"]
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Create Verification Token"]
n3@{ icon: "mdi:message-outline", form: "rounded", label: "Dispatch Verification Email", pos: "b", h: 48 }
n4@{ icon: "mdi:database", form: "rounded", label: "Log Entry to Sheet", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Code Entry Form"]
n6@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Validate Token", pos: "b", h: 48 }
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Primary Signup Form"]
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Invalid Code Form"]
n9@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Secondary Validation", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Reset Request Form"]
n11@{ icon: "mdi:cog", form: "rounded", label: "Continue Workflow Step", pos: "b", h: 48 }
n7 --> n11
n6 --> n7
n6 --> n8
n1 --> n2
n10 --> n1
n3 --> n5
n4 --> n3
n9 --> n7
n9 --> n10
n2 --> n4
n5 --> n6
n0 --> n1
n8 --> n9
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n6,n9 decision
class n4 database
class n2 code
classDef customIcon fill:none,stroke:none
class n0,n1,n2,n5,n7,n8,n10 customIcon
The Problem: Unverified Leads Ruin List Quality
Most lead forms are built for speed, not accuracy. Someone types “gmial.com,” hits submit, and your tools treat it like a real contact. Bots slip through when you’re running ads. Real people mistype their address on mobile, then wonder why they never get your follow-up. After that, the damage spreads: higher bounce rates, more “why didn’t I get the email?” support tickets, and campaigns that underperform because a chunk of your list was never reachable in the first place. It’s exhausting to debug because the problem started days ago at the form.
It adds up fast. Here’s where it usually breaks down in day-to-day marketing operations.
- You end up paying for leads that can’t ever convert because the email was wrong or fake.
- Teams manually clean lists in Google Sheets, which means the cleanup happens after the damage is already done.
- Campaign reporting gets noisy because “new leads” includes people who never confirmed they exist.
- Deliverability takes a hit over time, and the fix is slower than the decline.
The Solution: Verified Signups Stored in Google Sheets
This n8n workflow adds a clean verification layer before your main signup form ever appears. A visitor first submits their email in a lightweight entry form. n8n generates a unique 6-digit code, stores it in Google Sheets alongside the submission details (timestamp, execution ID, consent flag, and email), then sends the code via SMTP to prove they control that inbox. The visitor types the code into a second form, and the workflow validates it against the stored row in Sheets. If the code matches, they are allowed into your real primary form. If not, they get a clear “invalid code” path with another attempt and a reset option if they’re stuck.
The workflow starts with an n8n Form Trigger and an email capture form. From there, n8n creates the verification token, logs it to Google Sheets, and sends a verification email through your SMTP server. Finally, it validates the entered code and routes the user to the primary signup form, or to a retry/reset flow if they fail validation.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you collect about 50 leads a week from ads and partnerships. If even 10 of those are typos or junk, you’ll usually spend around 5 minutes per “bad lead” spotting it, fixing it, or emailing support, which is roughly an hour of cleanup weekly. With this workflow, the only manual moment is the visitor entering a code (about 1 minute on their side). You just review a clean Google Sheet and move on.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for storing codes and submissions
- SMTP email service to send verification codes reliably
- Google Sheets OAuth2 credential (create it inside n8n Credentials)
Skill level: Beginner. You’ll connect credentials, paste a Sheet ID, and edit a couple email and form messages.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Form submission starts the flow. A visitor hits your entry form (the workflow’s Form Submit Trigger) and provides their email, plus any basic consent checkbox you want to include.
A verification code is generated and saved. n8n creates a unique 6-digit token, then logs it to Google Sheets with useful context like timestamp and execution ID. This is your simple “database” for lookups and troubleshooting.
The verification email goes out via SMTP. The workflow sends the code to the address the person just entered, using your SMTP credentials and your chosen sender identity. That “From” matters more than people think, honestly.
Code entry decides what happens next. The visitor enters the code in a follow-up form. If the code matches what’s stored in Sheets, they’re routed to your primary signup form. If it doesn’t, they get an invalid-code path, another validation attempt, and a reset request option if needed.
You can easily modify the primary form fields to match your lead magnet, demo request, or registration flow based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Form Trigger
Start the workflow when a visitor submits the initial form.
- Add and open Form Submit Trigger.
- Copy the generated webhook URL from Form Submit Trigger and embed it in your front-end form submission flow.
- Connect Form Submit Trigger to Email Capture Form to match the execution flow.
Step 2: Configure Email Collection & Form Routing
This workflow uses multiple form nodes; configure them as a group while maintaining the defined routing.
- Open Email Capture Form and set up the fields required to collect the user’s email address.
- Open Code Entry Form and add a field for the verification code.
- Open Primary Signup Form and configure the final signup fields for confirmed users.
- Open Invalid Code Form to explain the invalid code state and provide a retry path.
- Open Reset Request Form to let users request a new verification token.
- Confirm the flow: Form Submit Trigger → Email Capture Form → Create Verification Token.
Step 3: Set Up Token Creation & Validation Logic
Generate a verification token and validate it before allowing users to continue.
- Open Create Verification Token and implement token generation logic in the code editor.
- Ensure Create Verification Token outputs the token and email for downstream nodes.
- Open Validate Token and configure the IF conditions to compare the submitted code against the stored token.
- Confirm the pathing: Code Entry Form → Validate Token → Primary Signup Form (true) and Invalid Code Form (false).
- Open Secondary Validation and set conditions to route retry attempts either back to Primary Signup Form or to Reset Request Form.
Step 4: Connect Google Sheets Logging
Log verification requests to a spreadsheet before sending the email.
- Open Log Entry to Sheet and select the target spreadsheet and worksheet.
- Map the incoming email and token values from Create Verification Token to the appropriate columns.
- Keep the flow: Create Verification Token → Log Entry to Sheet → Dispatch Verification Email.
- Credential Required: Connect your Google Sheets credentials.
Step 5: Configure the Verification Email Output
Send the verification email to the user with the generated token.
- Open Dispatch Verification Email and set the To field to the captured email from Email Capture Form.
- Compose the subject and body to include the verification token output from Create Verification Token.
- Confirm the routing to Code Entry Form after email dispatch.
- Credential Required: Connect your Email (SMTP) credentials.
Step 6: Final Routing & Completion Step
After successful verification, the workflow proceeds to the completion step.
- Confirm Primary Signup Form routes directly to Continue Workflow Step.
- Use Continue Workflow Step as a handoff point for downstream automations (e.g., CRM sync or onboarding).
Step 7: Test and Activate Your Workflow
Run end-to-end tests to ensure the double opt-in loop works correctly.
- Use Execute Workflow from Form Submit Trigger and submit a test email in Email Capture Form.
- Verify a new row appears in Log Entry to Sheet and the email is sent from Dispatch Verification Email.
- Submit the token in Code Entry Form and confirm Validate Token routes to Primary Signup Form.
- Test an invalid token to confirm Invalid Code Form → Secondary Validation routes to Reset Request Form when needed.
- When everything works, switch the workflow to Active for production use.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check n8n’s Credentials page and confirm the connected Google account can edit the target spreadsheet.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- SMTP providers may silently block or throttle messages that look “template-y.” If codes aren’t arriving, check your SMTP logs/spam folder, and personalize the subject and first line so it doesn’t look like bulk mail.
Frequently Asked Questions
About 30 minutes if your Google Sheets and SMTP credentials are ready.
No. You’ll mostly connect accounts and edit a few form and email messages.
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 SMTP provider costs (often free to low-cost, depending on volume).
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.
Yes, and it’s straightforward. Keep the Email Capture Form and Code Entry Form as-is, then customize the Primary Signup Form fields for your newsletter (first name, interests, GDPR consent). You can also change the email copy in the Dispatch Verification Email node to match your brand voice and add a support reply-to. Common tweaks include changing the code message wording, adding code expiration logic, and tagging verified rows in Google Sheets.
Usually it’s the OAuth credential or sheet permissions. Reconnect the Google Sheets OAuth2 credential in n8n and confirm that same Google account can edit the spreadsheet and the specific tab you selected in the “Store Data” step. If the Sheet ID was pasted wrong, you’ll also see “not found” style errors.
A lot more than most small lists need. On n8n Cloud Starter, you’re limited by monthly executions, and each verification flow can take several executions because it includes multiple forms and checks. If you self-host, there’s no execution cap, so the practical limit is your server and how quickly your SMTP provider will send emails.
Often, yes. This flow has multiple user interactions (capture form, code entry form, retry path, reset path), plus conditional branching, and n8n handles that kind of logic cleanly without turning into a tangle of separate Zaps or scenarios. You also get the option to self-host, which matters when volume grows and execution pricing becomes a thing. Zapier or Make can still be fine for very simple “submit form → send email” automations, but double opt-in is usually more than that. If you want a second opinion on what’s easiest for your stack, Talk to an automation expert.
Clean lists aren’t glamorous, but they make everything else work better. Set this up once, and your future campaigns stop paying the price for today’s sloppy signups.
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.