What This Workflow Does
This workflow checks if email addresses are real by looking at their format.
It then gets the domain part after the @ from each email.
It can work on many emails at once, fast and easy.
The output shows if each email is valid and its domain next to the original email.
This helps you clean your list so emails don’t bounce and waste effort.
Tools and Services Used
- Manual Trigger node: Starts the workflow when you want to test or run.
- Debug Helper node: Creates fake email data for testing in randomData category.
- Set node: Uses expressions to check email validity and extracts domain part.
- Sticky Notes: Adds explanations inside the workflow to help users understand steps.
No external API keys or services are required as n8n’s built-in functions handle email validation.
Users interested in self-host n8n can host their instance fully controlled.
Inputs, Processing, and Output
Inputs
The workflow starts with no data input needed manually.
Either fake email data is generated by the Debug Helper, or real email lists are imported by the user later.
Processing
- The workflow triggers manually.
- Debug Helper generates many email addresses in a list.
- The Set node applies expressions to each email: checks if it is valid using
{{$json.email.isEmail()}}and extracts the domain with{{$json.email.extractDomain()}}.
Output
The workflow outputs a list where each item has three fields:
– The original email
– A true/false value if the email is valid
– The domain extracted from the email address
Who Should Use This Workflow
- People who collect many emails daily and want to avoid invalid contacts.
- Marketing teams wanting clean email lists for campaigns.
- Anyone who wants to understand email address domains quickly.
- Users with little programming knowledge wanting simple automation in n8n.
Beginner Step-by-Step: How to Use This Workflow in Production inside n8n
Step 1: Download the Workflow
- Use the Download button on this page to save the workflow file to your device.
Step 2: Import the Workflow into n8n
- Open the n8n editor.
- Choose “Import from File” and select the downloaded workflow file.
Step 3: Configure the Workflow
- Add any required credentials or API keys if you replace Debug Helper with real data sources.
- Update any IDs, emails, channels, folders, or tables as needed in your nodes.
Step 4: Test the Workflow
- Run the workflow using the Manual Trigger node.
- Check the outputs for valid email results and domain extraction.
Step 5: Activate the Workflow
- When workflow works as expected, save and click “Activate” in n8n to run automatically or via schedules.
Step-by-Step Guide to Build This Workflow
Step 1: Add a Manual Trigger Node
Navigate to Nodes → Core Nodes → Select Manual Trigger.
This node allows you to manually start the workflow for testing. Leave parameters empty as no input is needed here.
You should see this node waiting for a manual trigger when running the workflow.
Common mistake: Forgetting to connect this node to your data-generation node, resulting in a workflow that doesn’t proceed.
Step 2: Generate Sample Email Data Using Debug Helper Node
Add the Debug Helper node from the Core category. Set its category to randomData and select email as the random data type.
This node simulates incoming email data for testing.
Random sample emails appear, like “[email protected]” and “[email protected]” helping you preview how the workflow handles data.
Common mistake: Not replacing this node with your actual email data source before deployment.
Step 3: Connect Manual Trigger to Generate Random Data
Drag a connection from the Manual Trigger node output to the Debug Helper node input.
This linkage ensures initiating the workflow runs the data generation step.
Trigger the workflow test to ensure it generates random emails.
Step 4: Add a Set Node to Process Email Validation and Domain Extraction
Add the Set node. In its parameters, use expressions to:
- Check if the email is valid:
{{$json.email.isEmail()}} - Extract the domain:
{{$json.email.extractDomain()}} - Pass along the original email:
{{$json.email}}
It outputs new fields: Valid EmailIs email, Extract Domain, and email.
Visual Tip: The node interface shows these fields as strings with dynamic expressions.
Common mistake: Using incorrect expression syntax or forgetting the equals sign (=) at the start.
Step 5: Connect Generate Random Data to Set Node
Link the output from the Debug Helper node to the input of the Set node.
This passes the simulated emails for validation and extraction.
Step 6: Add Sticky Notes for Documentation
Add Sticky Note nodes to explain your workflow internally.
In one note, mention the purpose: “Email Validation and extract domain.”
Include instructions to replace the debug data with real data.
In another note, remind users to replace the generate random data node when deploying.
Sticky Notes keep your workflow informative, especially helpful for teams or future you.
Step 7: Running and Testing the Workflow
Click the Test Workflow button in n8n.
The Workflow runs and outputs email validation and domain extraction results in the Set node’s output panel.
Expect to see fields such as “Valid EmailIs email” returning true or false, and the correct domain extracted for each email.
Customizations ✏️
Customize Output Field Names
Rename the fields in the Set node to more friendly names like “Is Email Valid” instead of “Valid EmailIs email.”
This makes data easier to work with in next steps.
Replace Debug Helper Node with Actual Data Source
Change the Debug Helper node to a real data source like Google Sheets, Airtable, or HTTP Request to use live email lists.
Add Conditional Branching for Invalid Emails
Insert an IF node after the Set node.
Check the field “Is Email Valid” to separate valid emails from invalid ones.
Send valid emails forward for campaigns.
Flag or discard invalid emails.
Troubleshooting 🔧
Problem: “Expression error: isEmail is not a function”
Cause: Expression missing the equals sign = or wrong syntax used in the expression editor.
Solution: Always start expression with =, example: {{$json.email.isEmail()}}.
Problem: Workflow does not trigger on clicking “Test workflow”
Cause: Manual Trigger node not connected or missing.
Solution: Check that Manual Trigger node is present and linked to the next node in the workflow.
Pre-Production Checklist ✅
- Make sure Manual Trigger node works and can start workflow on testing.
- Check Debug Helper node generates email data correctly.
- Verify Set node expressions correctly validate emails and extract domain.
- Run tests with different email formats including some that are invalid.
- Backup the workflow JSON file before moving to production.
Deployment Guide
Save the workflow and click “Activate” in n8n to enable automatic running.
Optionally, add a Cron node if you want to schedule validations regularly.
Check run history to catch errors fast.
Review output data to confirm emails are validated properly.
Summary
✓ Saves hours by automating email checks and domain extraction.
✓ Reduces errors from manual email list cleanup.
✓ Outputs clear results showing valid emails and their domains.
→ Helps trust your email lists for marketing and CRM imports.
→ Easy to replace test data with real email sources for real use.
