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.

Note

he events currently supported by this trigger are email sent, opened, clicked, bounced, spam and blocked. You can see a description for all events in the Mailjet Email Statuses page.

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

  1. Click on ‘Make a Zap!’, enter the name of your zap and choose Mailjet as the Trigger App.
  2. Select the ‘Email Events’ trigger, then click on ‘Continue’.

    salesforce-img35

  3. Choose a Mailjet account to use, or link a new one to Zapier, if needed. For more information click here.

  4. 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.

    Note

    Mailjet allows you to track each event from one URL at a time, so it will not be possible to track a Click event simultaneously from Zapier and a custom URL, for example.

    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.

    salesforce-img36

    Then go to the Trigger Events section of your Mailjet account.

    salesforce-img37

    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.

    Note

    In order to track email Clicks or Opens, you need also to have the respective options turned on in your Account Settings as well.

  5. Once you have done this, go back to Zapier and click on ‘Continue’.

    salesforce-img38

  6. 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.

    salesforce-img39

    Note

    If you do not select a contact list, the trigger will activate for all contacts linked to your Mailjet account. This will allow you to track transactional emails as well.

    Once you have made your selection, click on ‘Continue’.

  7. 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’.

    salesforce-img40

  8. 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.

  9. Once the test is successful, click on ‘Continue’ to complete the trigger configuration.

    salesforce-img41

Action Phase

  1. Search for and select Salesforce as the Action App.

    salesforce-img42

  2. Choose the action you want the Zap to perform. In our example this will be a ‘Create Note’ action. Then click on ‘Continue’.

    salesforce-img50

  3. 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.

  4. 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.

    salesforce-img51

  5. 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.

    salesforce-img52

  6. You will see a pop-up explaining that a Search step will be added before your current Action. Click on ‘OK, add it!’.

    salesforce-img53

  7. 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.

    salesforce-img44

  8. We need to ask Zapier to search for the Salesforce Contact by email, so in the ‘Field to Search by’ you should select ‘Email’.

    salesforce-img45

  9. Finally, we need to select the Search Value – in this case that would be the email address, to which the campaign email was sent.

    salesforce-img46

    When you have made the selections, click on ‘Continue’.

    salesforce-img47

  10. 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’.

    salesforce-img48

  11. 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.

    salesforce-img49

  12. 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.

    salesforce-img54

  13. You will see that the Object field is now filled with a Custom Value object – the one we configured with the Search Step.

    salesforce-img55

  14. 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.

    salesforce-img56

    When you are ready, click on ‘Continue’.

  15. 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!