Skip to content

Sending notifications via action node isn't working anymore #1591

Answered by zachowj
neilenns asked this question in Q&A
Discussion options

You must be logged in to vote

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:

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 payload

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@neilenns
Comment options

Answer selected by neilenns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants