How do I send a slack message via web request with one message and a list of issues from a filter?
Asked by Deanna Vazquez:

![Screenshot 2023-11-07 at 3.09.39 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/290612iDAA97EF6A2884B2B/image-size/large?v=v2&px=999 "Screenshot 2023-11-07 at 3.09.39 PM.png")I am trying to send a slack message via web request that asks to view the list of tickets that have not been touched in 7 days.

The same message sends with each issue that is found in the JQL query. I want one message and a list of tickets.

{{#lookupIssues}} \*\<{{url}}\|{{key}}\> {{/}} is not working. ![Screenshot 2023-11-07 at 11.16.15 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/290608iCB5C7E8D492E6013/image-size/large?v=v2&px=999 "Screenshot 2023-11-07 at 11.16.15 AM.png")


Answers:
author: Bill Sheboy
body: Hi [@Deanna Vazquez](/t5/user/viewprofilepage/user-id/5359225) -- Welcome to the Atlassian Community!

Does your scheduled trigger have a JQL statement?

If so, the scheduled trigger will run the rule steps for each issue from the JQL. You may remove that trigger's JQL and only one message will be sent with the issues from the Lookup Issues action.

If you are concerned about sending an empty message (when no issues are found), you may add an Advanced Compare Condition after the lookup and before the message:

* first value: {{lookupIssue.size\|0}}
* condition: greater than
* second value: 0

Kind regards,  
Bill

comments: author: Deanna Vazquez
body: I don't think I am following. The scheduled trigger does not have **Run a JQL search and execute actions for each issue in the query**checked.

[This](https://community.atlassian.com/t5/Jira-questions/Jira-automation-Slack-messages-single-msg/qaq-p/2278638) person is asking the same question but their screen has an option to processes in bulk as shown [here](https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html)

The only way I can produce the slack messages is by putting {{issue.summary}}: {{issue.url}}. I cannot put any other wording or it will repeat with every ticket link.


author: Bill Sheboy
body: What version of Jira are you using: Cloud, Server, or Data Center?

Does your scheduled trigger have JQL at all? If so, please remove the JQL as it is not needed, regardless of the options selected for processing, bulk-handling, etc.

And, the bulk-handling feature for the scheduled trigger and branches is only available for Server and Data Center, and that is not needed for this type of rule.

To help confirm what is happening, please post an image of your audit log details showing the rule execution.

I am curious: why are you using a Send Web Request action to send the Slack message? All three versions of Jira automation rules have a built-in Send Slack Message action.


author: Deanna Vazquez
body: The only way the rule is successful is with the below but then every issue has test in front of it but I want it to say:

Test

Ticket

Ticket

Ticket

*** ** * ** ***

Not

*** ** * ** ***

Test ticket

test ticket

test ticket

*** ** * ** ***

{  
"message": "Test {{issue.summary}}: {{issue.url}}"  
}


author: Bill Sheboy
body: Deanna, please see my earlier questions in the last post as they may help to improve your rule:

* What is your Jira version?
* Please post and image of the audit log details
* Why using the Send Web Request action, rather than the built-in Send Slack Message action?
* Please post an image of the body / content of your Send Web Request action


author: Deanna Vazquez
body: * What is your Jira version?
  * I believe we are using Version 2.0, January 2004. At least that is what I found when I went to help\>about Jira
* Please post and image of the audit log details
  * ![Screenshot 2023-11-09 at 1.38.51 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/291019i188C2E279B47AE72/image-size/large?v=v2&px=999 "Screenshot 2023-11-09 at 1.38.51 PM.png")
* Why using the Send Web Request action, rather than the built-in Send Slack Message action?
  * Our company uses Okta and it's an Okta webhook that then hits the Slack webhook so our IT team would have to help us with every Slack Message automation.
* Please post an image of the body / content of your Send Web Request action
  * ![Screenshot 2023-11-09 at 1.52.44 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/291022i0F6FA3906A7C6556/image-size/large?v=v2&px=999 "Screenshot 2023-11-09 at 1.52.44 PM.png")


author: Bill Sheboy
body: Thanks for that info, Deanna!

Your rule and the audit log look okay, and based on the custom data for the Send Web Request action, *the problem appears to be on the Okta side*.

You can confirm this by copying the contents of that custom data, and writing it to the audit log with the rule's Log action. If it only shows your message text, "These tickets...", once, then the problem is in how the Okta webhook is processing the message.