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 messages → Filter on subject/sender → your action. Node-by-node settings are in the integration guide; the parts that make it production-shaped:
- A watermark, not hope. Keep the newest
receivedAtyou processed in the workflow's static data and filter for newer — otherwise every run reprocesses the same mail. - Idempotency on the action side. Key your Slack/app-call on the message
idso a retried run cannot double-send. - Private inbox for anything sensitive. Named inboxes are readable by anyone who learns the address; a private inbox from your account closes that door (same API, Bearer header).
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
- Seed: send a test message into the watched inbox — by hand, from your app via the gateway, or with a one-off HTTP node.
- Run: trigger the workflow (or wait one schedule tick).
- 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.
- 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
- 240 inbox reads/minute — a per-minute schedule is nowhere near it; fan-out pollers should share one read.
- 140-character preview — enough for subjects, codes and most links; full bodies are visible in the app or via MCP's
get_email. - Retention — named inboxes keep mail up to 7 days; long-horizon audits should forward what matters out.
Create a temporary email address
Free, instant, no sign-up — messages auto-delete.
Go to your inbox