Hi folks! I’m having trouble with a Zapier workflow that connects to Slack. When I try to modify a message after someone clicks a button, I keep getting an error.
My Workflow:
First Zap: ChatGPT creates a response that gets sent to Slack channel using blocks.
Second Zap:
- Webhook catches the button click data from Slack.
- Tries to modify the original message using Edit Message action.
- Uses the message timestamp and channel ID from the button payload.
Working Parts:
- Initial message posting works fine with my Slack bot.
- Button clicks trigger the webhook properly.
- My app has these permissions: chat:write, chat:write.public, channels:read, channels:history, and more.
The Problem:
The Edit Message step fails with cant_update_message error and returns Ok: false.
Anyone else encountered this before? I’m wondering if there’s a way to test this directly through Slack’s API to figure out what’s going wrong. Any troubleshooting ideas would be awesome!
Thanks!
I encountered a similar issue not too long ago. It turned out that the root cause was related to the bot’s permissions and the message’s origin. In Slack, a bot can only edit messages that it posted itself. Since your first Zap is responsible for posting the message, ensure that the second Zap is also configured with the same bot’s OAuth token. If they’re using different tokens, Slack will treat them as distinct entities, leading to the ‘cant_update_message’ error. Additionally, double-check the timestamp being sent; inconsistencies in that can also lead to issues. Logging the specific timestamp value could help you troubleshoot further.
The cant_update_message error usually happens when there’s a format mismatch between your original message and the update. If you sent the first message using blocks, make sure your Edit Message action also uses blocks format - don’t switch to plain text. I ran into this exact problem when my message was rich formatted but I tried updating it with plain text. Also double-check that your message timestamp is a string, not a number. Slack’s picky about data types. Try testing with chat.update directly through the API using the same parameters - that’ll help you figure out if it’s a Zapier issue or an API problem.
check if your bot token has the chat:write.customize scope - that’s what fixed it for me when i hit the same problem. also make sure you’re not trying to edit in a private channel ur bot can’t access.