Learn how to use Novu to quickly send multi-channel (SMS, Email, Chat, Push) notifications with Java.
pom.xml
file;
build.gradle
file;
Novu.java
class using any of the following constructors:
Channel | Providers |
---|---|
MailGun, Mandrill, MailJet, Amazon SES, Sendgrid, Postmark, Netcore | |
SMS | Twilio, Amazon SNS, Plivo, SMS, SMSCentral, Kannel, Infobip, Termii |
Chat | Mattermost, Slack, Microsoft Teams, Discord |
Push | FCM, APNS, Expo |
Channel | Content Style | Custom Variables{{handlebars}} format |
---|---|---|
HTML | ✅ | |
Visual Editor | ✅ | |
SMS | Text | ✅ |
Chat | Text | ✅ |
In-App | Text | ✅ |
Push | Text | ✅ |
Creating a workflow in Novu dashboard
Renaming the newly created notification workflow
Adding email channel to the notification workflow we created above
Adding email and description to the editor in the notification workflow we created above
Adding variables to the 'variables' section
Navigate to `Subscribers` from the left sidebar
phone
, avatar
, and data
. The data
field can accept an Object or a Map with the info you want to attach to the subscriber.
payload
is an array of the data that you want to be dynamically injected into the notification workflow content.subscriberId
is the ID of the subscriber on Novu. Replace 12345
with your subscriber ID.key
, ensure it is unique and accurately identifies the topic. Document naming conventions and communicate them to team members to avoid confusion and ensure a smooth workflow.name
should be a descriptive topic name.to
field of the notification trigger.
To trigger a notification to all subscribers of a topic, copy and paste the code below: