Search all guides

Reference · Tools

Mailjet integration

Send transactional emails (plain or template-based) and SMS messages via the Mailjet API.

Action (binary) Communication v1 Binary data

The Mailjet node sends transactional email, either free-form or from a Mailjet template, and can also send SMS. A typical build is emailing an order confirmation from a template and texting the delivery notification from the same workflow.

Works as
Action (binary)
Tool name
mailjet
Operations
3 — Send , Send Template , Send
Parameters
24
Outputs
Output, Error
Credentials
Mailjet Email API , Mailjet SMS API
Official docs
Mailjet docs dev.mailjet.com

What you can build with Mailjet

  • Send a transactional email with HTML content via Mailjet.
  • Send an email using a Mailjet template with custom variables.
  • Send an SMS notification through Mailjet SMS API.
  • Send a marketing email with click and open tracking enabled.

Overview

Sends transactional emails and SMS messages via the Mailjet API. Supports two resources: Email and SMS. For Email, you can send plain emails with HTML/text body parts, CC, BCC, reply-to, tracking options, variables, and custom campaigns, or send template-based emails using a pre-configured Mailjet template ID. For SMS, you can send text messages to phone numbers in E.164 format. Email operations use the Mailjet Send API v3.1 with HTTP Basic Auth (API Key + Secret Key). SMS operations use the Mailjet SMS API v4 with Bearer Token auth. SandboxMode can be enabled via the email credential to validate payloads without delivering.

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Mailjet Email API, Mailjet SMS API credentials. See the Credentials Guide for setup instructions.

The two credentials cover different resources and neither is mandatory on its own: configure Mailjet Email API for the Email resource, Mailjet SMS API for the SMS resource, or both if the node is used for each in different workflows.

Resources

ResourceValue
Emailemail
SMSsms

Operations

OperationValueDescription
SendsendSend a basic email
Send TemplatesendTemplateSend an email using a Mailjet template
SendsendSend an SMS message

The Email resource offers Send and Send Template; the SMS resource offers Send. Both send operations share the same value — the selected resource decides which one runs.

Parameters

Email: Send

ParameterTypeRequiredDefaultDescription
From EmailstringYes—Sender email address. Supports expressions.
To EmailstringYes—Email address of the recipient. Multiple ones can be separated by comma. Supports expressions like {{ $json.email }}.
Text (text)stringNo—Plain text message of the email. Supports expressions.
HTMLstringNo—HTML text message of the email. Supports expressions.
JSON ParametersbooleanNofalseWhether to provide template variables as a JSON object instead of key-value pairs.
Variables (JSON)stringNo—Template variables as a JSON object string. (shown when JSON Parameters is true)
VariablesfixedCollectionNo{}Template variables as key-value pairs. (shown when JSON Parameters is false)
— NamestringNo—The variable name as referenced in the message body.
— ValuestringNo—The value substituted for that variable. Supports expressions.
Additional FieldscollectionNo{}Extra recipients, tracking and campaign settings.
— Bcc EmailstringNo—BCC email address(es). Multiple ones can be separated by comma.
— Cc EmailstringNo—CC email address(es). Multiple ones can be separated by comma.
— Cc AddressesstringNo—Deprecated alias for Cc Email; kept for back-compat. Use Cc Email going forward.
— Custom CampaignstringNo—Custom campaign name for tracking.
— Deduplicate CampaignbooleanNofalseWhether to deduplicate campaign sends.
— From NamestringNo—Sender display name.
— PrioritynumberNo2Email priority level.
— Reply TostringNo—Reply-to email address.
— Template LanguagebooleanNofalseWhether to enable Mailjet template language processing in the email body.
— Track ClicksoptionsNoaccount_defaultEnable or disable click tracking on this message.
Options: account_default (use the values specified in the Mailjet account), disabled (disable tracking for this message), enabled (enable tracking for this message)
— Track OpensoptionsNoaccount_defaultEnable or disable open tracking on this message.
Options: account_default (use the values specified in the Mailjet account), disabled (disable tracking for this message), enabled (enable tracking for this message)
Custom IDstringNo—Optional Mailjet CustomID for server-side dedup on retry. If blank, a stable value derived from this execution and node is used.

Email: Send Template

