Tutorial: Build a Smart Email Workflow with n8n - No Code Required

Jordy Kokelaar
Jordy Kokelaar
6 min read
Tutorial: Build a Smart Email Workflow with n8n - No Code Required

Tutorial: Build a Smart Email Workflow with n8n - No Code Required

Skill Level: Beginner | Time to Complete: 50 minutes

Do you find yourself sending the same types of email responses over and over again? Maybe you're a freelancer sending similar quotes, or a business owner responding to common inquiries. In this step-by-step tutorial, I'll show you how to set up an automated email response system using n8n - a powerful but user-friendly workflow automation tool.

What is n8n?

n8n is an open-source workflow automation tool that connects different apps and services. Think of it as building blocks that let different parts of your digital life talk to each other. The best part? It has a free self-hosted option and a visual interface that doesn't require coding skills!

What We'll Build

We're going to create a system that:

  1. Monitors a specific email inbox
  2. Identifies emails with certain keywords
  3. Sends appropriate pre-written responses
  4. Logs the interaction for your records

What You'll Need

  • An n8n account (free to set up)
  • Access to your email account (Gmail works best for beginners)
  • About 30 minutes of your time

Step 1: Setting Up Your n8n Account

  1. Head over to n8n.io and create a free account
  2. Once logged in, you'll see the main dashboard. This is your workflow canvas.
  3. Click "Create New Workflow" and name it something like "Email Responder"

Step 2: Setting Up the Email Trigger

  1. In your new workflow, click the "+" button to add your first node
  2. Search for "Email" and select "Email Trigger (IMAP)"
  3. You'll need to add your email credentials:
    • Host: For Gmail, use "imap.gmail.com"
    • Port: 993
    • User: Your full email address
    • Password: Your email password or app password (if you use 2FA)

💡 Tip: If you're using Gmail, you might need to create an "App Password" in your Google Account settings under Security > 2-Step Verification > App passwords.

  1. Configure the "Email Trigger" settings:

    • Check interval: 10 (checks every 10 minutes)
    • Only unseen emails: True (only processes new emails)
    • Mark as read: True (marks emails as read after processing)
  2. Click "Execute Node" to test the connection - it should pull your recent emails

Step 3: Adding a Filter

  1. Click the "+" after your Email Trigger to add a new node
  2. Search for and select "IF"
  3. In the IF node, we'll set up conditions to identify different types of emails:
    • For the condition, select "String" and "Contains"
    • In the "Value 1" field, enter {{$node["Email Trigger (IMAP)"].json["subject"]}}
    • In the "Value 2" field, enter a keyword like "quote" or "pricing"

Step 4: Setting Up Automated Responses

  1. After the IF node, click "+" on the "True" output to add a response action
  2. Search for "Email" and select "Email (Send)"
  3. Configure your sending email (similar to the trigger setup)
  4. In the message fields:
    • To: {{$node["Email Trigger (IMAP)"].json["from"]}} (sends back to original sender)
    • Subject: Re: {{$node["Email Trigger (IMAP)"].json["subject"]}}
    • Text: Write your standard response here. For example:
      Hi {{$node["Email Trigger (IMAP)"].json["from"].split("<")[0]}},
      
      Thanks for your inquiry about pricing! Here's our standard rate card:
      
      [Your pricing details]
      
      Let me know if you need any clarification.
      
      Best regards,
      [Your name]
      

Step 5: Adding a Second Condition (Optional)

  1. Go back to your IF node and click "Add Rule" to create a second condition
  2. Set up similar to the first but with different keywords (like "support" or "help")
  3. Create a different email response for this condition

Step 6: Activating Your Workflow

  1. In the top-right corner, toggle the "Active" switch to turn on your workflow
  2. n8n will now check your email at the interval you specified and respond accordingly

Step 7: Testing Your Setup

  1. Send yourself a test email with your trigger keyword in the subject
  2. Wait for the check interval to pass
  3. You should receive your automated response!

Troubleshooting Tips

  • Not receiving responses? Check your email security settings and make sure you've allowed access to less secure apps or created the proper app password.
  • Wrong responses being sent? Review your IF conditions and make sure they're specific enough.
  • Workflow not activating? Double-check that you've toggled the "Active" switch in the top-right corner.

Next Steps to Enhance Your Automation

Once you have the basic system working, consider these enhancements:

  • Add a Google Sheets node to log all automated responses
  • Create more specific conditions to handle different types of inquiries
  • Set up time-based rules so you don't send automated responses outside business hours

Conclusion

Congratulations! You've just built an automated email response system without writing a single line of code. This simple workflow can save you hours each week and ensure consistent, prompt responses to inquiries.

As you get more comfortable with n8n, you can create more complex workflows that connect multiple apps and services. The possibilities are virtually endless - from social media automation to data synchronization between different tools you use.

Have you built something cool with n8n? I'd love to hear about it in the comments!


This tutorial is part of our series on practical automation for non-technical users. Check out our other tutorials to learn more ways to save time and streamline your workflows.

Share this post

Jordy Kokelaar

Jordy Kokelaar

AI and automation expert working at Indappt