I have a Opt in option switched on in the Slack app, so tokens are rotating every 12 hours, but there is no way I found in n8n to make dynamik access tocken to be applied, so every 12 hours when token espires I should manualy change it in the credential section that is ruin all the automation.
Please share your workflow
Share the output returned by the last node
expired_token
Information on your n8n setup
n8n version: 2.11.4
Database (default: SQLite): postgres:16-alpine
n8n EXECUTIONS_PROCESS setting (default: own, main): own
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
From what you described, this looks like Slack token rotation. When rotation is enabled, Slack expects the access token to be refreshed using a refresh token, but the Slack node in n8n uses a static token stored in the credential, so it won’t refresh automatically.
Try disable token rotation in your Slack app so the bot token remains stable. If you must keep rotation enabled, you’d need to handle the refresh flow yourself and then use the new token dynamically.
@Sergiy_B1
Ah, I see…
Try stop using the Slack node with a static token and instead call the Slack API using an HTTP Request node, where you can control the token refresh flow yourself. With that approach you can exchange the refresh_token for a new access_token using oauth.v2.access before the token expires, and then use that new token in your API calls.
It’s a bit more setup, but it allows you to keep token rotation enabled without having to manually update the credential every 12 hours.
@tamy.santos Yep, that was the first thing I did, before applying here, and yep, it works quite well with the HTTP request node, but still, it’s not a Slack node and looks more like I’m using duct tape instead of the solution. In general, I’ve built a token rotation workflow that runs every 11 hours, rotating my tokens and allows me to send messages via bot acc using HTTP request, however:
I can not use Slack on the event trigger node, as it uses a static access token, which I don’t want to change manually, so I had to get rid of that node and use “web-hook duck tape” to rebuild it on my own.
I can not send a message via Slack node as the token expires every 12h and, for some reason, I can not use expressions to put it as a token holder, so I had to use an HTTP request for that.
As you may understand, I’m using an AI agent, so I cannot use any Slack tool for it, as the token expires every 12 hours and there is no way to update it via expressions, so I had to rebuild all the tools I have, and provide it to the LLM agent as a custom tool, but not a special Slack tool.
So, my logical question here is, why not allow users to use a dynamic API key token? Why to restrict it and making the entire workflow struggle as well as the admin, too, cause now I have to overcome the limitation that would not even have appeared if there were a way to use a dynamic API key token via an expression?
I think your question is fair @Sergiy_B1 , but right now this is a product limitation rather than a workflow mistake: n8n’s own Slack Trigger docs explicitly say that if Slack token rotation is enabled, n8n credentials will fail after expiry, so for production they expect token rotation to be off.
That’s also why your HTTP Request workaround works better here: the HTTP Request node lets you control auth dynamically, while the Slack node/credential model is still built around a stored token.
So I’d frame this as a valid feature request for dynamic token support in Slack credentials, because today the documented workaround is essentially the one you already built.