ParameterTypeRequiredDefaultDescription
From EmailstringYes—Sender email address. Supports expressions.
To EmailstringYes—Email address of the recipient. Multiple ones can be separated by comma. Supports expressions like {{ $json.email }}.
Template IDstringYes—The Mailjet template ID. Find it in your Mailjet dashboard under Transactional > Templates. Must resolve to a whole number. Supports expressions.
JSON ParametersbooleanNofalseWhether to provide template variables as a JSON object instead of key-value pairs.
Variables (JSON)stringNo—Template variables as a JSON object string. (shown when JSON Parameters is true)
VariablesfixedCollectionNo{}Template variables as key-value pairs. (shown when JSON Parameters is false)
— NamestringNo—The variable name as referenced in the template.
— ValuestringNo—The value substituted for that variable. Supports expressions.
Additional FieldscollectionNo{}Extra recipients, tracking and campaign settings.
— Bcc EmailstringNo—BCC recipients, comma-separated.
— Cc EmailstringNo—CC recipients, comma-separated.
— Cc AddressesstringNo—Deprecated alias for Cc Email; kept for back-compat. Use Cc Email going forward.
— Custom CampaignstringNo—Custom campaign name for tracking.
— Deduplicate CampaignbooleanNofalseWhether to deduplicate campaign sends.
— From NamestringNo—Sender display name.
— PrioritynumberNo2Email priority level.
— Reply TostringNo—Reply-to email address.
— SubjectstringNo—Override the template subject line.
— Template LanguagebooleanNofalseWhether to enable Mailjet template language processing.
— Track ClicksstringNo—Enable or disable click tracking. Values: account_default, disabled, enabled.
— Track OpensstringNo—Enable or disable open tracking. Values: account_default, disabled, enabled.
Custom IDstringNo—Optional Mailjet CustomID for server-side dedup on retry. If blank, a stable value derived from this execution and node is used.

SMS: Send

ParameterTypeRequiredDefaultDescription
FromstringYes—Customizable sender name. Should be between 3 and 11 characters in length, only alphanumeric characters are allowed. Supports expressions.
TostringYes—Recipient phone number in E.164 format (e.g., +33600000000). Should be between 3 and 15 characters starting with +. Supports expressions like {{ $json.phone }}.
Text (smsText)stringYes—The SMS message text. Supports expressions.

All Operations

ParameterTypeRequiredDefaultDescription
SubjectstringNo—Subject line of the email. This field is always visible, including while the SMS resource is selected. Supports expressions.
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

The Mailjet response is merged into the item JSON at the top level, so the fields the input item already carried pass through unchanged and binary data is forwarded.

OperationOutput items
email / sendOne item per message Mailjet reports back. One input item sends one message, so in practice one item out per item in
email / sendTemplateOne item per message Mailjet reports back — again one per input item in practice
sms / sendOne item per input item, carrying the SMS send response

Email sends carry a Status field on each returned message. Mailjet answers with HTTP 200 even when an individual message was rejected, so a message that comes back with Status set to error is turned into an item error (Error port or skipped, per your error mode) rather than passing through as a success.

Attachments. Every binary property present on the input item is sent as an email attachment on the Email resource, using the property’s stored file name and MIME type. There is nothing to configure — attach files by putting them on the item upstream. Individual attachments are capped at 15 MB.

Example Configuration

Basic email with both body parts:

{
  "type": "mailjet",
  "parameters": {
    "resource": "email",
    "operation": "send",
    "fromEmail": "sender@example.com",
    "toEmail": "recipient@example.com",
    "subject": "Test Email",
    "text": "This is a plain text email",
    "html": "<h1>This is an HTML email</h1>",
    "jsonParameters": false,
    "maxConcurrency": 10
  }
}

Email with template variables supplied as key-value pairs, all drawn from the incoming item:

{
  "type": "mailjet",
  "parameters": {
    "resource": "email",
    "operation": "send",
    "fromEmail": "sender@example.com",
    "toEmail": "{{ $json.email }}",
    "subject": "Welcome {{ $json.firstName }}!",
    "html": "<h1>Hello {{ $json.firstName }} {{ $json.lastName }}!</h1>",
    "jsonParameters": false,
    "variablesUi": {
      "variablesValues": [
        {
          "name": "firstName",
          "value": "{{ $json.firstName }}"
        },
        {
          "name": "lastName",
          "value": "{{ $json.lastName }}"
        }
      ]
    },
    "additionalFields": {
      "fromName": "Welcome Team",
      "replyTo": "support@example.com"
    }
  }
}

The same thing with the variables supplied as one JSON string:

{
  "type": "mailjet",
  "parameters": {
    "resource": "email",
    "operation": "send",
    "fromEmail": "sender@example.com",
    "toEmail": "recipient@example.com",
    "subject": "Welcome {{ $json.firstName }}!",
    "html": "<h1>Hello {{ $json.firstName }} {{ $json.lastName }}!</h1>",
    "jsonParameters": true,
    "variablesJson": "{\"firstName\": \"John\", \"lastName\": \"Doe\", \"company\": \"Acme Corp\"}"
  }
}

Send a pre-built Mailjet template:

