I want to trigger a slash command in Slack every day at a certain time. Specifically, I want to clear my status every night at midnight.
From the documentation it seems like the only way to do this would be via an Incoming Webhook. However POSTing with the following JSON body just creates a message in Slack /status clear
and does not actually run the command.
'{"text":"/status clear"}'
It also posts the message on behalf of the app associated with the webhook, not under my username.
Is there any way to invoke a slash command for my user from outside the official Slack app?
Here is how to execute slash command for your user with an external script.
Use the undocumented API method chat.command
execute any slash command, e.g. /status
Use an access token linked to your user account for the API call. One way to get that is to create a so-called "legacy token" with your user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With