Self-Hosted Email Automation Guide using n8n

Email icon connected to an automation workflow symbol with a gradient purple-pink background.

Table of Contents

Why People Search “ActiveCampaign or Mailchimp Alternative”

Many businesses start looking for alternatives to mainstream email marketing platforms because of a few common frustrations:

  • Data privacy: Sharing sensitive customer data with third-party SaaS tools can feel risky.
  • Cost: Subscription fees often scale with your contact list, quickly adding up.
  • Flexibility & customization: Off-the-shelf platforms don’t always support the custom integrations growing teams need.

This often leads teams to search for terms like “Mailchimp alternatives,” “ActiveCampaign alternatives,” “Klaviyo alternatives,” or “free Mailchimp alternative.” Initially, they come across polished SaaS solutions like Zapier, Make.com, or larger marketing suites like HubSpot and Drip. But those who dig deeper eventually find n8n — a powerful open-source alternative that offers full control, flat pricing, and self-hosted flexibility.

For teams outgrowing the limits of mainstream platforms, n8n delivers robust email automation tailored exactly to their workflows.

What Makes n8n an Open-Source Marketing Automation Powerhouse

When marketers and founders discover n8n, it’s typically because they crave a no-code tool with more flexibility, predictable pricing, and full data ownership. As an open-source marketing automation solution, n8n excels at giving users complete control without surprise feature gates or inflated monthly fees.

Here’s exactly why n8n stands out:

FeatureWhy It Matters for Users
Unlimited contacts and emailsForget per-contact charges, scale your marketing without anxiety or monthly fee jumps.
Fully open source (MIT)No vendor lock-in. Fork, extend, and customize as your needs grow.
600+ integrationsSeamlessly integrate CRMs (HubSpot, Salesforce), payment platforms (Stripe, Paddle), AI services (OpenAI), and communication apps (Slack, Discord) without code.
Visual workflow builderCreate email workflows easily via drag-and-drop. Zero coding needed.
Workflow as JSONVersion-control your email sequences for better team collaboration.
True data ownershipAll data resides on your server. Perfect for compliance, privacy, and GDPR peace-of-mind.

Want more detail on what you can get out of the box with n8n? Check out our related guide to setting up keyword alerts for another real-world example of how flexible n8n can be.

In short, n8n is ideal for teams outgrowing rigid platforms like ActiveCampaign or Mailchimp, but not yet ready for a fully custom-coded solution. It offers the flexibility, transparency, and scalability marketers need without requiring technical expertise.

n8n vs. ActiveCampaign vs. Mailchimp

Here’s a quick comparison of n8n, ActiveCampaign, and Mailchimp to help you choose the right tool for your automation needs.

Featuren8nActiveCampaignMailchimp
Pricing basisFlat serverContacts & featuresContacts & features
Self-host / on-prem
Unlimited contacts
Visual builderPartial
Custom nodes/plugins

If you’re hunting “free alternatives to Mailchimp,” n8n tops the list.

Step-by-Step: Build a Production-Ready Email Workflow

n8n enables you to send automation emails based on user actions without relying on external SaaS tools.

Below you’ll find a step-by-step guide to building a complete email automation flow in n8n with clear logic, essential nodes, and real-world structure you can reuse.

Create a Secure Webhook

  • Webhook node → POST → Path /email-automation
  • Add header x-api-key: YOUR_RANDOM_TOKEN.
  • Example payload: {
    "api_action": "contact_tag_add",
    "email": "[email protected]",
    "tag": "trial-started",
    "first_name": "Jane",
    "last_name": "Doe"
    }

Route Events with a Switch

  • Switch node → Mode: Rules Routing Rules
OutputCondition (api_action is equal to)
Add Contactcontact_add
Add Tagcontact_tag_add
Add Notecontact_note_add
Add Eventevent_add

Here you can add your conditions with your Output Name.

Find Contacts if Exist

Before you can search for contacts, you need to store them somewhere. We’ll use a MySQL database in this example, but Google Sheets or any other database will work too. If you need help setting up MySQL, we’ve covered it in this blog post.

When this is completed you can follow this steps:

  1. Select user by email.
  2. IF found → Update name fields.
  3. ELSEInsert new user.
  4. Wrap both in a Transaction to avoid race conditions.

If/Else Node

Use the If node to check whether a user with the given email already exists.

  • If the condition is true, update the user’s data (if new data is provided).
  • If the condition is false, create a new user in your database or sheet.

Merge Node

Use the Merge node to combine the two branches, whether the user was found or newly created. So the workflow continues with the user data in either case.

Handle Tags & Segmentation

In this step, we’ll assign a tag to the user.
First, check if the user already has the tag – if they do, skip tagging. If not, add the tag to ensure proper segmentation.

You can follow the same If → Update / Else → Insert logic as before. This will also be included in the final JSON workflow provided at the end of the post.

  • Ensure tag exists in tags.
  • Insert into user_tags only if not present.
  • Tag branches you care about trigger drips (next step).

Start Tag-Based Email Flow

