Automation8 min read

Self-hosted deliverability automation with n8n

One docker-compose file, one n8n workflow, one Inbox Check API key — and you own every part of your deliverability monitoring stack. No Zapier tax, no Make.com ops limit.

If you run infra in-house, paying a SaaS for "operations" to chain HTTP calls feels wrong. n8n flips that: self-host it, wire it to Inbox Check, and you get Zapier- style flows without per-run fees. This guide gets you from a blank VM to a scheduled deliverability workflow in about 30 minutes.

Why self-host n8n
  • No operation limits — run checks every 5 minutes if you want.
  • Your API keys never leave your network.
  • Visual editor, Git-backed workflow JSON, Code node for anything fancy.
  • Fair-code license, free for production use up to a normal scale.

Step 1 — Run n8n via docker-compose

Pick a VM with 2GB RAM. The compose file below runs n8n behind a reverse proxy with Postgres for persistence.

# docker-compose.yml
services:
  n8n:
    image: n8nio/n8n:latest
    restart: unless-stopped
    ports: ['127.0.0.1:5678:5678']
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=db
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASS}
      - N8N_HOST=n8n.yourdomain.com
      - N8N_PROTOCOL=https
      - WEBHOOK_URL=https://n8n.yourdomain.com/
      - GENERIC_TIMEZONE=UTC
      - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
    volumes:
      - ./data:/home/node/.n8n
    depends_on: [db]
  db:
    image: postgres:16
    restart: unless-stopped
    environment:
      - POSTGRES_DB=n8n
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=${POSTGRES_PASS}
    volumes:
      - ./pg:/var/lib/postgresql/data

Put Caddy or nginx in front for TLS. Generate the N8N_ENCRYPTION_KEY with openssl rand -hex 32.

Step 2 — Store the Inbox Check key

In n8n, go to Credentials → New → Generic HTTP Header Auth. Name Authorization, value Bearer ic_live_xxx. Save. Every HTTP Request node in this workflow references it.

Step 3 — The workflow

Four nodes. Add a Slack node for alerts and a Postgres node if you want history.

1. Schedule Trigger

Every 30 minutes (or cron expression).

2. HTTP Request — create test

Method:     POST
URL:        https://check.live-direct-marketing.online/api/tests
Authentication: Generic Credential / Header Auth (set above)
Body Content Type: JSON
Body:
{
  "sender":   "hello@yourdomain.com",
  "subject":  "Scheduled probe {{ $now.toISO() }}",
  "html":     "<p>Probe content</p>",
  "providers": ["gmail","outlook","yahoo","mailru","yandex"]
}

3. Wait + HTTP Request — poll

Use the Wait node (60 seconds), then an HTTP Request that hits GET /api/tests/{{ $json.testId }}. Wrap in a Loop Over Items with an IF node that re-queues if status is not done, up to 3 attempts.

4. Code node — compute inbox rate

// Code node input = the GET /api/tests/:id response
const providers = items[0].json.providers;
const inbox     = providers.filter(p => p.folder === 'inbox').length;
const rate      = inbox / providers.length;
return [{
  json: {
    ...items[0].json,
    inboxRate: Math.round(rate * 100),
    alert:     rate < 0.80,
    perProvider: providers.map(p => `${p.name}: ${p.folder}`).join(', '),
  },
}];

5. IF → Slack / Postgres

If alert === true, send a message via the Slack node to your deliverability channel. Always log the row to Postgres via the Postgres Insertnode for a long-term trend.

Importing the workflow

We publish the workflow JSON on GitHub. In n8n, click the burger menu → Import from file, pick the JSON, bind credentials to the placeholders, enable the workflow. Done.

Versioning n8n workflows

n8n workflows are JSON. Export them after every change and commit to Git alongside your infra. In an outage, you restore the workflow with one import — no point-and-click panic.

Hardening

  • Basic auth on the n8n UI via N8N_BASIC_AUTH_ACTIVE=true. Or front it with an OIDC proxy.
  • Rotate the encryption key on a schedule; n8n re-encrypts credentials on restart.
  • Queue mode if you run more than a few workflows. Redis-backed job queue + separate worker containers.
  • Backups. Snapshot the ./data and ./pg volumes nightly. Without these, a lost VM = lost workflows.

Ideas to extend

  • Per-ESP monitoring. Duplicate the workflow for each ESP sender. Aggregate into one Postgres table.
  • Anomaly detection. Add a Code node that compares today's rate to the rolling 7-day average. Alert only on a >10 point drop.
  • DNS + auth health checks. Chain a second HTTP call to the auth endpoint; alert if SPF or DMARC verdict regresses.
  • Grafana dashboard. Point Grafana at the Postgres table for a time-series chart of inbox rate.

FAQ

Is self-hosting n8n free for commercial use?

Yes, under the Sustainable Use License, for internal business workflows. Reselling n8n itself needs a commercial license.

How does this compare to running a cron + Node script?

The cron + Node path is fewer moving parts. n8n shines when you need visual editing, multi-branch flows, or to let a non-developer teammate tweak the workflow.

Can I replace the Inbox Check API with GlockApps?

GlockApps does not offer a plain HTTP API with a free tier, so the plumbing is heavier. If you already own a GlockApps seat, the HTTP Request node works against their API the same way.

How do I migrate an existing Make.com scenario to n8n?

Workflow-by-workflow. Most Make modules have an n8n equivalent. Export the shape of each Make HTTP module and rebuild in n8n; expect a morning of work per scenario.
Related reading

Check your deliverability across 20+ providers

Gmail, Outlook, Yahoo, Mail.ru, Yandex, GMX, ProtonMail and more. Real inbox screenshots, SPF/DKIM/DMARC, spam engine verdicts. Free, no signup.

Run Free Test →

Unlimited tests · 20+ seed mailboxes · Live results · No account required