Hello, I'm working on an automation that includes sending out Slack Messages to specific channels based on the Team that they're in.
This is the automation that I have done so far:
I have created a Lookup table to have the Teams(Key) webhookURL(value) and have a lookup issue to find these issues with the dropdown of teams. I have then created a for each to cycle through the values of teams that are found in the lookup issue. And have a IF statement to compare the key to the value of teams that are found in the lookup issue and now stuck on making this dynamic and would like some guidance. The screenshots are below;
Any tips and advice would be much appreciated,
Much Thanks!
Hi @Omar Thompson -- Welcome to the Atlassian Community!
First thing, what do you mean by "making this dynamic"? Perhaps if you explain the full scenario / problem you are trying to solve that will provide context.
And, what values do you expect in that field used to drive the Advanced Branch:
If you want a single pass through the branch for each team found, the branch input will need changes.
Next thing, it is challenging to follow along the flow of your rule in multiple images. Please repost your rule in a single continuous image. This can be done using a screen capture or browser addon which can do scrolling page capture.
Finally, please post an image of the audit log details showing the rule execution. That will provide context to align the rule steps to what the log indicates happened. Please remember to expand all the areas in the log details to show issues, etc.
Kind regards,
Bill
Hi @Bill Sheboy , Thank you it's good to be apart of the community! Thank you for your response apologies if I haven't gave context to the situation,
The old automation is that it is scheduled every Mon to send notification based on tickets that hasn't been updated prior 7 days via Slack Channels. So we would initially have a Lookup issue for each Team and then send a Slack Channel message via Web hooks since the teams are getting bigger in the dropdown I can't add anymore steps in the automation so I am making a more concise version of this automation.
The new one that I am building is Creating a Lookup Table with the Key(Teams) Value(WebhookURL) and having a Lookup Issue with creating a For Each to cycle through each value that are in the Team Dropdown of the Lookup Issue, comparing the value of the For Each and the Key in the lookup table to then bring the value into the Slack Messages, My apologies as I'm quite new to Automation and Jira as a whole.
I expected in the Advanced Branch to find the value of the Dropdown and match it to the Key of the Lookup table to send it to the Slack Channel e.g Support Team has 4 Issues the Advanced Branch will find the Issues that are = to Support Team to then look at the Key in the Lookup Table to then get the value of the Lookup table and send it to the appropriate Slack Channel.
Here are the Screenshots;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems you want to send one message per team with their issues. Is that correct?
If so, I recommend changing the Advanced Branch to use this smart value. Please replace customfield_12345 with your field ID.
{{lookupIssues.customfield_12345.value.distinct}}
This will find each unique team value, once per team, using distinct.
Then inside of the branch, use another Lookup Issues action to add the Team check to the earlier JQL, gathering the issues for just that Team. For example adding this to what you have:
AND "Team Assignment" = "{{teamDropdown}}"
Finally, use the Lookup Table to get the URL for the Slack message:
{{webhookURL.get(teamDropdown)}}
This is very similar to the scenario of sending one email per assignee. To see that as an example, please see this knowledgebase article: https://confluence.atlassian.com/jirakb/automation-to-send-email-only-once-per-assignee-1310985609.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah! That's absolutely correct @Bill Sheboy Thank you for the information, this has seem to do the trick! I do have a question though seem going through the testing will it send a message to each team that is in the key, would I have to duplicate the steps to go through the next stage of teams?
For example if I have 2 teams that has been found will it send a Slack message that has the appropriate webhook url? I wouldn't have to make this step again? Sorry for the misunderstanding. This has absolutely worked though!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using the Advanced Branch over the distinct values, it would send one message to each team using their URL. I believe you already have the rule outline.
If it is not working as expected, please post the following to help identify the cause:
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.