DirkLX
DirkLX

Reputation: 1337

How to execute slack bot from message send through web-hook?

I created a simple Alexa app that posts a text into a slack channel.

I defined the message so that it would trigger a slack bot, that is running in the same channel. Like what happens when I type the text manually.

Example: botname action parameter e.g. herbert ping 192.168.1.1

The message post via web-hook comes in exactly in the same way BUT it does not trigger my bot.

What am I doing wrong? Can somebody please provide a hint.

Upvotes: 0

Views: 1199

Answers (2)

b.geisb
b.geisb

Reputation: 96

The command chat.command needs the permission scope post, which only legacy tokens have and which is not available for Slack apps.

According the the Slack customer support executing slash commands through a web-hook is no longer possible.

Upvotes: 0

Erik Kalkoken
Erik Kalkoken

Reputation: 32698

You can not execute slash commands through incoming webhooks, but you can do it with the undocumented API commands chat.command. See also this answer.

Upvotes: 2

Related Questions