How to Test Email Automation with n8n

n8n workflows that touch email have two halves to trust: the ones that read mail as a trigger, and the ones that send it as an action. Tempx gives you a real inbox and a capture-only mail server so both halves can be tested without touching a real recipient.

Side one: reacting to incoming mail

The watcher is five nodes: Schedule Trigger (every minute) → HTTP Request to GET https://tempx.uk/api/inbox?address=…Split Out on messagesFilter on subject/sender → your action. Node-by-node settings are in the integration guide; the parts that make it production-shaped:

Side two: testing the mail your workflow sends

Workflows that notify people are scary to test — point them at real users and you spam; point them at a fake address and you test nothing. The capture-only SMTP gateway resolves it: create an n8n SMTP credential with host smtp.tempx.uk, port 587, your tmtp_ username/password, and every message the workflow "sends" is stored in the paired inbox with recipients preserved — nothing delivered, everything inspectable.

# then the assertion is a one-liner against the same inbox
curl -s "https://tempx.uk/api/inbox?address=alerts-7cq2@tempx.uk" \
  | jq -e '.messages[] | select(.subject | test("Invoice"))'

The end-to-end test loop

  1. Seed: send a test message into the watched inbox — by hand, from your app via the gateway, or with a one-off HTTP node.
  2. Run: trigger the workflow (or wait one schedule tick).
  3. Assert: check the workflow's output (Slack message, app record) and, for send-side steps, that the captured mail carries the right subject, recipients and content.
  4. Regression: keep the seed-and-assert pair as a scheduled canary — a workflow that silently stops matching its filter is worse than one that fails loudly.

Limits worth designing around

Create a temporary email address

Free, instant, no sign-up — messages auto-delete.

Go to your inbox