Actions25
Overview
This node integrates with the Resend API to manage contacts within email audiences. Specifically, the Contact - Create operation allows users to add a new contact to a specified audience by providing an email address and optional additional details such as first name, last name, and subscription status.
Common scenarios where this node is beneficial include:
- Adding new subscribers to a mailing list or audience for email marketing campaigns.
- Automating contact creation from form submissions or CRM data.
- Managing segmented audiences by programmatically adding contacts with specific attributes.
For example, you could use this node to automatically add a user who signs up on your website to your newsletter audience, including their name and subscription preferences.
Properties
| Name | Meaning |
|---|---|
| The email address of the contact to be created (required). | |
| Audience ID | The identifier of the audience/list to which the contact will be added (required). |
| Additional Fields | Optional extra information about the contact: |
| - First Name: Contact's first name | |
| - Last Name: Contact's last name | |
| - Unsubscribed: Boolean flag indicating if the contact has unsubscribed from emails |
Output
The node outputs a JSON object representing the newly created contact as returned by the Resend API. This typically includes fields such as the contact's unique ID, email, audience association, and any additional metadata like names or subscription status.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"id": "con_123456",
"email": "contact@example.com",
"audience_id": "aud_123456",
"first_name": "John",
"last_name": "Doe",
"unsubscribed": false,
"created_at": "2024-06-01T12:00:00Z"
}
Dependencies
- Requires an active API key credential for the Resend service configured in n8n.
- The node makes HTTP requests to the Resend API endpoints.
- Network connectivity to
https://api.resend.comis necessary.
Troubleshooting
- Invalid or missing API key: The node requires a valid API key credential. Ensure the API key is correctly set up in n8n credentials.
- Audience ID not found: If the provided audience ID does not exist or is incorrect, the API will return an error. Verify the audience ID before running.
- Email format errors: The email must be a valid email address string; invalid formats may cause API rejection.
- Unsubscribed field issues: The
unsubscribedproperty expects a boolean value. Passing other types may cause unexpected behavior. - Network errors: Check internet connectivity and firewall settings if requests fail.
If the node throws an error, enabling "Continue On Fail" can help process multiple items without stopping the workflow.
Links and References
- Resend API Documentation - Contacts
- Resend Official Website
- n8n HTTP Request Node Documentation (for understanding underlying HTTP calls)