apprise icon indicating copy to clipboard operation
apprise copied to clipboard

Slack workflows generate a different type of webhook URL

Open foundinblank opened this issue 1 year ago • 5 comments

:mega: Notification Service(s) Impacted Slack

:lady_beetle: Describe the bug If you use Slack's Workflow Builder tool, there's a Webhook option. However, if you do this, it generates a webhook URL that is completely different than what apprise expects:

https://hooks.slack.com/workflows/{token_1}/{token_2/{token_3}/{token_4}

Seems to me that the Slack service in apprise needs to be updated to handle this new format...

CleanShot 2023-06-22 at 1 21 36@2x CleanShot 2023-06-22 at 1 22 42@2x

foundinblank avatar Jun 22 '23 12:06 foundinblank

I didn't know this, thanks for sharing. I wonder if the payload changed as well?

caronc avatar Jun 22 '23 13:06 caronc

I don't know if the payload's shape changed, but the workflow gives you an option to define incoming variables in the payload to be used in other workflow steps.

foundinblank avatar Jun 22 '23 14:06 foundinblank

I don't think workflows is where you want to be. I've had time to play around. You just need to generate a straight webhook; see wiki docs here. Workflows are for triggers to take in effect after something happens in the channel. someone says hi... your account just automatically says hi back (whether you're there or not).

In summary:

  1. You want to create a bot or app

Apprise can then ingest this data and send notifications for you.

caronc avatar Jun 24 '23 19:06 caronc

The webhook functionality in Slack Workflows functions like any regular webhook; the webhook is meant to trigger the workflow. I can set up a workflow with a webhook triggering it, and trigger that by curl $webhook_url.

CleanShot 2023-06-28 at 2 11 15@2x

foundinblank avatar Jun 28 '23 13:06 foundinblank

Just to add that workflows are built so they can be triggered by a webhook. You can see more in the Slack documentation on it. So I think the main point here is that the webhook format used to trigger workflows is different to what apprise is expecting. I believe it's a relatively new thing for Slack to support webhooks to trigger workflows, but it's something we are very keen to make use of.

glsdown avatar Jun 29 '23 08:06 glsdown