Scope missing chat:write:bot error with Slack node but this scope doesn't exist anymore

Hi, I have set up a Slack credential using an Access Token (not 0auth) because I want to send messages from a @n8n bot, NOT as myself. In the Slack app settings I have added the following Bot Token Scopes:
chat:write
chat:write.customize
chat:write.public

For good measure I also the User Token Scope chat:write.

However when executing the node I am getting the error:

ERROR: Your Slack credential is missing required Oauth Scopes
Add the following scope(s) to your Slack App: chat:write:bot

The scope chat:write:bot is a legacy scope which no longer exists and so I cannot add it to my app. I have added every other chat:write scope which is available, gotten this approved, reinstalled the app to my Slack - done everything I need to.

Workflow code:

Please help! And update the error message since it’s telling me to add a scope which doesn’t exist!
Thanks

Hi @aatt :wave: I’ve given what you have as a workflow a go, and it worked fine for me with the permission of chat:write for the bot :thinking: Could you try reinstalling your app to the Slack space and then giving it another try?

That error also looks like it’s coming from Slack, not us, so it wouldn’t be something we could change :see_no_evil: You may want to contact Slack to update that one.

Hi, thank you for your help. I had another go at this today and the access token to my credentials had expired so I added a new one. Here I realised that I had added the User Token rather than the Bot token to my Slack credentials which is where I had been going wrong! So I have it working now :smile:
Can I ask you one more question - how frequently does a token expire? I have this workflow set up to report errors, so if the access token expires and I don’t check n8n every day I might miss some errors which isn’t ideal.

Thanks!

1 Like

Hi @aatt :wave: Glad to hear you got this sorted!

According to Slack’s knowledgebase, the token will expire every 12 hours only if you use token rotation. Otherwise, the token will never expire. :bowing_man:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.