?>

Integrate Netlify with Mailgun

Appy Pie Connect allows you to automate multiple workflows between Netlify and Mailgun

  • No code
  • No Credit Card
  • Lightning Fast Setup
20 Million man hours saved

Award Winning App Integration Platform

About Netlify

Netlify is the platform your developers love for building highly-performant and dynamic web sites, e-commerce stores and applications.

About Mailgun

Mailgun is the email automation engine trusted by over millions of websites and application developers for sending, receiving and tracking emails.

Mailgun Integrations
Mailgun Alternatives

Looking for the Mailgun Alternatives? Here is the list of top Mailgun Alternatives

  • MailerLite Integration MailerLite
  • MailChimp Integration MailChimp

Best ways to Integrate Netlify + Mailgun

  • Netlify Integration Netlify Integration

    Mailgun + Netlify

    Start Deploy in Netlify when New Unsubscriber is created in Mailgun Read More...
    Close
    When this happens...
    Netlify Integration New Unsubscriber
     
    Then do this...
    Netlify Integration Start Deploy
  • Netlify Integration Netlify Integration

    Mailgun + Netlify

    Start Deploy in Netlify when New Subscriber is created in Mailgun Read More...
    Close
    When this happens...
    Netlify Integration New Subscriber
     
    Then do this...
    Netlify Integration Start Deploy
  • Netlify Integration Google Sheets Integration

    Netlify + Google Sheets

    Create rows in Google Sheets for new Netlify form submissions Read More...
    Close
    When this happens...
    Netlify Integration New Form Submission
     
    Then do this...
    Google Sheets Integration Create Spreadsheet Row
    It's time-consuming and tedious to manually export form submission data to Google Sheets. However, with this Appy Pie Connect integration, every new Netlify form submission will automatically create a new row of data in a selected Google Sheets spreadsheet. This frees you up to focus on the important task at hand: examining the imported data.
    How It Works
    • A new form submitted to Netlify
    • Appy Pie Connect creates a new row on Google Sheets.
    What You Require
    • Netlify account
    • Google Sheets account
  • Netlify Integration Salesforce Integration

    Netlify + Salesforce

    Turn Netlify form submissions into Salesforce leads Read More...
    Close
    When this happens...
    Netlify Integration New Form Submission
     
    Then do this...
    Salesforce Integration Create Record
    Save time by adding new leads to Salesforce automatically with this Appy Pie Connect integration. This integration adds new leads to Salesforce CRM automatically from new Netlify form submissions so you can focus on the more important things. This Appy Pie Connect integration will populate the fields with names, email addresses, and other details needed to establish a new lead in Salesforce.
    How This Netlify-Salesforce Works
    • A new form submitted to Netlify
    • Appy Pie Connect creates a new lead in Salesforce.
    What You Require
    • Netlify account
    • Salesforce account
  • Netlify Integration Zendesk Integration

    Netlify + Zendesk

    Create Zendesk tickets from new Netlify form submissions Read More...
    Close
    When this happens...
    Netlify Integration New Form Submission
     
    Then do this...
    Zendesk Integration Create Ticket
    This integration is very simple, but extremely powerful. You can use this Connect Flow to automatically create a Zendesk ticket for new subscriptions to your forms created on Netlify. This means that not only does the information from your form appear in your Zendesk ticket, but the correspondence between your responses and the person filling out the form are all accessible in one place.
    How This Netlify-Zendesk Works
    • A new form submitted to Netlify
    • Appy Pie Connect creates a new ticket on Zendesk.
    What You Require
    • Netlify account
    • Zendesk account
  • Netlify Integration {{item.actionAppName}} Integration

    Netlify + {{item.actionAppName}}

    {{item.message}} Read More...
    Close
    When this happens...
    {{item.triggerAppName}} Integration {{item.triggerTitle}}
     
    Then do this...
    {{item.actionAppName}} Integration {{item.actionTitle}}
Connect Netlify + Mailgun in easier way

It's easy to connect Netlify + Mailgun without coding knowledge. Start creating your own business flow.

    Triggers
  • New Deploy Failed

    Triggers when a new deploy of your site has failed.

  • New Deploy Started

    Triggers when a new deploy of your site has started building.

  • New Deploy Succeeded

    Triggers when a new version of your site has successfully deployed.

  • New Form Submission

    Triggers when a form receives a new submission.

  • New Subscriber

    Triggers whenever a new subscriber is added.

  • New Unsubscriber

    Triggers when a current subscriber unsubscribed.

    Actions
  • Start Deploy

    Performs a new deploy of an existing site.

Compliance Certifications and Memberships

Highly rated by thousands of customers all over the world

