Integrations

Github Actions

Send automated emails directly from your GitHub workflows. Notify teams about pushes, pull requests, deployments, and more without leaving your repository.

Overview

Automate email delivery for any repository event. When code is pushed, issues are updated, or releases are published, Mailgun’s GitHub Action sends personalized emails to your team. Include commit data and actor information in HTML templates with dynamic variables. Mailgun’s logs confirm every delivery. Streamline communication across your development lifecycle with flexible triggers, multiple recipients, and simple secret management. 

KEY FEATURES AND BENEFITS:

  • Customize subject and body with HTML templates 
  • Use environment variables and event payload data in messages 
  • Send to multiple recipients by separating addresses with commas 
  • Get Mailgun API responses for debugging 
  • Trigger emails on any GitHub event: push, pull request, issue, schedule, and more 
  • Install free and configure quickly 

Send emails directly from GitHub workflows using Mailgun’s reliable API for automated, event-driven communication. 

Use Cases

Popular ways to use Mailgun with GitHub Actions

Build status alerts

Notify developers when builds succeed or fail, including logs and commit details.

Issue & PR updates

Email stakeholders when issues are created, commented on, or pull requests are merged.

Deployment summaries

Send release notes, version numbers, and rollback alerts as soon as deployment jobs complete.

Custom event emails

Trigger tailored messages for security alerts, dependency updates, or any GitHub webhook event.
Pipedream logo

How To Enable The Integration

Quick start: set up Mailgun integration with GitHub Actions

Get started in four simple steps. No servers or plugins required.

  • Step 1: Create or open a workflow file in .github/workflows/ (e.g., mailgun.yml).

  • Step 2: Add a Mailgun step from the GitHub Marketplace and reference your MAILGUN_API_KEY and domain as secrets.

  • Step 3: Define inputs such as to, and optionally subject and body/text as described in the action’s README.

  • Step 4: Commit and push your changes. On the selected event, the workflow sends an email using Mailgun’s API.

Why Sinch Mailgun

Why developers choose Mailgun integration with GitHub Actions

Fast setup

Install the Action, add secrets, and start sending emails within minutes. No extra infrastructure needed.

Reliable delivery

Built on Mailgun’s proven API, every message includes logs so you can verify delivery.

Flexible triggers

Works with any GitHub event, allowing you to customize notifications for your workflow.

FAQS

Frequently asked questions

This is a community-maintained GitHub Action created by a third-party developer. It reliably integrates with Mailgun’s API and is widely used by developers.

Store your Mailgun API key and domain as encrypted secrets in your GitHub repository settings, then reference them in your workflow file. 

Yes. Enter multiple email addresses separated by commas in the to field to notify several stakeholders at once. 

Any GitHub event can trigger the Action, including push, pull_request, issues, releases, schedules, and custom webhooks. 

Use environment variables and event payload data, such as ${{ github.actor }} or commit messages, directly in the subject or body fields. 

Email limits depend on your Mailgun plan. GitHub Actions usage is determined by your GitHub account tier. 

The GitHub Action is free to use. You only pay for Mailgun usage according to your selected plan.