Mailgun
Last updated
Last updated
When you're setting up your first workflow with Mailgun, you'll need to add your API key so that Mailgun is a connected app within MESA.
From your Mailgun account dashboard, click on your profile from the top right hand corner and then click on API Keys.
Next, click on the eye icon next to Private API key. Copy and paste it in the API Key field.
Once the API Key is entered, click on Add Credential to connect MESA with Mailgun. Lastly, click on the Done button and hit the Save button at the top of or below the workflow to save your changes.
All Mailgun Triggers require you to select a Mailgun Domain that MESA should work with. Click on the Domain drop-down menu and select your domain.
🗒️ Note: After saving the workflow for the first time, the domain selected in the Trigger cannot be changed. If you need to change the domain, please create a new workflow.
Once selected and after ensuring that you have selected the correct domain, hit the Save button at the top of or below the workflow to save your changes.
When adding a Mailgun Send Message action, you will need to fill out some required fields before being able to save your workflow.
Required Fields:
Domain (required): Select a domain that MESA should work with. Review this section if you are unsure on what to select
From (required): Input an email address for the email's From setting
To (required): Email address of the recipient(s). You can use commas to separate multiple recipients and can utilize MESA's Variables feature to automatically input the customer's email address
Subject (required): Email's Subject line
Message (required): Email's body message. This cannot be used with the Template Variables fields.
More Options variables:
Template: You can select any of your existing Mailgun templates to automatically format the emails sent by MESA. To locate your Templates: Mailgun dashboard > Sending (from left hand sidebar) > Templates
Template Variables: Variables used in an email template. This cannot be used with the Text field. Continue reading to the next section for more information.
Attachments
You can attach attachments into your email by inputting the URL of the attachment.
Click More Options, scroll down and select the URL attachments variable.
We use the file's type extension to determine the mime type of the file. For instance, if a file ends with .pdf, we will assume the mime type is application/pdf because of the extension. Similarly, if the file ends with .png, we will assume its mime type is image/png. Therefore, it is highly recommended that the attachment URLs end with the file extension.
Adding Template Variables into the Send Message Action
If your Mailgun template utilizes Variables, you can automatically input data into these variables which are included in the Email's Body.
1. To set this up, login into your Mailgun account. Then, click on Sending under Email and then click on Templates.
2. Locate the template that you want MESA to use in the Send Message action and then click on it.
3. When viewing the template, find your Variables which would look something like this: {{customer_name}}
4. Back into your MESA workflow's Send Message action in Configure, scroll down and select More Options, locate the Template Variables section, and click on Add Field.
5. A Field name field will then display. Input the name of the Variable. Example: customer_name. Click Save.
6. For the empty field below, you will want to input that variable from your Mailgun template. Example: {{customer_name}}
7. To add more Variables if needed, please repeat steps 4-6.
8. Once you are done, you can save your changes! When an automation runs, your email will automatically contain important information.
Please note that the email message, including attachments, cannot exceed the per-message size limit of 25MB or it may be permanently lost.
We do not support sharing URLS from Google Drive or Dropbox at this time or the ability to upload a file directly in MESA. For example, the attachment URL should be publicly available and MESA should be able to directly access the file without downloading it. We recommend uploading the files to a third party service like Shopify Files and then copying the URL from there.