Sending Firebase Cloud Messages via node-red-contrib-fcm-push-node

Hi all,

I'm trying to use FCM to send notifications from my Raspberry to all devices subscribing to the topic "allDevices".

I have added the server key as the environmental variable FCM_SERVER_KEY in settings.js.

Then I added a function node to the flow with the following code:

msg.payload = {
"to":"allDevices",
"notification": {
"title":"test",
"body":"Hello Android!"
}
}
return msg;

This function node is the input for the fcm push node.

However, I only get the error message "Couldnt send message". Any tips?

Never mind, didn't read the fcm documentation properly. Turns out the topic needs to be prefixed with /topics/

Now everything is working like a charm :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.