We’ve been featured on

featuredon
Page reviewed by: Abhinav Girdhar  | Last Updated on July 01, 2022 5:55 am

How Netlify & Mailgun Integrations Work

  1. Step 1: Choose Netlify as a trigger app and authenticate it on Appy Pie Connect.

    (30 seconds)

  2. Step 2: Select "Trigger" from the Triggers List.

    (10 seconds)

  3. Step 3: Pick Mailgun as an action app and authenticate.

    (30 seconds)

  4. Step 4: Select a resulting action from the Action List.

    (10 seconds)

  5. Step 5: Select the data you want to send from Netlify to Mailgun.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of Netlify and Mailgun

  • Netlify?
  • Netlify is a web hosting service that automates the build and deploy process for your website. It allows you to focus on writing code, not building servers.

  • Mailgun?
  • Mailgun is a cloud-based email service that provides an API to send and receive emails. It offers free accounts, SMTP and API access to send and receive emails. It lets you create and send up to 10,000 emails per month with a single API call, and it also supports multiple languages.

  • Integration of Netlify and Mailgun
  • Netlify can be used as a static hosting service as well as a build and deploy service. Netlify consists of Git repository, GitHub integration, and continuous deployment. You can use GitHub repository with Netlify to generate static websites with custom domain names. It also provides nice features such as autoresponders, spam protection, and custom headers.

    Suppose we have a sample node application hosted on Netlify. We can also integrate Mailgun with the application to send automated emails to registered users, for example, reset password email or notification email.

    You can use Netlify’s “Build Hooks” feature to trigger the build and deploy process within your applications. Build Hooks is an API which can be used to execute commands whenever there is a new commit in Git. For example, we can send emails using Mailgun via Build Hooks API. As shown below, we are creating a netlify-build-hooks-email-example file in which we are setting up two environment variables MESSAGE_SUBJECT for subject of email message to be sent by Mailgun, and MESSAGE_TEXT for body of email message to be sent by Mailgun. We are also invoking script/mailgun-send-email command within our node application. Once the application is deployed on Netlify, Netlify will trigger the build process through the Build Hooks API. After the build process is completed, Netlify will execute our script/mailgun-send-email script which will invoke Mailgun to send email messages.

    Now, let us see how Mailgun works to send the email messages. First of all, we need to set up an app in Mailgun conspe. To do that, go to http://www.mailgun.com/signupew and create an account with Mailgun for sending emails from your application. Then go to the main dashboard of Mailgun to create an app. After successful creation of an app, you will get App Key and App Domain values which are required to send emails from your application. Then go back to your application code and paste the fplowing script into the script/mailgun-send-email file which was created earlier in step 2 above:

    var mailgun = require('mailgun'); var appDomain = process.env.MAILGUN_DOMAIN; var appKey = process.env.MAILGUN_KEY; var options = { from. 'Mailgun <[email protected]>', //from address to. '[email protected]', // destination address subject. process.env.MESSAGE_SUBJECT // subject of message }; mailgun.sendMail(appKey, appDomain, options , function (err, info. { if (err. throw err; conspe.log('Email sent successfully.'); }); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 var mailgun = require ( 'mailgun' . ; var appDomain = process . env . MAILGUN_DOMAIN ; var appKey = process . env . MAILGUN_KEY ; var options = { from . 'Mailgun <[email protected]>' , //from address to . '[email protected]' , // destination address subject . process . env . MESSAGE_SUBJECT // subject of message } ; mailgun . sendMail ( appKey , appDomain , options , function ( err , info . { if ( err . throw err ; conspe . log ( 'Email sent successfully.' . ; } . ;

    In the script above, we are first importing a module named mailgun which is already imported in the node application generated by Netlify for this project. Then we are defining some variables including appDomain, appKey and options which are needed while sending emails from the node application generated by Netlify for this project. In line 19 of the script above, we are calling mailgun module’s sendMail method which takes three parameters including App Key, App Domain and Options object containing From, To and Subject values which are values of environment variables set earlier in this sample project for this example purpose only. This method will return a JSON object containing information of the email sent from a node application generated by Netlify for this project which includes details about sent email such as sent time stamp and tracking ID of the email message. The Mailgun module uses Node SMTP library to handle SMTP protocp hence we don’t need any third-party library such as Nodemailer or SES for sending emails from node application generated by Netlify for this project.

    This completes our integration of Netlify with Mailgun module to send email messages from node application generated by Netlify for this project when there is a commit in our git repository in step 2 above in this sample outline structure of an article in markdown form in my mind:

    The process to integrate 403 Forbidden and 403 Forbidden may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.