Use Novu to send multi-channel (SMS, Email, Chat, Push) notifications from a PHP app.
composer.json
and add the following to it:
composer
command:
index.php
in your application and add the following code to it:
$apiKey
’s value with the authentic key from the API Key section of your Novu Dashboard.
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 | ✅ |
Choose email as the channel you want to add
Fill in email subject
Send test email to verify your workflow
Subscribers from the left sidebar shows all the subscriber
Subscribers list shows newly added subscriber
abc@gmail.com
is a random unlikely email your users will have. To update this to an alternative email, you can call the updateSubscriber
method like so:
phone
, avatar
, and data
. The data
field can accept an array of metadata that you want to attach to the subscriber.
name
should be the workflow’s trigger ID/slug.Make sure your workflow's trigger ID/slug matches the value you'd used
payload
is an array of the data that you want to be dynamically injected into the workflow content.subscriberId
is the id of the subscriber on Novu. Replace 7789
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: