Leverage the React email package to send email notifications
my-novu-app
but you can choose your own.Give your app a name
Choose if you want to install React email or not
Let all the dependencies get installed
npm run dev
command, and your app will be served on localhost:4000
http://localhost:4000
and you can make changes to your app as you see fit. Let’s now move to the meaty stuff - using Novu Framework in a NextJS app and the magic of Dev Studio.
npx novu-labs@latest echo
. The Dev Studio will be started by default on port 2022
, and accessible via: http://localhost:2022
Echo Dev Studio runs on 'localhost:2022' by default. Here I’m already using port 2022 so it is starting on a different port but we recommend ensuring that port 2022 is free
Echo Dev Studio on the first run
Bridge endpoint
at the bottom. Novu Framework requires a single HTTP endpoint (/api/novu
or similar) to be exposed by your application. This endpoint is used to receive events from our Worker Engine. We have more on Bridge endpoint in our docs.
http://localhost:4000/api/echo
Enter Echo endpoint URL
connected
highlight at the top right corner.
Echo Dev Studio now picks up the workflow we just created
Sync to Cloud
button.
create-novu-app
command sets up localtunnel
for you. Running the npm run dev
script in the project launches both the Bridge application and the tunnel solution. The tunnel URL shows up in the console output.
You can also use a tool like ngrok
:
ngrok has done its magic
/api/novu
or similar) you expose in your application for handling Novu Framework requests is what you’d consider the Bridge URL
.
This URL would be the endpoint within your application’s domain where Novu’s Worker Engine sends requests to fetch notification content or subscriber details dynamically. In our case, it is this: https://0536-2409-40f2-1039-43e1-3053-d98e-c276-ee5.ngrok-free.app/api/echo
So, we’ll enter this Bridge URL:
Enter the Bridge URL in the Dev Studio
Echo Dev Studio will create a diff for you
Test your workflow will take you to Novu Cloud
You'll see the workflow created using Novu Framework with the blue lightning bolt icon
Enter the respective data and test your workflow
Workflow test email in my inbox
submit
event fires:
Here’s a simple replication of the stipulated scenario:
AWS verification example
Apple invoice email example