Adding a label to my message is something I'm trying to do. I checked out the official guidelines here and found a similar question answered on Stack Overflow here.
I've been attempting to implement this in JavaScript, but I'm stuck.
Here's a snippet of my code:
const message = {
notification: {
title: "myTitle",
body: "myBody"
},
condition: "!('TopicA' in topics)",
AnalyticsLabel : "mylabel" <=== something like this?
};
const response = await admin.messaging().send(message);