I have created a Slack bot written in Python using slack_sdk
and slack_bolt
. This bot is used to help report breakages in our CICD. It will post it in a CI status channel as well as directly DM the person that broke the build.
I've done this with a combination of Workflow Builder and Workflows Steps. Test Step 1
is my Workflows Step driven by my bot. execute
validates the data entered into the Workflow, generates the messages for the channel and the user. The last step is sending out a message to the channel. The bot sends a message to the user directly.
Ideally what I want to do is have the last step be sending out a message with the results of the execute
. I planned on doing this by using a message
variable that is passed along in the input
/output
chain for edit
/save
/execute
. The step in Workflow Builder looks like the following
The problem here is that Message
is a string that has markdown. Is there a way for me to get Workflow builder to render the markdown that is stuffed into a variable? Currently it prints out the string as is, which of course doesn't look right since it contains markdown.
Note the reason I am doing this is that the actual message content depends on the various values entered in the workflow. AFAIK Workflow Builder doesn't support conditionals, so this seemed like the best way around it.
So this is known issue with Slack.
I submitted a support ticket with them and they did answer it very quickly.
I ended up using block-kit as a substitute.
Not perfect, but close enough.