Back to Novu

Resend Email Integration with Novu

docs/platform/integrations/email/resend.mdx

3.18.03.4 KB
Original Source

You can use the Resend provider to send transactional emails to your customers using the Novu Platform with a single API to create multi-channel experiences.

Getting Started

To use the Resend provider in the email channel, you will need to create a Resend account and add your API key to the Resend integration on the Novu platform.

Generating an API Key

To generate a new API key in Resend, you can follow these steps:

  • Sign up or Log in to your Resend account.
  • Click on the API Keys link in the left sidebar, and then click the "Create API Key" button on the top right part of the page.
  • On the API Keys page, click the Create API Key button.
  • Give the API key a name and click on the Add button.
  • Copy the generated API Key.

Authenticating your Sender Identity

Before you can send emails on a large scale, you will need to authenticate your Sender Identity.

Resend allows you to authenticate your sender identity using Domain Authentication.

Creating a Resend integration with Novu

  • Visit the Integrations page on Novu.
  • Click on Add a Provider.
  • Select Resend service.
  • Enter your Resend API Key.
  • Fill in the From email address field using the authenticated email from the previous step.
    • For testing, you can use [email protected] if you have not authenticated your sender identity.
  • Fill in the Sender's name.
  • Click on the Disabled button and mark it as Active.
  • Click on the Update button.
  • You should now be able to send notifications using Resend in Novu.

React Email with Code Steps

<Tip> Resend maintains [React Email](https://react.email). Use Novu [Code Steps](/platform/workflow/add-and-configure-steps/code-steps) to author templates in React Email and deliver them through your Resend integration—no dashboard HTML editor required. </Tip>
  1. Connect Resend in Novu (steps below).
  2. Add an email step and switch it to Custom Code.
  3. Publish a handler linked to your React Email template:
bash
npx novu step publish \
  --workflow your-workflow-id \
  --step your-email-step-id \
  --template ./emails/welcome.tsx \
  --secret-key nv-sk-...

The CLI scaffolds a handler that calls render() from @react-email/components and returns HTML for Novu to send via Resend. See Code Steps for the more details.

Next Steps

<Columns cols={2}> <Card title="Code Steps with React Email" icon="code" href="/platform/workflow/add-and-configure-steps/code-steps"> Publish React Email templates from your codebase and send them through Resend. </Card> <Card title="Configure bcc, cc, and reply-to" href="/platform/integrations/email#sending-email-overrides"> Learn how to configure bcc, cc, and reply-to for your email notifications using email overrides </Card> <Card title="Sending email attachments" href="/platform/integrations/email#sending-email-attachments"> Learn how to send attachments with email notifications </Card> <Card title="Use different email integration" href="/platform/integrations/email#sending-email-overrides"> Learn how to use different email provider integrations to be used to send emails </Card> </Columns>