Issue with interactivity event from Slack

Issue with interactivity event from Slack

Issue with interactivity event from Slack

Describe the problem/error/question

Trying to receive an interactivity webhook from Slack

What is the error message (if any)?

See below

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“trigger”: [
“any_event”
],
“watchWorkspace”: true,
“options”: {}
},
“type”: “n8n-nodes-base.slackTrigger”,
“typeVersion”: 1,
“position”: [
0,
0
],
“id”: “610f4d83-85ce-456c-ad07-3b85d74a04ed”,
“name”: “Slack Trigger”,
“webhookId”: “d183c0bb-2bf3-49f5-a9a5-2ac4d7549415”,
“credentials”: {
“slackApi”: {
“id”: “atrwGkx7oI8OI098”,
“name”: “Slack account”
}
}
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “5b23abe618f773219dc999b8444a1f44e0b4cd589dedb6d7a9561276d40ae76f”
}
}

Share the output returned by the last node

{
“errorMessage”: “Cannot read properties of undefined (reading ‘type’)”,
“errorDetails”: {},
“n8nDetails”: {
“n8nVersion”: “1.107.4 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“TypeError: Cannot read properties of undefined (reading ‘type’)”,
" at WebhookContext.webhook (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Slack/SlackTrigger.node.ts:344:36)“,
" at WebhookService.runWebhook (/usr/local/lib/node_modules/n8n/src/webhooks/webhook.service.ts:357:8)”,
" at Object.executeWebhook (/usr/local/lib/node_modules/n8n/src/webhooks/webhook-helpers.ts:467:24)"
]
}
}

Information on your n8n setup

  • n8n version: 1.107.4

  • Database (default: SQLite): not sure (haven’t changed the default)

  • n8n EXECUTIONS_PROCESS setting (default: own, main): not sure (haven’t changed the default)

  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud

  • Operating system: NA

Hello @Brighto, thanks.

Node config is this:
{
“nodes”: [
{
“parameters”: {
“trigger”: [
“any_event”
],
“watchWorkspace”: true,
“options”: {}
},
“type”: “n8n-nodes-base.slackTrigger”,
“typeVersion”: 1,
“position”: [
0,
0
],
“id”: “610f4d83-85ce-456c-ad07-3b85d74a04ed”,
“name”: “Slack Trigger”,
“webhookId”: “d183c0bb-2bf3-49f5-a9a5-2ac4d7549415”,
“credentials”: {
“slackApi”: {
“id”: “atrwGkx7oI8OI098”,
“name”: “Slack account”
}
}
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “5b23abe618f773219dc999b8444a1f44e0b4cd589dedb6d7a9561276d40ae76f”
}
}

Seems like there is a property “type” in the incoming data according to Slack Handling user interaction in your Slack apps | Slack

Thanks @Brighto but I only have that node on the workflow and it fails already. Also, it should not fail even if I am using “any_event”. The problem seems to be with the node, or am I missing anything?

Hello, any thoughts on this? Thanks!

I am getting the same error with very similar circumstances on 1.110.1 self hosted. The standard webhook works (albeit without auth hence me trying to improve it). This one returns 500 to slack when responding to a block action, and the slack hook node shows the same error mentioned above. Note I’m not actually using events per se, rather block actions with responsive buttons etc.

Yes, with the one difference being I’m using interactivity not events, to receive block actions