Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

(Automation) Is there a way to get a list of page URLs from {{#cqlResults}} ?

Richard Brown June 26, 2025

I have used the template "Notify people about inactive pages when scheduled (recurring)" and like the way it outputs a single email with a list of pages & urls for the content matching the 'inactive page' condition in the 'For each..' branch rule.

I want to do something similar, but in my case, I am using the 'Related entities' (CQL) branch rule. I have succeeded in generating a list of matching page titles using {{#cqlResults}}{{title}} but what I really want is the page urls. Is there any way to achieve this? I have a workaround, which is to include (in email & jira task) a link to the same CQL query results, but I would prefer a list of pages urls if possible. I do not want one email/task per page. Any tips would be appreciated!

 

2 answers

1 vote
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2025

HI @Richard Brown 

Reviewing the CQL documentation, no I see no option to do this.

As I think you can't get the ID's from the pages found as well, as if that where possible you could  use a web request action to reach the API an get the pages by id and from the web response you could get the URL.

Richard Brown June 26, 2025

Thanks for the quick reply, Marc. You can get the page ids from cqlResults, but I was hoping to solve this without resorting to additional web-requests, if possible.

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2025

Hi @Richard Brown 

No you will need to use web request to trigger the API this will be able to provide you the URL of the page.

CQL doesn't have the option.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2025

Hi @Richard Brown 

Adding to Marc's suggestions...

If you perform the CQL search with the REST API endpoint and the Send Web Request action, the results will contain the pages' title, URL, etc.  You may then use that web response to build your message.

Kind regards,
Bill

Like Marc - Devoteam likes this
0 votes
Elaine Chatman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2025

CQL results only provide page titles and IDs, not full URLs. To get URLs, you’ll need to use the REST API via a web request action, querying page IDs to retrieve the URLs. This adds some complexity but is the best way to include page URLs in a single email or task.

Suggest an answer

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

Atlassian Community Events