Resources · n8n integration

Mailgun n8n integrationAutomate Mailgun with n8n.

The Mailgun n8n integration is one node with one job: send the email. It exposes a single operation, two required fields, From Email and To Email, and six optional ones for copies, subject, body and attachments. No Mailgun Trigger exists, so the node runs after something else.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Mailgun n8n integration actually do?

The integration is a single built-in node that sends an email through your Mailgun account, from any point in a workflow. The n8n catalog sums up its one operation in one line: sends an email via Mailgun. You give it a sender, one or more recipients, a subject and a body, and n8n hands the message to the Mailgun API using the key in your credential, the entry you create once in the n8n Credentials menu and reuse in every workflow that needs it. Nothing listens on the other side, because this tool has no trigger node.

The first job teams hand this node is the alert nobody reads a dashboard for. A workflow watches a Google Sheets tab, notices a row that crossed a threshold, and the Mailgun node carries the warning to the person who can act on it. Published n8n templates use that same shape for a price tracker and for a backup job that sends its notifications by email.

The second is the email that tells you a workflow broke. n8n can route a failed run to an error workflow, and one Mailgun node at the end of it turns that failure into a message in your inbox. That beats a red line in a run list nobody opens. If a channel suits the team better, Slack and Telegram nodes sit in the same workflow and take the same input.

The third is outbound sequences. A workflow reads the next batch of contacts from a database, an AI step writes the variation, and Mailgun sends each message from the domain you verified. Several published templates build exactly that, and a few pair Mailgun with Gmail in the same workflow.

Where the node stops is easy to describe. Its parameter list covers the sender, the recipients, the copies, the subject, the plain text body, the HTML body and the attachments. That is the whole surface. Any other call the Mailgun API accepts has no field here, so the HTTP Request node takes those, with the same API key you already pasted into the credential.

The other limit is direction. The catalog records zero events and no trigger for Mailgun, so the integration only ever pushes: something else opens the workflow, Mailgun closes it. Worth knowing too, Attachments takes no path to a file. It takes the names of the binary properties already carried by the item, separated by commas, which means the file has to arrive from an earlier node.

None of this needs code. The node ships with n8n as n8n-nodes-base.mailgun, so typing Mailgun in the node panel is the whole installation. How it sits next to the rest of the tool, and what changes when you host n8n yourself, is covered in the n8n review.

Connect

How do you connect Mailgun to n8n?

  1. 01

    Verify a sending domain in Mailgun

    Mailgun sends from domains it has checked. In your Mailgun account, add the domain the mail should come from and complete its verification. While you build, the sandbox domain that ships with every account does the job. It is there for testing, so plan the real domain before the workflow goes live.

  2. 02

    Collect the three values the credential asks for

    API Domain is the base URL of your account: pick api.eu.mailgun.net if the account is based in Europe, api.mailgun.net otherwise. Email Domain is the sending domain you just verified. API Key is read in Mailgun under Settings, then API Keys. Copy all three before you switch tabs.

  3. 03

    Create the credential, then drop the node in

    In n8n, open Credentials, start a Mailgun credential, paste the three values and save. Add the Mailgun node after your trigger and point it at that credential. Because the node exposes one operation, no resource or operation list stands in the way: the email fields are the first thing you see.

Actions

The Mailgun action available in n8n

The Mailgun node exposes one operation. For each one: the node as you configure it in n8n, the required fields, and our field notes.

01

Sends an email via Mailgun

execute

What you see in n8n

Notes & use cases

The node's only operation hands your message to the Mailgun API and returns the answer. It is an action, so something else runs first.

Key parameters

  • From Email: the sender, required. A display name is accepted, as in Admin <admin@example.com>.
  • To Email: the recipients, required. Comma-separated for several, or {{ $json.email }} from the item.
  • Cc Email and Bcc Email: copies, same comma-separated format.
  • Subject: what the recipient sees in the inbox list. Text and HTML hold the body, plain or formatted, and all three are optional, unlike the two fields above.
  • Attachments: names of the binary properties on the item, comma-separated, never file paths.
Use cases
the receipt after a payment, the nightly report, the scraper alert, the outreach step.
Need help

Need help automating Mailgun with n8n?

A person reads every message.

FAQ

Frequently asked questions

01Is the Mailgun n8n integration free?
Yes. The Mailgun node ships with n8n, on Cloud and on self-hosted instances alike, so there is nothing to buy and nothing to install before you use it. The cost sits in the two services around it: the n8n plan that runs the workflow, and your Mailgun account itself. The node adds no layer between them, it calls the Mailgun API with the key stored in your credential. And if you want to rehearse before any of that matters, the sandbox domain that comes with a Mailgun account is there for testing.
02What credentials does the Mailgun node need?
An API key, plus two pieces of routing information. The credential asks for an API Domain, the base URL of your account: api.eu.mailgun.net for accounts based in Europe, api.mailgun.net for the rest. It asks for an Email Domain, the sending domain the message leaves from. That domain has to be added and verified in Mailgun first, or swapped for the sandbox domain while you test. And it asks for the API Key itself, which you read in Mailgun under Settings, then API Keys. One credential covers one email domain, so an account with several sending domains needs one credential each.
03What are the limits of the Mailgun node in n8n?
It sends, and that is all. The catalog lists one operation on a single resource, two required fields and six optional ones. Any other call the Mailgun API accepts has no matching field in the node. The way around that is the HTTP Request node, which takes the same API key and reaches what the node skips. Two smaller limits catch people out. Attachments expects the names of binary properties already on the item, not paths to files on a disk, so the file has to arrive from an earlier node. And nothing here listens: the node runs only when the workflow tells it to.
04Can Mailgun start an n8n workflow in real time?
No. The catalog holds no Mailgun Trigger and zero events for this tool, so nothing on the Mailgun side wakes a workflow through a dedicated node. Three ways around it cover most needs. A Schedule Trigger runs the workflow on a fixed rhythm, which fits digests and nightly reports. A Webhook node gives n8n a URL that any system able to make an HTTP call can hit. The reaction is immediate, as long as the caller can be configured. Or the workflow starts in the app where the event really happens, and the Mailgun node comes later, as the send step.
05n8n or Make for sending Mailgun email?
It depends on what surrounds the email. Both tools reach the Mailgun API, and for a single send the difference is thin. What n8n gives you here is the escape hatch. The node covers the send, and the HTTP Request node covers the rest of the API. Self-hosting keeps the contact list and the message bodies on your own machine, which matters for outreach. Make is billed per operation, so a send loop that fans out to hundreds of contacts is priced very differently on each side. Judge the choice on the workflow around the email, the AI steps, the database reads, the error handling, because the send itself is settled in both.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.