{
  "type": "mailjet",
  "parameters": {
    "resource": "email",
    "operation": "sendTemplate",
    "fromEmail": "sender@example.com",
    "toEmail": "recipient@example.com",
    "templateId": "123456",
    "jsonParameters": false,
    "variablesUi": {
      "variablesValues": [
        {
          "name": "userName",
          "value": "johndoe"
        },
        {
          "name": "resetLink",
          "value": "https://example.com/reset/abc123"
        }
      ]
    },
    "additionalFields": {
      "subject": "Password Reset Request",
      "fromName": "Support Team",
      "trackClicks": "enabled",
      "trackOpens": "enabled"
    }
  }
}

Send an SMS:

{
  "type": "mailjet",
  "parameters": {
    "resource": "sms",
    "operation": "send",
    "from": "YourApp",
    "to": "+33600000000",
    "smsText": "Your verification code is: 123456",
    "maxConcurrency": 5
  }
}

Transactional email with tracking and a campaign name:

{
  "type": "mailjet",
  "parameters": {
    "resource": "email",
    "operation": "send",
    "fromEmail": "orders@store.com",
    "toEmail": "{{ $json.customerEmail }}",
    "subject": "Order Confirmation #{{ $json.orderNumber }}",
    "html": "<h1>Thank you for your order!</h1><p>Order #{{ $json.orderNumber }} has been confirmed.</p>",
    "jsonParameters": false,
    "variablesUi": {
      "variablesValues": [
        {
          "name": "orderNumber",
          "value": "{{ $json.orderNumber }}"
        }
      ]
    },
    "additionalFields": {
      "fromName": "Your Store",
      "replyTo": "support@store.com",
      "trackClicks": "enabled",
      "trackOpens": "enabled",
      "customCampaign": "order-confirmations"
    }
  }
}

One email addressed to several recipients, with an archive copy:

{
  "type": "mailjet",
  "parameters": {
    "resource": "email",
    "operation": "send",
    "fromEmail": "newsletter@company.com",
    "toEmail": "user1@example.com,user2@example.com,user3@example.com",
    "subject": "Monthly Newsletter",
    "html": "<h1>This month's updates</h1>",
    "additionalFields": {
      "fromName": "Company Newsletter",
      "bccEmail": "archive@company.com"
    },
    "maxConcurrency": 3
  }
}

Template email with JSON variables:

{
  "type": "mailjet",
  "parameters": {
    "resource": "email",
    "operation": "sendTemplate",
    "fromEmail": "welcome@app.com",
    "toEmail": "newuser@example.com",
    "templateId": "4210001",
    "jsonParameters": true,
    "variablesJson": "{\"firstName\": \"Sarah\", \"appName\": \"MyApp\", \"loginUrl\": \"https://app.com/login\", \"supportEmail\": \"help@app.com\"}",
    "additionalFields": {
      "fromName": "MyApp Team",
      "customCampaign": "user-onboarding"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

This tool sends transactional emails and SMS messages using the Mailjet service. It is ideal for delivering plain or template-based emails with tracking options, or for sending SMS notifications. The tool produces a confirmation of email or SMS message delivery.

Key Notes

  • Template ID must be numeric. Mailjet template IDs are integers; a name or slug is rejected before the request is sent.
  • Braces belong to the workflow, not to Mailjet. Anything you type as {{ … }} in a field is evaluated as a workflow expression before Mailjet ever sees it, and only $json, $index, $itemCount, $datetime and $uuid are understood. To personalise a body from item data write {{ $json.firstName }}; to hand a value to a Mailjet template, put it in Variables instead of writing Mailjet placeholder syntax in the body.
  • Cc Addresses is deprecated. Use Cc Email; the two are interchangeable and Cc Email wins if you set both.
  • Subject is a shared field. It stays on screen while the SMS resource is selected even though SMS has no subject line.

Frequently asked questions

Why is my template ID rejected?

Mailjet template IDs are integers. A name or slug is rejected before the request is even sent, so look up the numeric ID in Mailjet.

Why are my Mailjet personalisation variables not working?

Anything typed as `{{ … }}` is evaluated as a workflow expression before Mailjet sees it, and only `$json`, `$index`, `$itemCount`, `$datetime` and `$uuid` are understood. Personalise using workflow expressions rather than Mailjet's own template syntax in those fields.

Does email and SMS use the same credential?

No — they are separate: a Mailjet Email API credential and a Mailjet SMS API credential. Configure whichever the operation you are using requires.

How do I react to delivery events?

Use the Mailjet Trigger, which fires on blocked, bounce, open, sent, spam and unsubscribe events.

Build with Mailjet

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Mailjet Email API credentials first.

Open BusyBot

Last reviewed . Spotted something wrong? Tell us.