This is where email automation begins.
Just like the previous Switch node, create a new Switch based on the user’s tag. For example, if the tag is purchased-product-1, the corresponding automation flow should start.

  • Switch on tags (trial-started, payment-failed, etc.).
  • Check if the user is not unsubscribed.
  • If the user is subscribed, insert a new row into the user_automations table.
  • Use an Send Email node to send Email #1.
  • Add a Wait node (e.g., 2 days).
  • Send Email #2, then repeat the pattern (Wait → Email #3, etc.).
  • At the end of the sequence, set finished = TRUE.

Send Email Node

In this example, we’ll use the Gmail node, but you can also use Send Email, Brevo, Microsoft Outlook, or any other supported provider.
Setting up a connection in n8n is straightforward, each node includes built-in guidance.

Important for Gmail users:
After creating your credentials in the Google Cloud Console, make sure to publish the app.
If you skip this step, the refresh token will expire after 7 days, and n8n will stop sending emails.

Unsubscribe Logic

A nested workflow appends an unsubscribe link and catches the callback Webhook to mark unsubscribed = TRUE, stopping all automations for that user.

Workflow Recap

By following the steps above, you can build custom logic using If/Else nodes, tag checks, and email sending. This gives you full control over user segmentation, automation flows, and personalized messaging – all without writing a single line of code.

Limitations of n8n and How to Mitigate Them

While n8n is incredibly flexible for no-code users, it’s not without trade-offs, especially as workflows grow in volume, complexity, or compliance requirements. Below are the most common limitations teams encounter, along with practical ways to work around them or know when it’s time to consider a custom solution.

LimitationImpactMitigation
Email deliverability / IP reputationYou’re responsible for IP healthUse warm-up services + trusted ESP (e.g., Resend, Mailersend)
Large-scale delays (100k+ waits)High memory usageOffload delays to Redis or BullMQ
Role-based access (RBAC)Not available for teams in free planUse n8n Enterprise or add a custom auth layer
No-code UX for marketersSteep for non-technical usersBuild a custom dashboard or stick with SaaS

When No-Code Isn’t Enough: Time to Go Custom

n8n is great for building flexible workflows, but at a certain scale or complexity, no-code tools can hit their limits. Real-time triggers, advanced compliance, or large-scale user bases often require a more tailored solution.

Here are some common scenarios where going custom makes sense:

ScenarioWhy Custom WinsWhat Zingley Delivers
Real-time, sub-100 ms triggersWebSockets, event streamsCustom Node.js back-ends with socket support
Million-user scaleSharding, queue orchestrationDistributed architecture and autoscaling APIs
Strict compliance (HIPAA, SOC 2)Custom audit & encryption layersSecure data flows, audit logs, custom auth
Multi-tenant SaaSTenant isolation, usage billingMulti-tenant platforms with billing logic

At this stage, our team often steps in to help businesses transition from no-code tools to scalable, production-grade systems, whether that’s building a real-time backend, implementing complex data logic, or designing a custom dashboard that fits your workflow.

If you’re curious what that shift might look like for your team, Contact us to discuss your project, or try our free Outsourcing Calculator to explore development cost differences by region.through.

Full workflow JSON

Expand the accordion below to grab a ready-to-use workflow JSON.

How to import in n8n:

  1. Download & Import from file – click Download JSON, then in n8n choose …→ Import From File and select the download.
  2. Copy JSON URL & Import from URL – copy the raw file URL (e.g., from GitHub Gist), then pick … → Import From URL and paste the link.

Once imported, update the credentials, save the workflow, and you’re ready to go live.

{
    "name": "Email Automation",
    "nodes": [
        {
            "parameters": {
                "httpMethod": "POST",
...

Frequently asked questions

Is n8n a viable ActiveCampaign alternative for startups?

Yes if you can manage a small VPS and an ESP key, it covers onboarding, nurture, and dunning automation emails for cents.

Does n8n support split testing like Mailchimp?

Not out of the box. You can replicate it by using a Split Out node and tracking conversions via SQL or a database.

How many n8n integrations exist?

Over 600 core nodes, plus hundreds of community-created plugins.

Can I use n8n with my existing CRM or billing system?

Absolutely. n8n integrates with HubSpot, Pipedrive, Salesforce, Stripe, Paddle, and many others.

Is n8n GDPR-compliant?

Yes. Since you control where and how data is stored, it’s easier to stay compliant compared to SaaS tools with global data centers.

What if I need marketers (non-technical) to manage workflows?

n8n’s interface is user-friendly, but may be overwhelming at scale for non-technical users. You can build a simple internal dashboard or add a custom UI on top.

Can I migrate from Mailchimp or ActiveCampaign into n8n?

Yes, though it’s not automatic. You’ll need to export contacts and sequences manually, then rebuild workflows in n8n. The upside: full control and zero recurring fees.

Key takeaways

  • n8n is a powerful open-source alternative to tools like ActiveCampaign and Mailchimp – ideal for teams that want flexibility, ownership, and cost control.
  • You can build complete email workflows without writing code – capturing events, tagging users, and sending multi-step sequences.
  • No per-contact pricing: You host everything, so scaling won’t punish your wallet.
  • Limitations exist – especially with deliverability, high-volume waits, and non-technical usability – but most can be mitigated or extended with the right setup.
  • When things get complex (multi-tenant logic, real-time triggers, or compliance needs), a custom solution is the better path forward.
  • Start with n8n, validate your automation needs, and then level up with a solution built specifically for your business.

Table of Contents