How do I send JQL results from Jira Cloud Automation to Slack?

clown November 19, 2024

 

I want to send the values retrieved by JQL in Jira Cloud Automation to Slack.

How should I construct the syntax for it to work correctly?

 

The components are structured as follows:

 

[When : Reserved]

1.PNG

[Issue loopup]

2.PNG

 

[And : Slack message send]

{{#lookupissues}}

>{{url}}|{{key}} : {{summary}}

{{/}}

 

When you run the rule, no issues will be listed in Slack.

1 answer

1 accepted

4 votes
Answer accepted
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2024

Hi @clown 

As per this template your rule looks correct https://www.atlassian.com/software/jira/automation-template-library/rules#/rule/1363405/26550780

What I would recommend is, instead of the Send Slack Message, use the Log Action, and check if the issues are printed there correctly:

{{#lookupissues}}

>{{url}}|{{key}} : {{summary}}

{{/}}

Once you're confident that the issues are being printed, you can then add the same Slack Action again.

Although I would recommend adding a IF condition after the lookup, which will check that the LookupIssues.size is more than 0 (i.e. there are issues present), only then will the next steps run. You can use this for size check {{lookupIssues.size}}

https://community.atlassian.com/t5/Jira-questions/Re-lookupIssues-size-not-working-for-me-when-I-want/qaq-p/2128327/comment-id/548668#M548668

clown November 20, 2024

@Jehan Bhathena You saved me. Thank you so much!

Like Jehan Bhathena likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events