Hi everyone,
I’ve set up a Slack Webhook that sends notifications to a designated channel whenever a new issue is created with the highest priority. It’s working well so far, but I’d like to enhance the message by including the following details:
•Issue Key
•Issue Link
•Current Priority
•SLA Remaining
Here's how I assumed I would do this:
Here is the entire automation:
Here is the Slack message:
Additionally, I’d like a second message to be triggered to the same channel when there are 6 hours of SLA remaining. I understand this might require two separate automations, but is there a way to achieve both using Webhooks? If so, what is the smart value I would use for that?
Hi @viraj
I believe your second rule to check the SLA could use a Scheduled Trigger with JQL, checking remaining() for the issues: https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#remaining--
Kind regards,
Bill
@Bill Sheboy Would this be something that I setup inside the original automation or would this be totally different?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It would be a separate rule: one rule with the Issue Created trigger to send the first message, and the second one with the Scheduled Trigger for soon-to-expire SLAs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy - I see. Is there any way you have an example of what that looks like? A bit new to this!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Successfully using automation rules requires learning and experimentation. I encourage you to try to create the rule (as you did for the first one), and if you run into challenges to ask for further help.
You already have a rule which uses the Issue Created trigger. That could be copied and the trigger changed to Scheduled to start the second rule.
The only other thing needed is to create and test the JQL to find the issues. I provided a link to the documentation on the JQL function, and you may review that to create the JQL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @viraj
In the second example you provided you have a parentheses where you need a curly brace. That is what caused the error.
In the first example, what is the purpose of //returns in the message content? I have not seen that in the examples of Send Slack Message that I have found. If you remove that, what is the result?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, just fixed that! However, even with that change, it still does not output those fields in the message:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What did you change? From which version of the rule is that last Slack message being produced?
Please provide new images of your rule and the details of the Send Slack Message component.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't have a Slack environment where I can test this, so these suggestions are just guesses.
1. Try removing all the new-lines in the message so that it is one long string of text. Maybe the new lines are causing a problem.
2. Try adding a Re-fetch Data action before the Send Slack Message action.
You may be encountering a condition where the rule is triggered so fast and the Send Slack Message action is happening before all data has been committed to the database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see that you are using this syntax in the smart values section:
<{{issue.toUrl}}|{{issue.key}}|{{issue.summary}}>
The help text below the Message input field says:
Use this format for links: <the link|your text>. For example, <https://slack.com> or <https://slack.com|Slack>. Learn more about Slack's formatting guide.
I am guessing that you are trying to provide a link in your message because you are using <> and included {{issue.toURL}}|
However your syntax includes two of the pipe characters (the vertical bar | ), where the example shows only one. I wonder if that could be causing a transformation problem. If you want the message to show the issue key and summary which the entire text of both associated to a link to the issue, try removing the second pipe character in your syntax.
Again, I note that I don't have an environment in which to test messages sent to Slack. I am basing my suggestions on documentation that is available on the internet and my own deductive reasoning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.