How to post /poll
command to Slack using hooks correctly? When we use it like this:
URL = 'https://hooks.slack.com/services/XXX/XXX/XXX'
CMD = '/poll "Name" "A" "B"'
requests.post(URL, json = {'text': CMD})
The result in slack is just text, not the applied command.
It's not possible for a slash command to be invoked by another app or integration. Slash commands are interpreted first by a Slack client and then executed -- human interaction is expected. You won't be able to execute a slash command by sending text via a webhook.