MailerSend icon

MailerSend

Interact with MailerSend API

Overview

This node integrates with the MailerSend API to send emails using predefined email templates. It is designed to automate sending templated emails where dynamic content can be injected into placeholders within the template. This is particularly useful for transactional emails, marketing campaigns, or any scenario requiring consistent email formatting with personalized data.

For example, you could use this node to send a welcome email to new users by selecting a "Welcome" template and injecting the user's name and signup date as variables. Another use case is sending order confirmation emails with order details dynamically inserted.

Properties

Name Meaning
From Email The sender's email address (e.g., admin@example.com). Required.
From Name The sender's display name (e.g., "Some Name").
To Emails One or more recipient email addresses and optional names. Multiple recipients can be added.
Cc Email One or more CC recipient email addresses. Multiple can be added.
Subject The subject line of the email. Required.
Template Name or ID The ID or name of the MailerSend email template to use. Select from a list or specify via expression.
Values To Inject Key-value pairs representing variables and their values to inject into the template placeholders.
Personalizations To Inject Additional personalization key-value pairs to customize the email further.

Output

The node outputs an array of JSON objects corresponding to each email sent. Each object contains the response from the MailerSend API after attempting to send the email. This typically includes status information about the email delivery request.

No binary data output is produced by this node.

Dependencies

  • Requires a valid MailerSend API key credential configured in n8n.
  • Uses the MailerSend REST API endpoint https://api.mailersend.com/v1/email.
  • The node depends on helper functions to load available templates and format personalization data.

Troubleshooting

  • Common issues:

    • Invalid or missing API key will cause authentication errors.
    • Incorrect template ID or name may result in template not found errors.
    • Missing required fields such as "From Email", "To Emails", or "Subject" will cause validation errors.
    • Improperly formatted email addresses can lead to request failures.
  • Error messages:

    • Authentication errors usually indicate problems with the API key setup.
    • HTTP 400 errors often mean invalid input parameters; verify all required fields and formats.
    • Network or timeout errors suggest connectivity issues with the MailerSend API.
  • Resolution tips:

    • Ensure the API key credential is correctly set up in n8n.
    • Double-check that the template ID exists and is accessible.
    • Validate all email addresses and required fields before execution.
    • Review the error message details logged by the node for specific guidance.

Links and References

Discussion