I can create a zap to post a message to Slack, but can’t see how to get the coloured bar at the left edge of the slack message (good, warning, danger). Does anyone know if this is possible in Zaps?
Hi
Can you post a screenshot to clarify the colored bar you mean in Slack?
You may have to create a custom Slack App: https://api.slack.com/start
NOTE: This is doable via Zaps, but involves the Slack API, which can be used with the Webhooks app: https://zapier.com/apps/webhook/integrations#triggers-and-actions
Screenshot. Slack lets you highlight as standard with red, yellow or green.
Yes, that is being done using the Slack API, which offers more advanced formatting options: https://api.slack.com/
Hey folks! I just wanted to follow up to further build on Troy’s suggestion here for anyone that might not be very familiar with setting up Slack Apps/webhooks.
I wrote up a guide a little while back that has a section which explains how to set up a Slack App which is a good starting point to reference:
One difference from that guide will be the OAuth scope that’s needed when setting up your Slack App. You’ll need to make sure your Slack app has the chat:write OAuth Scope in order to be able to post a message:
Another difference is that you’d want to use the Custom Response action event instead of the GET action event that’s mentioned in the guide. This is because you’ll using the chat.postMessage endpoint instead: Slack > Composing your message
Since colour bars can only be added to secondary attachments you’ll need to follow the format outlined by Slack here: Adding secondary attachments
You’ll need to specify the Channel ID which you can find within Slack by clicking on the channel name to bring up the Channel Details. In the pop up window that appears the Channel ID will be listed at the bottom.
Next, you’d take the OAuth token (See guide on How to count reactions in Slack for details on how to generate that) and Channel ID. Then add them into the webhook request, along with the text for the message and set a colour, like so:
This would then post a message to the channel with a green coloured bar like this:
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.