Download File from Slack

Hi! I’m attempting to create a workflow that gets an excel file from a slack channel, reads the data in the file to use in a Snowflake query, and outputs the query results in that same slack channel.

However, the flow that I’ve created makes an infinite loop since my trigger was a webhook that ran the workflow any time a file was shared in any channel my Slack app was in.

I tried using the Slack File Shared trigger since it allows you to only check specific channels (and I could output my results in a different channel) but I kept getting this error: TypeError: Cannot read properties of undefined (reading ‘channel’) at Object.webhook slack api. Can anyone show an example of this node working correctly?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Anu_Raife

Thanks for posting here and welcome to the community! :partying_face:

Can you share your workflow so we can take a look what your setup is? You can share your workflow here by pasting them as JSON in between two block quotes (```).

Ideally if you have some dummy data - please pin it to the workflow.

Thanks :slight_smile:

Hi! This is my workflow. It’s pretty simple right now, just to see if I can get the slack trigger working but I keep getting this error whenever I test the workflow and send a file to the channel selected:

TypeError: Cannot read properties of undefined (reading 'channel') at Object.webhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Slack/SlackTrigger.node.js:303:113) at Workflow.runWebhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:662:38) at Object.executeWebhook (/usr/local/lib/node_modules/n8n/dist/WebhookHelpers.js:220:48) at processTicksAndRejections (node:internal/process/task_queues:95:5) at /usr/local/lib/node_modules/n8n/dist/TestWebhooks.js:99:37

Hi @ria any ideas why I was running into that error? Just curious if there are some example workflows with this node to see what I might be doing wrong!