I’m trying to set up incident management in Fibery to integrate with Slack. I would like that when an incident is created, a dedicated Slack channel is created for that incident and posted to another Slack channel.
The dedicated channel should be called #incident-<ID>-<name>
I’ve sort-of got this working (albeit without zero-padded months/days) using a Create Channel slack action with the following formula for the channel name:
Left("incident-" + [Step 1 Incident].[Public Id])) + "-" +
ReplaceRegex([Step 1 Incident].Name,"[^A-Za-z0-9-]","-"), 80)
Hurrah. But now I’m trying to post a message containing that channel name to the main #incidents
Slack channel and I’m getting an error: “Failed to execute Action “Send Message To Channel”: Response code 400 (Bad Request)”
Some comments:
- It would be very helpful to provide more error context. I’ve no idea what is bad about the request.
- I can’t figure out how to debug this.
- The “Templates can be used (for example {{Name}} and etc.)” helper text for the action doesn’t help much. The help around this generally is confusing and a little scattered, across Markdown Templates, Rules, Automation use cases, Script, Markdown Template (again), etc.
It is very unobvious to me, from all of this, what I should be doing. {{Public Id}}
works in the markdown text, but <% Entity.['Public Id'] %>
gives a 400 error. <% Entity.Id %>
works but isn’t what I want. I would ideally like to replicate the above Formula in the markdown, but can’t figure out how to.
It’s annoying enough that there are two completely different ways of doing this (why can’t I use formulas in the markdown?) but doubly frustrating that I cannot figure out for the life of me how to make this work. I have >20 years of professional programming and a computer science degree from Cambridge University under my belt, but after about 20 attempts at different syntax I have given up.
A well-curated GitHub repo with a README.md that consolidates the existing docs (or links to a canonical documentation page in the manual), plus a set of example scripts would go a long way to helping resolve this, by the way.
(Help me Obi-Wan Chr1sG, you’re my only hope.)