I'm building an automation rule that performs a JQL query based on a schedule and sends a Slack message using the result of the query. At the moment, I am using the lookup issues action to perform the JQL query.
However, based on the lookup issues description here https://support.atlassian.com/jira-software-cloud/docs/automation-actions/, it seems like we are not able to access custom fields?
I have tried
{{#lookupIssues}} {{Custom Field}} {{/}}(including other variants as suggested by other users such as using "Custom Field", customfield_id, field.Custom Field, etc) to no avail.
On the other hand, when I checked the "Run a JQL search and execute actions for each issue in the query." checkbox in the schedule trigger and perform the JQL query there,
{{issue.Custom Field}}works as expected. But the problem now is a Slack message would be sent for each issue.
This is not ideal because I want to format my Slack message as follows:
Some text here:
{{#lookupIssues}} {{Custom Field}} {{/}}
some more text here
which would not be possible if one Slack message is sent per issue. Is there an alternative that can solve this?