-
For years I've had an action node configured to send notifications to my Android device based on the incoming payload. It's configured like this: The incoming payload is created using a function node and specifies all the necessary info to send the notification: const newPayload =
{
"target": msg.payload.target,
"data": {
"title": msg.payload.title,
"message": msg.payload.content,
"data": {
"push": {
"thread-id": msg.payload.data.tag,
"apns_headers":
{
"apns-collapse-id": msg.payload.data.tag
}
},
...msg.payload.data
}
}
} Recently I noticed I'm no longer receiving notifications, likely related to when I updated to a newer version of the websocket nodes. The error I'm getting is:
It appears this is because of the What's the right way to specify a dynamic action now? I want to specify the phone to target as part of the incoming payload. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The const newPayload = {
action: `notify.${msg.payload.target}`,
data: {
title: msg.payload.title,
message: msg.payload.content,
data: {
push: {
"thread-id": msg.payload.data.tag,
apns_headers: {
"apns-collapse-id": msg.payload.data.tag
}
},
...msg.payload.data
}
}
} The other solution would be to ensure the |
Beta Was this translation helpful? Give feedback.
The
msg.payload.target
property is an input for the action node and must follow a specific format. Since you're constructing the entire input before reaching the action node, you should include this in the action as well. For example:The other solution would be to ensure the
payload
…