Send notification to all subscribers
How do send notification to all subscribers from Web App panel?
9 Replies
Hi @Kh. M-S., I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* How to send web push notifications with FCM and Novu
* How to Add Digest to In-App Notifications
* How to send push notifications in an Android app (react native) with FCM and Novu
* How to send push notifications to Flutter apps (Android & iOS) with FCM using Novu
-----------------------------
Answer
To send notifications to all subscribers from the Web App panel, you can use Novu's Topic API. This allows you to create a topic, add all subscribers to it, and then send a notification to that topic. (1)
Creating a Topic
First, create a topic that will include all your subscribers:
Adding Subscribers to the Topic
Next, add all your subscribers to this topic. You'll need to do this for each subscriber:
Sending a Notification to the Topic
Finally, you can send a notification to all subscribers in the topic:
This method allows you to send notifications to multiple users simultaneously without having to specify each subscriber individually.
Remember to replace 'notification-template-name' with the actual name of your notification template, and adjust the payload according to your needs.
If you need more detailed information or have specific questions about implementation, I suggest clicking on the "Ask for help" button to tag a team member for a more thorough review of your question.
Feel free to tag @Ask Inkeep with additional questions.
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
Hey @Kh. M-S.
We have broadcast api which will trigger the workflow to all subscriber in one environment
You will have to either hit the this api using our api reference send option or use this in postman because currently it is not possible to do this operation from Novu UI
Novu
Broadcast event to all - Novu
Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.
In the future could be used to trigger events to a subset of subscribers based on defined filters.
@Pawan Jain does it work for self-hosted vetsion? I get error "API Key not found". Although I can trigger notifications from Web App. Maybe I need write url of my server in the bridgeUrl?
@Pawan Jain I tried also in Postman. But I get the same error
@Kh. M-S., you just advanced to level 5!
@Pawan Jain I did it in Postman. So if I use self-hosted version I can do it only in Postman? I cannot change url in your api to mine. For me it is ok to use Postman. But if it could be in your api it would be better.
@Kh. M-S.
Sure I will check if it is possible to use localhost / custom url on api reference