Slack trigger throws error when a file is shared in Slack

n8n Slack Trigger throws an error when a file or an image is shared on Slack . It just works highly inconsistently when it works sometimes but does not most of the other time. Please help me, thank you.

What is the error message (if any)?

Cannot read properties of undefined (reading ‘channel’)

Please share your workflow

Hi, is the workflow active?

Hey @Dong_Tran ,

Aee you sure all the right permissions are given to the slack app ?

Hi @mrrobot, here are the scopes I added:

And these are the event subscriptions:

Hey @Dong_Tran ,

Event subscription are here (Pic below)

And in the request URL you put your webhook n8n url

Jm