This template implements a professional Double Opt-In email verification system using Google Sheets as a database. The workflow collects user emails, generates unique verification codes, stores them securely, and validates user access before proceeding with your main form.
How it Works
- User submits their email through an initial form
- System generates a unique 6-digit verification code
- Code is stored in Google Sheets along with user data
- Verification email is sent to the user
- User enters the code to verify their email
- Upon successful verification, user accesses the main form
Setup
Follow these steps to configure the workflow:
1. Google Sheets Configuration
Create a Google Sheets spreadsheet with the following columns:
Column Name |
Data Type |
Description |
Start Date |
String |
Timestamp of form submission |
ID |
String |
Workflow execution ID |
Accepts Terms |
String |
Terms acceptance flag |
Email |
String |
User's email address |
Code |
String |
6-digit verification code |
2. Google Sheets Connection
- In n8n, go to Credentials
- Add new credential for Google Sheets OAuth2
- Follow the OAuth2 authorization flow
- In the workflow, update the "Store Data" node:
- Replace
YOUR_GOOGLE_SHEET_ID
with your spreadsheet ID
- Select the correct sheet tab
3. SMTP Configuration
- Add SMTP credentials in n8n:
- Go to Credentials > Add new > SMTP
- Enter your SMTP server details
- Configure port, username, and password
- Update the "Send Email" node:
- Change sender email to your domain
- Customize subject line and message body
- Set reply-to address
4. Form Customization
- Entry Form: Customize the title and privacy policy text
- Email Form: Update the description for your use case
- Verification Form: Modify instructions as needed
- Main Form: Add or modify fields for your requirements
Configuration
Email Settings
- From Email: Replace
[email protected]
with your sender address
- Subject: Customize the verification email subject
- Message: Personalize the email template with your branding
- Reply-To: Set your support email address
Form Messages
- Update all form descriptions to match your brand voice
- Customize button labels
- Modify error messages for better user experience
Benefits
- GDPR Compliance: Ensures legitimate user consent
- Spam Reduction: Validates email ownership
- Data Quality: Maintains clean contact lists
- User Trust: Professional verification process
Use Cases
- Newsletter subscriptions
- User registration flows
- Marketing campaign sign-ups
- Lead generation forms
- Event registrations
Error Handling
The workflow includes:
- Invalid code detection
- Second attempt opportunity
- Process restart option after multiple failures
- Clear error messaging
Security Features
- Unique 6-digit codes for each session
- Temporary code storage
- Validation against stored data
- Multiple attempt limits
Tags
Double Opt-In, Email Verification, Forms, Google Sheets, GDPR, Data Protection, Email Marketing, Lead Generation
Requirements
- n8n v1.0+
- Google Sheets account
- SMTP server access
- Basic understanding of n8n workflows
Support
For questions or issues with this template:
- Check the sticky notes in the workflow for detailed explanations
- Review the setup instructions above
- Ensure all credentials are properly configured
- Test with a personal email address first
Best Practices
- Test the complete flow before going live
- Monitor Google Sheets for verification attempts
- Set up email delivery monitoring
- Consider implementing code expiration (advanced feature)
- Keep form messages clear and concise