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 resource with the Cancel operation, it allows users to cancel a scheduled email by providing its unique Email ID. This is useful in scenarios where an email was scheduled to be sent but needs to be stopped before delivery, such as correcting mistakes or changing campaign plans.

Practical example:

  • You schedule a marketing email to be sent later but realize there is an error in the content. Using this node's Cancel operation, you can stop the email from being sent without needing to manually intervene in the Resend dashboard.

Properties

Name Meaning
Email ID The unique identifier of the email that you want to retrieve, update, or cancel.

Output

The output is a JSON object representing the response from the Resend API after attempting to cancel the specified email. It typically contains details about the cancellation status or any relevant metadata returned by the API.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "id": "ae2014de-c168-4c61-8267-70d2662a1ce1",
  "status": "cancelled",
  "scheduled_at": "2024-08-05T11:52:01.858Z",
  "to": ["user@example.com"],
  "from": "you@example.com",
  "subject": "Hello from n8n!"
}

Dependencies

  • Requires an API key credential for authenticating with the Resend API.
  • The node makes HTTP requests to https://api.resend.com endpoints.
  • No additional environment variables are needed beyond the API key configuration.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent Email ID will result in an error from the API.
    • Attempting to cancel an email that has already been sent or is not scheduled may fail.
    • Missing or incorrect API key credentials will cause authentication errors.
  • Error messages and resolutions:

    • "Unauthorized" or "Invalid API key": Check that the API key credential is correctly set up and valid.
    • "Email not found": Verify the Email ID is correct and corresponds to a scheduled email.
    • "Cannot cancel email": The email might have already been sent or canceled; confirm the email status before attempting cancellation.

Links and References

Discussion