n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
48.89k stars 7.75k forks source link

Slack trigger error #11748

Closed kevinmarchese closed 21 hours ago

kevinmarchese commented 1 day ago

Bug Description

I'm running into this error when sending a slash command to n8n "Problem in node ‘Slack Trigger‘ Cannot read properties of undefined (reading 'type')"

Screenshot 2024-11-14 at 2 37 14 PM

To Reproduce

I set up a Slack trigger and added the node webhook to my Slash commands slack, tested it, and then it came back with the above error

Expected behavior

I expected to get JSON back from the Slack trigger

Operating System

Ubuntu 24.04

n8n Version

1.67.1

Node.js Version

v20.18.0

Database

PostgreSQL

Execution mode

main (default)

Joffcom commented 1 day ago

Hey @kevinmarchese,

We have created an internal ticket to look into this which we will be tracking as "GHC-445"

Joffcom commented 1 day ago

Hey @kevinmarchese

Can you share the full error output from the node?

Which filter are you using for the node as well the node is intended for use with the events API not the interactive endpoint for slash commands.

kevinmarchese commented 1 day ago

{ "errorMessage": "Cannot read properties of undefined (reading 'type')", "errorDetails": {}, "n8nDetails": { "n8nVersion": "1.67.1 (Self Hosted)", "binaryDataMode": "default", "stackTrace": [ "TypeError: Cannot read properties of undefined (reading 'type')", " at WebhookContext.webhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Slack/SlackTrigger.node.js:293:42)", " at Workflow.runWebhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:660:38)", " at Object.executeWebhook (/usr/local/lib/node_modules/n8n/dist/webhooks/webhook-helpers.js:144:48)", " at processTicksAndRejections (node:internal/process/task_queues:95:5)", " at /usr/local/lib/node_modules/n8n/dist/webhooks/test-webhooks.js:101:37" ] } }

kevinmarchese commented 1 day ago

Good to know! thank you I do need to enable events or use a webhook trigger instead I guess. Yeah, that is helpful thank you so much! and sorry not sure what you mean by "filter"

kevinmarchese commented 1 day ago

I was afraid that was the answer, I hate turning on the Events API, I might just do Webhooks

Joffcom commented 1 day ago

This does give me an idea for another trigger node in the future but for now... the webhook node would be the best option if you are building slash commands

kevinmarchese commented 1 day ago

Thank you so much and I'm glad I could be useful in some way! Cheer!

Joffcom commented 21 hours ago

For now I am going to close this one as it doesn't look like there is a bug.