- Introduction
- What is a Zap
- Ready to Use Zap Templates
- Add Contacts / Leads Zap
- Send Email with Mailjet Template Zap
- Send HTML Email Zap
- Send Email Campaign to a Mailjet Contact List Zap
- Parse Inbound Emails Zap
- Email Events Zap
- Troubleshooting
- Conclusion
Introduction
Zapier is an online automation tool that allows you to connect two or more apps to automate repetitive tasks – like moving information between them – without coding or relying on developers to build the integration. Most importantly, workflows can be created with only a few clicks, which makes it extremely easy.
Below we will guide you through the steps to create zaps between your Salesforce and Mailjet accounts, which we believe will help you better take advantage of both platforms’ capabilities.
What is a Zap
A zap is basically an automated task that you want run over and over again between two online apps. A zap consists of a trigger and an action:
When this happens (Trigger), do something (Action).
Once you have created your zap, Zapier will check your trigger every few minutes for new data. If the zap is triggered, Zapier will automatically perform the action! There is no involvement needed from you - your data will flow from one app to the other.
With Mailjet, you have the following Trigger options:
- Subscribe Contact to Mailjet List
- Unsubscribe Contact from Mailjet List
- Parse Inbound Email (when new email is sent to your Parse API email address)
- Email Events (when an event occurs with a Mailjet contact - send, open, click, bounce, spam, block)
And several Actions :
- Subscribe Contact to Mailjet List
- Unsubscribe Contact from Mailjet List
- Send a Plain Text Email
- Send an HTML Email
- Send Email Using a Saved Mailjet Template
- Send an Email Campaign to a Mailjet List
- Update Contact Properties (in Mailjet)
Ready to Use Zap Templates
Zapier also allows the creation of templates for commonly used zaps. They will streamline the process for you, by hiding unnecessary options and allowing you to select only the ones you need for your zap. If such a template is available, we will include it in the ‘General Information’ section of the respective zap.
Keep in mind that there will be several important differences between using the templates and the way you create a zap directly from the ‘Make a Zap!’ option on the Zapier site:
- The Trigger and Action Apps will be pre-selected for your convenience.
- Since the template has been created with a specific trigger and action in mind, all other triggers and actions will be hidden to avoid mistakes.
- During trigger and action configuration generally only mandatory options will be displayed. You can view the optional configurations by clicking on ‘Show advanced options‘.
Add Contacts / Leads Zap
General Information
When you create new Contacts or Leads in Salesforce, you may want to subscribe the associated emails to different Mailjet contact lists. This way you will be able to easily send mails and newsletters to them. This is where Zapier comes into play – it will help you automate the process, saving you valuable time.
We will now create a zap to add details for new Salesforce Contacts to a Mailjet contact list. You can follow the exact same instructions for adding Leads to a contact list – just choose a New Lead trigger instead of New Contact.
Trigger Phase
To start, go to your Zapier account dashboard and click on ‘Make a Zap!’.
-
Enter a name for your new zap.
-
You will need to choose a Trigger App. Search for Salesforce in the Search bar and select the result.
-
Please select a Trigger. You want to add the properties of the new Contact to the Mailjet contact list, so you need to choose ‘New Contact’, then click on ‘Save + Continue’.
-
Choose an already linked Salesforce account from the list and then click on ‘Continue’. If you have no connected account, or you want to link a new one, click on ‘Connect a New Account’.
For this example, we will connect a new account by clicking on ‘Connect a New Account’.
In the pop-up window, click on ‘Yes, continue’.
Enter your Salesforce information and click on ‘Log in’.
Go back to your Zapier window and you will see a new ‘Salesforce #’ account. If you wish to change this default name, just click on the pencil icon and enter a new name.
Select your Salesforce account then click ‘Save + Continue’.
-
You will now need to test the link to the account – Zapier will try to fetch the data of an existing Salesforce contact. If you do not have an existing recent contact registered in Salesforce, you will need to create one for testing purposes. When ready, click on ‘Fetch & Continue’.
-
Once the test is successful, you will have completed the Trigger phase. Click on ‘Continue’.
Action Phase
-
You have now entered the Action App phase. First, search for Mailjet in the Search bar and select the result.
-
Select the ‘Subscribe Contact to Mailjet List’ option and click on ‘Save + Continue’.
.
-
Select the Mailjet account you want to use. If no account has been registered or you want to link a different one, click on ‘Connect a New Account’. For this example, we will add a new account by clicking the ‘Connect a New Account’ button.
In the pop-up window, add your Mailjet API Key (User) and Secret Key (Password). You can find this information on the API Key Management page in your Mailjet account.
Click on ‘Yes, continue’.
The new account will appear as ‘Mailjet Account #’. To change its name, just click on the pencil icon and enter a new one.
Select your Mailjet account and click on ‘Save + Continue’.
-
Select the Contact List to use for your Salesforce Contacts. The contact lists are fetched from your Mailjet account, so you need to have a Contact List already created. If you don’t have one, click on the link above the drop-down menu to make it.
-
You now need to match the contact properties you want to transfer from Salesforce to the respective Mailjet contact properties. To do this, click on the ‘Insert a field’ button to call up the drop-down menu, then select the contact detail that corresponds to the respective property.
‘Email’ is the only mandatory contact property, but it can be useful to match additional ones – e.g. Full Name, Date of Birth, Address etc. This will help you later for personalizing emails in Mailjet, or for segmentation of the contact list for campaigns, for example.
In the end, you will have a result similar to the picture below.
Once you are ready, click on ‘Continue’.
-
You will see the details of the pulled account matched to the Mailjet contact properties.
You can test the zap by clicking on ‘Create & Continue’. Keep in mind that this will add the shown account information to the Mailjet contact list. Alternatively, you can click on ‘Skip Test & Continue’. In both cases, you will be asked to ‘Finish’ the zap.
-
Now all you need to do is turn it on by clicking on the toggle button and you are ready to go!
Combining Zaps with Mailjet Email Automation
Thanks to the Mailjet Email Automation feature, it is possible to create and manage automated workflows of emails, triggered by different events. This can be used in conjunction with zaps to send automatic emails to email addresses registered with a Contact / Lead, when the Contact / Lead information is being added to a Mailjet contact list.
To do this, you need to configure a Welcome automation scenario for the respective contact list. For more information, please visit the Mailjet Email Automation Guide.
Send Email with Mailjet Template Zap
General Information
In every business, it is often necessary to communicate quickly about new developments. You may need to promptly contact other partners or employees about new contacts, leads, opportunities etc. that have been added to Salesforce. To do this automatically, you can create a zap with the ‘Send Email with Mailjet Template’ action.
You can create highly customizable templates in Mailjet using our powerful and easy-to-use drag-and-drop Email Editor tool. You can then use these templates to send automatic emails to concerned parties, whenever the Zap is triggered.
The main benefits from using Mailjet’s Email Editor templates are:
- Extremely user-friendly interface
- Variety of options to customize your emails
- Easy to collaborate between teams on template design and content
- Templates are stored in the Email Editor and can be reused for other purposes
The zap will work like this:
- You create a trigger on your CRM for a certain event of your choice – e.g. a new Contact, Lead, Opportunity etc.
- You then create an action on Mailjet to ‘Send Email Using a Saved Mailjet Template’ when the respective event occurs.
Trigger Phase
-
Click on ‘Make a Zap!’, choose a zap name, then for a Trigger app select Salesforce. For reference click here.
-
Afterwards, choose the actual trigger – be it a New Contact, New Opportunity, New Lead etc. For this example we will choose a New Opportunity trigger.
-
Select the Salesforce account you will use, then test it, as usual. Click here for reference.
Action Phase
- Search for Mailjet in the Action App search bar and select the result.
-
Select the ‘Send Email Using a Saved Mailjet Template’ action and click on ‘Continue’.
-
Select the Mailjet account you want to use, or connect a new one. For reference click here.
-
The initial selections you need to make are the usual ones – for a Sender Address, Sender Name, Recipients and Email Subject.
-
Once you are done, you need to select a Mailjet template to use for the zap.
You will need to scroll through the list of templates, or simply use the Search menu, to find the one you need.
-
Once you have selected the template you want to use, you will be given the option to enable or disable the Template Language. You need this option turned on, if you want to personalize the email with contact properties or Salesforce variables.
-
You can link these emails to a Campaign for better email tracking and statistics. You can link it to an existing campaign, or – using a Custom Value – create a new one to use for that purpose.
-
You can also choose an email, where you will receive any error reports connected to issues with the use of templating language within the emails.
-
Now we come to the options to personalize your email template. You can add different variables in the text of your email in order to include details relevant to the communication.
Simply choose a detail from Salesforce that you want to include by selecting it from the drop-down menu.
You can select up to 5 variables to include in your email. In the end you will have a selection similar to the below.
Remember – you need to add the variables to the template text in order to include the necessary information. They are defined as
{{var:var1:”default text”}}
for the first one,{{var:var2:”default text”}}
for the 2nd one etc. The “default text” can be changed to accommodate situations where there is no value for the respective variable.Here is an example of how a template will look in the Email Editor with variables included and default text added to them.
When you are ready in Zapier with your template configuration, click on ‘Continue’.
-
You will now need to test the template – you will see the details you entered, as well as the information pulled from Salesforce for the variables you have opted to use.
Review the information and click on ‘Create & Continue’.
-
The only thing left is for you to ‘Finish’ and turn on the zap, and you are ready to go!
Send HTML Email Zap
General Information
Should you need a faster way to send an email, creating a template isn’t mandatory, you can also send plain HTML content directly from Zapier using the ‘Send HTML Email’ action. The template will lack the customizable design of the Email Editor, but that removes the necessity of creating a template in the Email Editor in the first place, so you will be able to create your zap quickly.
Trigger Phase
To configure the trigger please follow the same steps as in the Send Email with Mailjet Template Zap. For our example, we have chosen the ‘New Opportunity’ trigger.
Action Phase
- You have entered the Action phase. Search for Mailjet in the Action App search bar and select the result.
-
Select the ‘Send HTML Email’ action and click on ‘Save + Continue’.
-
Choose a linked Mailjet account, or connect a new one that you wish to use. For reference click here.
-
You will now be asked to create the email template by choosing a Sender email address, Sender name, Recipient Email address or addresses, Subject Line and email body.
You will also be able to choose a ‘Reply To’ address. This is optional, but allows you to select a different email address, where replies from recipients will be received.
You can personalize the email body or Subject field by inserting fields from Salesforce containing important information like the date and time of the activity, duration, attendees etc.
Once you are ready, click on ‘Continue’.
-
You will be asked to review and test the new template.
Click on ‘Create & Continue’, or if you wish to skip the test, select ‘Skip Test & Continue’.
-
Once you have successfully tested the zap, or skipped the test, you will need to ‘Finish’ the zap creation process. All that’s left after that is to turn on the zap and you are ready to go!
Send Email Campaign to a Mailjet Contact List Zap
General Information
The list of people you need to contact regarding certain developments can be ever changing. If you keep it in a contact list in your Mailjet account, you will probably find it more convenient to configure your zap to send emails to the respective contact list as a whole.
The main advantages of using a Mailjet contact list are:
- You only need to update your Mailjet contact list with the proper recipients in order to ensure that every person is added - no need to update every single Zap you’ve created whenever an email address needs to be added or removed.
- You can view your campaign stats in Mailjet to check deliverability reports and open / click rates.
Trigger Phase
To configure a trigger, please follow the same steps as in the Send Email with Mailjet Template Zap. For our example, we have again chosen the ‘New Opportunity’ trigger.
Action Phase
-
You have entered the Action phase. Search for Mailjet in the Action App search bar and select the result.
-
Select the ‘Send an Email Campaign to a List’ action and click on ‘Save + Continue’.
-
Choose a linked Mailjet account, or connect a new one that you wish to use. For reference click here.
-
You will now be asked to set up the campaign by choosing a Sender email address, Sender name, Contact List, Campaign Title, Subject Line and email body.
You will also be able to choose a ‘Reply To’ address. This is optional, but allows you to select a different email address, where replies from recipients will be received.
You can personalize the email body or Subject field by inserting fields from Salesforce containing important information like the opportunity name, assigned account, close date etc.
Once you are ready, click on ‘Continue’.
-
You will be asked to review and test the new template.
Click on ‘Send Test to Mailjet’, or if you wish to skip the test, select ‘Skip Test’.
-
Once you have successfully tested the zap, or skipped the test, you will need to ‘Finish’ the zap creation process.
-
All that’s left now is to turn on the zap and you are ready to go!
View Your Campaign Statistics
Every time a zap with the ‘Send Email Campaign to a List’ action is triggered, it will create a campaign and send out the email template you configured to the contact list you have selected.
The respective campaign will be recorded in Mailjet and you can see your campaign stats at any time by going to your Mailjet Campaigns and clicking on the name of the one you want to view.
For more information on Mailjet campaign stats, please visit our dedicated guide.
Parse Inbound Emails Zap
General Information
You can take advantage of the contact forms you set up to your website, in order to streamline the contact registration process. For example, a sales prospect fills out the Sales contact form on your website. With a properly set up zap, the email - with the key information in the email custom headers - will be transferred into Salesforce and automatically create a new prospect.
Trigger Phase
- Go to your Zapier account dashboard, click on ‘Make a Zap!’, then choose a name for your new Zap. For reference click here.
- In the ‘Choose a Trigger App’ search box, enter and select ‘Mailjet’.
-
Select the ‘Parse Inbound Email’ trigger and click ‘Save + Continue’.
-
Select the Mailjet account you want to use, or connect a new one. For reference click here.
-
As this point you will need to ask Mailjet to create a new parse email address for your Zap.
Although the long list of instructions on Zapier may look confusing, it is quite simple! :)
You can generate a parse email address using the Mac Command Terminal, Postman, Hurl.it or your favourite API Request Builder.
For this example, we will create the parse email address using Hurl.IT.
Open a new browser window and go to www.Hurl.it.
From the drop down list, select ‘POST’. Then paste in Mailjet Parse Route URL: https://api.mailjet.com/v3/REST/parseroute
(The Mailjet Parse Route URL will parse the inbound emails and send the contents to another location - in this case Zapier.)
Click the ‘+ Add Authentication’ link.
Add your Mailjet API Key (username) and Secret Key (password) into the respective text boxes. You can find this information in the API Key Management section of your Mailjet account.
Now you need to provide destination URL where the parsed email content should be sent. This URL is called a webhook URL.
Go back to your Zapier page and scroll to the bottom to find the webhook URL.
Click on the ‘Copy to clipboard’ button.
Go back to the Hurl.it page and click the ‘+Add Parameter(s)’ link.
In the name text box, enter: URL
And paste the webhook into the second text box.
Click the checkbox to confirm you are not a robot ;)
Then click on ‘Launch Request’.
Congratulations - you have made your first parse email address! When an email is sent to this parse email address, Mailjet will parse the elements of the email and send them to Zapier. Then your zap will forward the parsed elements to Salesforce or any other Zapier connected app.
And yes, the parse email address is quite long - please record it somewhere for future reference. ;)
-
Now you need to send a test email to your new parse email address to activate it.
Please ensure the email contains the information needed to create a new Lead in Salesforce. The minimum information needed by Salesforce to create a new lead is the company and last name. Once you have sent the test email, switch back to your Zapier screen and click on ‘OK, I did this’.
You should see the ‘Test Successful!’ Page with a link to view your parse inbound email (the test email you had sent a few minutes earlier).
If the test was not successful, click the Re-test Mailjet button to get another parse email address, or send another test email to the parse email address.
-
Click on the ‘Continue’ button to complete the Parse Inbound Email Trigger!
Action Phase
In the Action phase you tell Zapier what to do with the information that Mailjet parses from the email and sends to Zapier. In this use case, we are telling Zapier to add a contact prospect to Salesforce!
-
From the Choose an Action App search box, enter ‘Salesforce’ and select it from the list.
-
You will see a list of possible Salesforce actions. Select ‘Create a new lead’ and click on ‘Save + Continue’.
-
Select (or connect) a Salesforce account to use for this zap. Click here for reference.
-
You will now see all the fields associated with a Salesforce Lead.
You need to match the information from your test email to the respective Salesforce fields.
Simply call up the drop down list for the desired Salesforce field and match it to your email.
Once you have matched up all the fields, scroll to the bottom of the page and click on ‘Continue’.
-
The test page should say ‘Test Successful!’. (If the test was unsuccessful, please select the ‘Re-test Salesforce to get another lead’ option.)
Click on ‘Finish’.
-
And the last step – click on the toggle button to turn on your Zap.
You are done! Your Zap is on and will automatically run when an email is sent to your parse email address.
Email Events Zap
General Information
The Email Events trigger allows you to set up a Zap, which will activate upon a certain email event – e.g. the mail is opened, a link within it is clicked, it bounces and cannot be delivered etc. This allows you to transfer information back to your Salesforce account for the respective emails you are interested in.
Naturally, the ways to configure the Zap depend on the Zapier actions available for Salesforce. Here as an example we will configure a Zap to leave a note in a Salesforce contact every time this contact ‘clicks’ an email.
Trigger Phase
- Click on ‘Make a Zap!’, enter the name of your zap and choose Mailjet as the Trigger App.
-
Select the ‘Email Events’ trigger, then click on ‘Continue’.
-
Choose a Mailjet account to use, or link a new one to Zapier, if needed. For more information click here.
-
You will now need to select the events you want to automatically track for this trigger. Event Tracking simply means whenever there is an event, an event is dispatched to the provided Endpoint URL, containing meaningful context about the event (like the recipient email, timestamp, etc). From here, you can script actions to be done following it.
We will use the URL provided to allow Zapier to recognize when a link in an email was clicked, and subsequently trigger the Zap. To do that, first please copy the provided URL to your clipboard.
Then go to the Trigger Events section of your Mailjet account.
Follow the below instructions to configure the Endpoint URL for the Click trigger.
A. Tick the checkbox next to the ‘Click’ event.
B. Paste the previously copied URL into the ‘Endpoint URL’ field for the ‘Click’ event.
C. You can test the URL by clicking on the ‘Send’ button – if it is correct, you will receive a ‘OK, Code 200’ response.
D. Click on ‘Save’ to submit the changes.
-
Once you have done this, go back to Zapier and click on ‘Continue’.
-
You will be given the option to select a contact list for the zap. Call up the drop-down menu and choose the list you want to use.
Once you have made your selection, click on ‘Continue’.
-
You will be asked to review your selections – make sure that you have added the Endpoint URL link and selected the proper contact list. Click on ‘OK, I did this’.
-
The system will now want to test the trigger. Make sure that you have recent events matching your selections so far. In this case, we need a contact from the ‘Mail Events List’ contact list, who has clicked on a link in a Mailjet campaign recently.
-
Once the test is successful, click on ‘Continue’ to complete the trigger configuration.
Action Phase
-
Search for and select Salesforce as the Action App.
-
Choose the action you want the Zap to perform. In our example this will be a ‘Create Note’ action. Then click on ‘Continue’.
-
Select the Salesforce account you want to use, or connect a new one to Zapier. Once you have chosen the account, click on ‘Continue’. For reference click here.
-
You will now need to configure the note. To do that, you first need to select the object, to which you want to add the note. We want to add it to an existing Contact, so we will choose the same from the drop-down menu.
-
The next step is to configure how to find the Contact. We want it to be done dynamically for every email, so we will need to add a Search Step. Click on the ‘Add a Search Step’ button.
-
You will see a pop-up explaining that a Search step will be added before your current Action. Click on ‘OK, add it!’.
-
Zapier will automatically select the Action and Salesforce account for the Search action, so you will only need to set up the Search criteria. First, you need to select the Object Type you want to find – in our case we want to link the Note to a Contact in Salesforce, so we need the Contact object type.
-
We need to ask Zapier to search for the Salesforce Contact by email, so in the ‘Field to Search by’ you should select ‘Email’.
-
Finally, we need to select the Search Value – in this case, that would be the email address, to which the campaign email was sent.
When you have made the selections, click on ‘Continue’.
-
You will now need to test the step. You will see the pulled information from Mailjet, and Zapier will try to match it to a Contact on Salesforce. Click on ‘Search & Continue’.
-
Once the test is successful, the setup of the Search action is complete. Click on ‘Continue’ to continue configuring the actual Action for the Zap.
-
You will be transferred to your ‘Create Note’ Action configuration. As you have already made the selections for the Action App (Salesforce), the Action itself (Create Note) and the Salesforce account you want to use, simply go to the ‘Set Up Template’ step from the left-side menu.
-
You will see that the Object field is now filled with a Custom Value object – the one we configured with the Search Step.
-
The place where the Note will be added is set up. Now you need to configure the Note itself – its Title and Body, and whether it is Private or Public. Here is an example of a configured Note.
When you are ready, click on ‘Continue’.
-
Zapier will now ask you to test the zap – click on ‘Create & Continue’ to do that, or on ‘Skip Test & Continue’ to skip it. Afterwards simply Finish the Zap and turn it on and you are all set!
Troubleshooting
If you experience difficulties or have questions about the Pipedrive platform, please visit the Pipedrive Help Center.
The Zapier Help page can assist you with answers to questions about Zap functionalities and common issues.
Of course, feel free to contact our Customer Support team, in case you come across any technical difficulties with the Mailjet product - our team of specialists will be more than happy to assist you! Please visit the Mailjet ‘Contact Us’ page for more information.
Conclusion
We hope you find this guide helpful. Let us know what you think of the Zapier integration process, or especially what functionality we should introduce next by emailing plugins@mailjet.com.
Happy Zapping,
Mailjet Integrations Team