Sending & Testing

Send emails with n8n and MailBlastr

Use the MailBlastr HTTP Request node in n8n to send email, plus a webhook trigger node to start workflows on delivery, bounce, and other email events.

n8n is a workflow automation platform that connects apps and builds automations with little or no code. You can call MailBlastr from n8n with its built-in HTTP Request node to send email, and start workflows from MailBlastr webhook events with a Webhook trigger node — delivered, opened, bounced, and more.

Before you start

  • Create an API key and copy it — a sending_access key is enough to send.
  • Verify a domain so you can send to addresses other than your own.

Send an email from a workflow

Add an HTTP Request node and configure it to call POST ${BASE}/emails:

  1. 1
    Add an HTTP Request node

    On the canvas, add an HTTP Request node after your trigger.

  2. 2
    Set method and URL

    Method POST, URL https://api.mailblastr.com/emails.

  3. 3
    Add authentication

    Add a header Authorization with value Bearer mb_xxxxxxxxx (store the key in an n8n credential rather than inline).

  4. 4
    Send JSON body

    Set the body to JSON with from, to, subject, and html fields. Map values from earlier nodes with n8n expressions.

  5. 5
    Execute

    Run the node; a 200 response with an email id means it was accepted.

A minimal body for the node:

{
  "from": "Acme <hello@yourdomain.com>",
  "to": ["customer@example.com"],
  "subject": "Hello from n8n",
  "html": "<p>Sent from an n8n workflow.</p>"
}
Store the API key as an n8n Header Auth credential (header Authorization, value Bearer mb_xxxxxxxxx) and reference it from the node, so the key is not saved in the workflow JSON.

Trigger a workflow on email events

To start a workflow when something happens to your mail, add a Webhook trigger node, copy its URL, and register that URL as a webhook endpoint in MailBlastr — subscribing to the events you care about. Verify the signature (the svix-* headers and your whsec_ secret) before acting on a payload.

Events you can trigger on include:

EventFires when
email.sentThe email was accepted and sent.
email.deliveredThe email was delivered to the recipient.
email.bouncedThe email bounced.
email.complainedA spam complaint was received.
email.openedThe recipient opened the email.
email.clickedA link in the email was clicked.
email.receivedAn inbound email was received (see Receiving).
contact.createdA new contact was added.

Example: welcome email on new contact

  1. Webhook trigger — listens for contact.created.
  2. HTTP Request — sends a welcome email to the new contact, mapping the address from the trigger payload.

The trigger-then-act pattern works for any event — notify Slack on a bounce, or log delivery events to a sheet. See the full emails API and webhooks overview.