Resend icon

Resend

Interact with Resend API for emails, domains, API keys, broadcasts, audiences, and contacts

Actions25

Overview

This node integrates with the Resend API to manage emails and other related resources. Specifically, for the Email - Retrieve operation, it allows you to fetch detailed information about a previously sent or scheduled email by its unique ID.

Common scenarios where this is useful include:

  • Checking the status or details of an email after sending it.
  • Retrieving metadata or content of an email for auditing or logging purposes.
  • Verifying if an email was successfully delivered or canceled.

Practical example:

  • After sending an email through the node, you can use the "Retrieve" operation with the email's ID to get its current status and details such as delivery time, recipients, and content summary.

Properties

Name Meaning
Email ID The unique identifier of the email to retrieve. This ID is required to fetch the email data.

Output

The output is a JSON object containing the full details of the requested email as returned by the Resend API. This typically includes fields such as:

  • Email metadata (ID, status, timestamps)
  • Sender and recipient information
  • Subject line
  • Content preview or body (depending on API response)
  • Delivery and tracking information

No binary data is output by this operation.

Example output structure (simplified):

{
  "id": "ae2014de-c168-4c61-8267-70d2662a1ce1",
  "status": "delivered",
  "from": "sender@example.com",
  "to": ["recipient@example.com"],
  "subject": "Hello from n8n!",
  "html": "<p>Your HTML content here</p>",
  "text": "Your plain text content here",
  "sent_at": "2024-08-05T11:52:01.858Z",
  ...
}

Dependencies

  • Requires an API key credential for authenticating with the Resend API.
  • The node makes HTTP requests to https://api.resend.com/emails/{emailId} endpoint.
  • Ensure the API key has permissions to read email data.
  • No additional environment variables are needed beyond the API key credential.

Troubleshooting

  • Invalid or missing Email ID: The operation requires a valid email ID. If the ID is incorrect or not provided, the API will return an error. Verify the ID format and ensure it exists.
  • Authentication errors: If the API key is invalid or lacks proper permissions, the request will fail. Check that the API key credential is correctly configured and active.
  • Network issues: Connectivity problems may cause request failures. Confirm network access to the Resend API endpoint.
  • Email not found: If the email ID does not correspond to any email in the system, the API will return a not found error. Double-check the ID used.

Error messages from the API are passed through; typical messages include "Unauthorized", "Not Found", or validation errors. Handling these involves verifying credentials and input parameters.

Links and References

Discussion