rocdev-foundation / medera

Is a chat bot the new "Hello, World"?
GNU General Public License v3.0
1 stars 2 forks source link

Webhooks #12

Open geowa4 opened 7 years ago

geowa4 commented 7 years ago

Executing commands via Slack is great, but often teams already have outgoing webhooks configured. To make transitioning easier, we must support triggering commands via a Slack webhook. When a request comes in to /webhook/skills/list-homedirectory, the request is immediately acknowledged and the list-homedirectory skill is invoked. A default channel might be necessary to send the output. We should put that in the URL as either a query parameter or a path param.

Enabling commands for webhooks can happen in one of two ways. We could add a special "webhook" role and add skills to it. We could also add a webhook: boolean field to each skill. I think I prefer the former, but I'm open to suggestions.

Note: Slack sends a token with each request so you can verify the origin is in fact Slack. Handling that might need to be in a separate issue.