I can’t send a Slack block to a channel.
I built a block in the Slack blocks editor, which works fine there. And I can send a simple message to Slack if I put the data into the ‘message’ field. But sending data via a block continually throws this error:
Error
“Error: Either Message or Block Kit blocks must be provided\n at /root/common/node_modules/.bun/@[email protected]/node_modules/@activepieces/piece-slack/src/lib/actions/send-message-action.js:56:23\n at Generator.next ()\n at /root/common/node_modules/.bun/[email protected]/node_modules/tslib/tslib.js:169:75\n at new Promise ()\n at Object.__awaiter (/root/common/node_modules/.bun/[email protected]/node_modules/tslib/tslib.js:165:16)\n at run (/root/common/node_modules/.bun/@[email protected]/node_modules/@activepieces/piece-slack/src/lib/actions/send-message-action.js:52:24)\n at /root/common/main.js:308:3593\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async tryCatch (/root/common/main.js:231:69907)\n at async Object.tryCatchAndThrowOnEngineError (/root/common/main.js:231:134926)”
The actual block I am trying to use is below, but it doesn’t matter. I even tried copying one of Slack’s default block templates. Same issue. Even without data in it, the block still fails to send.
I tried reconnecting my Slack account, removing the piece from my flow and re-adding it… nothing. I found two other related items in the Community threads, both from a couple years ago. But no solutions on either one.
Any ideas?
Thanks!
Block Format
{
“blocks”: [
{
“type”: “header”,
“text”: {
“type”: “plain_text”,
“text”: “
New Call”
}
},
{
“type”: “section”,
“fields”: [
{
“type”: “mrkdwn”,
“text”: “Date:\n{{step_7[‘result’]}}”
},
{
“type”: “mrkdwn”,
“text”: “Time:\n{{step_8[‘result’]}}”
},
{
“type”: “mrkdwn”,
“text”: “Phone:\n{{step_6[1]}}”
},
{
“type”: “mrkdwn”,
“text”: “Caller ID:\n{{trigger[‘body’][‘CallerId’]}}”
}
]
},
{
“type”: “divider”
},
{
“type”: “section”,
“text”: {
“type”: “mrkdwn”,
“text”: “Message:\n{{trigger[‘body’][‘TranscriptionText’]}}”
}
},
{
“type”: “divider”
}
]
}
Related Threads