> ## Documentation Index
> Fetch the complete documentation index at: https://v0.x-docs.novu.co/llms.txt
> Use this file to discover all available pages before exploring further.

# React E-mail

Integrating Novu Framework with [React.Email](https://react.email/) for your Next.js application can be done in three steps. If you don't have an app, you can create one with the `create-novu-app` command.

<Steps>
  <Step title="Install React.Email components">
    Install the required React.Email components.

    ```bash theme={null}
      npm i @react-email/components react-email
    ```
  </Step>

  <Step title="Write your email">
    Create a new `sample-email.tsx` file for your email template.

    ```tsx theme={null}
    import * as React from "react";
    import { Button, Html } from "@react-email/components";

    function Email(props) {
      return (
        <Html>
          <Button
            href="https://example.com"
            style={{ background: "#000", color: "#fff", padding: "12px 20px" }}
          >
            Click me
          </Button>
        </Html>
      );
    }

    export function renderEmail(inputs) {
      return render(<Email {...inputs} />);
    }
    ```
  </Step>

  <Step title="Write your workflow">
    Define your Workflow using the above template

    ```tsx theme={null}
    import { renderEmail } from './sample-email.tsx';
    import { workflow } from '@novu/framework';

    workflow('new-signup', async ({ step, payload }) => {
      await step.email('send-email', async (inputs) => {
        return {
          subject: `Welcome to React E-mail`,
          body: renderEmail(inputs),
        }
      });
    });
    ```
  </Step>
</Steps>
