In this article we will explain how you can send triggered campaigns in Mailmodo from your CleverTap account

  • First create the email to be used in the campaign
  • Set up this email as a campaign in the campaign tab and choose ‘Send on Trigger’ in the ‘Add Contacts’ section
  • Go to the ‘Review and Send’ section and enable this campaign
  • Once enabled your active campaign will appear in the ‘Dashboard’
  • Click on the created campaign and go to the ‘Integration’ tab. Here, you need to copy the ‘Trigger End point’
  • Next Go to settings in your Mailmodo Account and copy one of the API keys of your account. One can create new API keys for individual applications

  • Go to settings in your CleverTap account, under the engage section, select Channel and click on Webhooks
  • Create a new Webhook and enter the ‘Trigger Endpoint’ from your campaign into the ‘Destination URL’. Choose ‘POST’ as the ‘HTTP method’ & name your Webhook
  • Also enable Header parameter and add your API key in the ‘Value’ field. The ‘Key’ field must always be ‘mmApiKey’. Click on create webhook
  • Now you can use this Webhook to trigger emails to be sent from Mailmodo in your CleverTap account
  • In this example we will show how you can add this Webhook in one of your CleverTap journeys. To use the Webhook, add it in your journey builder after any condition

  • Click on the Webhook block to open its settings. Choose the Webhook you just created under the ‘Webhook URL’ dropdown
  • Then copy the following code snippet into the Webhook payload and choose the format as JSON:

{

"email":"abc@gmail.com",

"data":{

"firstName":"John"

}

}

  • The argument to “email” points to recipient emails and “data” points to the personalisation parameters. Replace the email argument ‘abc@gmail.com’ with ‘@’ and select the email field from your contact list.
  • Also replace the parameter ‘John’ with ‘@’ and select the appropriate field matching the parameter ‘firstName’.
  • You can add more parameters depending on the campaign, by adding a few extra lines of code in the “data” section
  • Make sure that the key of the parameter is exactly same as the key written in the email campaign

For example:

{

"email":"abc@gmail.com",

"data":{

"firstName":"John",

“lastName”:”Doe”,

“Age”:”18”,

}

}

  • Save and Close the Webhook. Now this Webhook trigger is part of your journey and can trigger emails from Mailmodo
Did this answer your question?