Mailjet Destination
3 minute read
Mailjet is a popular email marketing and delivery platform. It lets you create and send impactful email marketing campaigns, newsletters, and automated emails to grow your business.
Find the open source code for this destination in the GitHub repository.
Connection compatibility
| Destination Information | |||
|---|---|---|---|
| |||
Get started
Once you have confirmed that the source platform supports sending events to Mailjet, follow these steps:
- From your RudderStack dashboard, add the source. Then, from the list of destinations, select Mailjet.
- Assign a name to your destination and click Continue.
Connection settings
To successfully set up Mailjet as a destination, you need to configure the following settings:
- Mailjet API Key: Enter your Mailjet API key.
- Mailjet API Secret: Enter your Mailjet secret key.
- Mailjet Contact List ID: Enter your Mailjet contact list ID. RudderStack will use this ID if the list ID is not provided via the
externalIdfield in the event’s payload.
Refer to the FAQ section for more information on obtaining the Mailjet API Key, secret key, and contact list ID.
- Map RudderStack user attributes to Mailjet contact properties: Use this setting to map your RudderStack event properties to specific custom properties created in the Mailjet dashboard. For more information on creating and managing contact properties, refer to the Mailjet documentation.
Mailjet will not create a contact for the event properties configured in the RudderStack dashboard but not created in Mailjet.
Identify
You can use the identify call to add or remove a contact in Mailjet. If a contact already exists, RudderStack updates the contact details.
A sample identify call is shown below:
rudderanalytics.identify('1hKOmRA4el9Z', {
firstName: 'Alex',
lastName: 'Keener',
email: "alex@example.com"
},
externalId: [{
type: "listId",
id: "13314el9Z"
}],
integrations: {
Mailjet: {
Action: "remove"
}
}
);When sending events to Mailjet, note the following:
- The
emailfield is mandatory. Otherwise, Mailjet rejects the events. - You can specify the Mailjet list ID either in the Mailjet Contact List ID setting of the RudderStack dashboard or in the
externalIdfield. - You can specify the Mailjet action (adding/removing user) in the
Actionfield of theintegrationsobject. If no action is specified, RudderStack sets this field toaddnoforce, by default.
For more information on theaddnoforceparameter, refer to the Mailjet Subscriptions API reference.
Supported mappings
The following table lists the mappings between the RudderStack attributes and the Mailjet properties:
| RudderStack property | Mailjet property |
|---|---|
traits.emailRequired | Email |
traits.name | Name |
context.traits.IsExcludedFromCampaignstraits.IsExcludedFromCampaigns | IsExcludedFromCampaigns |
FAQ
Where can I find the Mailjet API key and secret key?
To obtain your Mailjet API key and secret, follow these steps:
- Log into your Mailjet dashboard.
- From the top right section of the dashboard, click your name and go to Account settings > REST API > API Key Management (Primary and Sub-account). Your primary API key and secret will listed here:

Where can I find contact list ID in Mailjet?
To get your Mailjet contact list ID, log into your Mailjet dashboard and go to Contacts > Contact Lists. You can find your contact lists and the associated IDs listed here:
