Skip to content

Automate Mailgun

Watch how the email you send through Mailgun is doing. Delivered, bounced and complained counts land in your inbox each morning, bounce spikes are caught the same hour, and permanent failures on important messages are reported as they happen. Describe what you want to your AI assistant, check what it will do, and it keeps running with your laptop closed.

Try asking

Create a ClickRuntime automation: every hour, check today's bounce rate for my Mailgun domain mg.example.com and email me if it's above 5%, no more than once a day.

Paste it into your assistant. It tells you what it will send or change before it runs live.

Build your own

Build any Mailgun automation you can describe

The ideas above are ready-made starting points, not a fixed list. Describe what Mailgun should do in your own words, with your conditions, other apps or an AI step, and your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

For example, ask your assistant

Every hour, check Mailgun bounce and complaint rates for our domain and alert me if either goes above 2 percent.

When Mailgun reports a hard bounce, mark that contact as invalid in HubSpot.

When a Mailgun event shows a recipient clicked a link, update their Airtable record, add a tag in HubSpot and post a note in Slack for the sales owner.

Beyond chat

Have Mailgun work when you're not in the chat

Connecting Mailgun to ChatGPT or Claude lets you ask about it while you chat. ClickRuntime handles the part that should happen on its own: checks on a schedule and actions on each new event, set up from the same chat and running after you close it.

Setup

Connect Mailgun

You connect Mailgun with an API key from your own account. Reports and alerts need your private API key, while a domain sending key is limited to sending messages.

Mailgun

Email (transactional)

  1. In Mailgun, open Account Settings → API Keys and copy your private API key.
  2. If an automation only sends email, you can instead create a narrower key under Sending → Domains → your domain → Domain Settings → Sending API keys → Add Sending Key. It's shown only once.
  3. Note whether your account is in the US or EU region.
  4. In the ClickRuntime dashboard, open Connections & secrets and save the key as a secret for Mailgun, with your region.

Good to know

Mailgun limits that affect automations

  • Mailgun keeps US and EU accounts separate, so the connection must use the region your account is in.
  • A domain sending key can only send messages. Delivery reports, bounce alerts and webhook setup need the private API key.
  • Sandbox domains only send to recipients you've authorized, so test with your own address or add a real domain.
  • Instant failure alerts use Mailgun webhooks, and each incoming event's signature is checked before it is acted on.

FAQ

Questions about automating Mailgun

What can ClickRuntime see in Mailgun?
With your private API key it can read sending metrics per domain, register webhooks and send messages. With a domain sending key it can only send from that domain.
Which events can trigger an alert straight away?
Mailgun can post events like permanent failures and spam complaints to the automation's link. They're handled as they arrive, so you see the recipient and reason within moments.
How is the bounce rate worked out?
From Mailgun's metrics for today: bounced messages compared with the messages Mailgun accepted. You choose the threshold, and the alert fires at most once a day.
Does it matter whether I'm on the US or EU region?
Yes. Each region has its own API, so a key from an EU account won't work against the US one. Pick the region your Mailgun account was created in.
Do I need AI for Mailgun automations?
No. Delivery reports, bounce alerts and failure notifications run without it. If you add summaries, they use the AI that comes with every ClickRuntime plan, so you don't need your own AI key.
Is this a Mailgun connector for ChatGPT or Claude?
Not for chatting with Mailgun data. A chat connector lets your assistant read and change Mailgun while you're in the conversation. ClickRuntime is for the work that should happen without you: you set up an automation from the chat once, and it keeps running on a schedule or on each Mailgun event.

Tell your assistant what Mailgun should do

Free plan. No credit card.