Mailtrap icon

Mailtrap

Interact with Mailtrap API

Overview

This node allows you to create a new contact in the Mailtrap service. It is useful for scenarios where you want to programmatically add contacts to your Mailtrap account, such as importing users from another system or automating contact management workflows. For example, you might use this node to add a new subscriber's email and associated details to your Mailtrap contact list whenever they sign up on your website.

Properties

Name Meaning
Authentication Method of authentication to use with Mailtrap API. Options: "API Token" or "Bearer Token".
Account ID Your Mailtrap account identifier, found at https://mailtrap.io/account-management.
Email The email address of the contact to be created.
Fields (JSON) Additional contact information provided as a JSON object, e.g., first name, last name, etc.
List IDs Comma-separated list of Mailtrap list IDs to which the contact should be added, e.g., "1, 2, 3".

Output

The node outputs JSON data representing the newly created contact. This typically includes the contact's unique identifier, email, any additional fields provided, and the lists the contact belongs to. The output does not include binary data.

Dependencies

  • Requires an active Mailtrap account.
  • Requires either an API token or a bearer token for authentication.
  • The user must provide the Mailtrap Account ID.
  • No additional environment variables are explicitly required beyond the authentication tokens.

Troubleshooting

  • Invalid Authentication: If the API or bearer token is incorrect or expired, the node will fail to authenticate. Ensure the token is valid and has appropriate permissions.
  • Missing Required Fields: The node requires Account ID and Email. Omitting these will cause errors.
  • Malformed JSON in Fields: The Fields (JSON) property must be valid JSON. Invalid JSON syntax will cause parsing errors.
  • Incorrect List IDs Format: The List IDs field expects comma-separated numeric IDs without extra characters. Incorrect formatting may lead to failure in adding the contact to lists.

Links and References

Discussion