Double Opt-In Email Verification System with Google Sheets - n8n Workflow

Implement robust double opt-in using a core n8n workflow. Verify user emails, store data in Google Sheets, and ensure clean subscriber lists using this reliable n8n template.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Marketing professionals focused on list hygiene and minimizing spam sign-ups.
Technical users needing a comprehensive n8n workflow for user registration and verification.
Developers looking for secure, form-driven n8n templates.
Anyone required to use Google Sheets to manage verified user lists.

Overview

This comprehensive n8n workflow template addresses the critical need for email verification, ensuring that collected data is legitimate and active. Leveraging several core n8n nodes, this automation starts with a public-facing n8n Form, generates a unique verification code, and then uses Google Sheets to temporarily store the unverified entry. By implementing a secure loop and conditional checks, the n8n automation only confirms the user after they successfully input the received code. This sophisticated n8n workflow not only enhances data quality but also ensures compliance and improves delivery rates for future communications. This specific n8n template demonstrates advanced flow control capabilities within n8n.

How it Works

This n8n workflow executes a multi-step verification process:


  1. Initial Submission: The process begins with the On form submission n8n trigger, capturing the user's initial details via the Email Form n8n node.

  2. Code Generation & Storage: A unique verification code is created using the Generate Code n8n node. This code, along with the user's details, is immediately written to a Google Sheet via the Store Data n8n node, pending verification.

  3. Sending Verification: The Send Email n8n node dispatches an email containing the generated code and a link to the Verification Form n8n node.

  4. Verification Check: The user enters the code into the verification form. The Check Code If n8n node compares the submitted input against the stored unique token.

  5. Success Path: If the code matches (True branch), the user is routed to the Main Form n8n node, signifying successful verification, and the flow proceeds through the Continue With Your Flow n8n node.

  6. Failure/Retry Path: If the code fails to match (False branch), the user is presented with the Incorrect Code Form. This leads to the Second Check n8n node, which handles retry logic. If the user exceeds attempts or follows the reset path, the workflow guides them back to the Email Form n8n node via the Reset Form n8n node, effectively restarting the verification sequence to send a new code. This robust loop ensures reliability in the n8n workflow.

Installation Guide

To use this n8n template, follow these steps:


  1. Import: Copy the provided n8n workflow JSON and import it into your n8n instance.

  2. Credentials Setup: Configure the required credentials:

Google Sheets: You will need credentials for the Store Data n8n node. Ensure the service account has read/write access to your target spreadsheet.
Email Sending: Set up SMTP or use a dedicated n8n node like Gmail or SendGrid for the Send Email n8n node.

  1. Code Node Review: Review the Generate Code n8n node logic to ensure the code generation meets your security requirements.

  2. Form Configuration: Customize the content and fields within the six n8n Form nodes (Email Form, Verification Form, Main Form, etc.) to match your branding and required input fields. Note the specific webhook IDs generated for the form triggers, as these will be the public endpoints for interaction.

  3. Activation: Save the n8n workflow and set it to 'Active' to start listening for submissions.

Node Details

On form submission (n8n trigger): The initial n8n trigger that starts the whole process. It waits for data submission from an external source or directly from the initial Email Form n8n node.
Email Form, Verification Form, Main Form, Incorrect Code Form, Reset Form (n8n Form nodes): These multiple n8n node components serve as the user interface, prompting the user at various stages of the double opt-in process and capturing required data.
Generate Code (n8n Code node): Function: Crucial step for generating a unique, temporary verification code (e.g., a short token or UUID) that is sent to the user.
Store Data (Google Sheets n8n node): Function: Records the new subscriber's email and the generated verification code. Key Configuration: Must specify the Spreadsheet ID and Sheet Name where the data is temporarily logged.
Send Email (Email Send n8n node): Function: Transmits the personalized email containing the verification code and the link to the Verification Form webhook URL.
Check Code (If n8n node): Function: Compares the code submitted by the user on the Verification Form with the code stored in the workflow data, determining the success or failure path.


  • Second Check (If n8n node): Function: Manages the retry logic and determines whether the user is redirected to the final confirmed form or must restart the initial verification step.

Related n8n Workflows

Paid

Nodes: 8 Nodes
Updated: December 26 2025
View all

Featured*