Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


7th Circle of Hell : Figuring out how to CQL Search via a Jira Automation Web Request

Hello All, Everyone, and/or etc,

I am once again up to my neck in it ("it" being integration hell) and managing to squash all bugs in sight.....except for what I thought should be the easiest part. Pure unadulterated hubris, I know. 

This is among the very last steps of an automation I've been struggling to get perfected for weeks, so any help on crossing this last hurdle would be hugely appreciated. 


The Goal :

Complete a CQL Search using Jira Automation's "Send Web Request" action. 

Where I'm stuck : 

I've managed to somehow get the authentication working (no thanks to documentation that says 5 different things about how to pass basic authentication to Confleunce, none of which actually work the same way via the webhook), but now I just cannot get the payload correct. 

All I need is {{customfield.value}} to get passed on to the end of the request's URL. 

Screenshot 2022-07-04 053349.png


No amount of begging/pleading/{{.urlEncode}}-ing has gotten me anywhere. 

Does anyone have any hints on how I can just get this friggin CQL search done?


Thank you!

2 answers

0 votes
Agraj Mangal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 04, 2022

Hey @Evan Nixon 

What error/exception are you getting when doing the CQL search?

Using the Log Action You can try logging the result of `.urlEncode` if you are not sure what value it is encoding to 



0 votes
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 03, 2022

Hi @Evan Nixon 

To search in title only you should use:


This request will search for pages only, with a title like "test". If you want to search for the exact page title use "=", if you want to search for a page containing a word use "~". 


The API doc is here:

The doc about advanced searching using CQP with the API is here:

I hope this helps.


Hi @Dam, thanks very much for getting back to me on this!

While that is a really good tip on how to make my query more specific (that I am going to use) I think I may not have been clear enough on exactly what I need help with on this. 

So, to be more explicit on my problem : 

Screenshot 2022-07-04 203443.png


The problem is that I cannot get a smart value to pass in to the query, no matter how many times I try, how nicely I beg, or how loudly I scream at/near/adjacent to the sky.


Here is the smart value I'm trying to use : 



And here is a computer once again leaving a hot steaming pile on my chest because it's jealous of my meat prison : 

Screenshot 2022-07-04 203848.png

405 : Both the number of times I've hated this and the relevant error code. Neat!



@Agraj Mangal thank your as well for your reply! I generally find the "Validate Your Web Request Configuration" option easier / better / big gooder-er in these circumstances just by virtue of : 

A) Less click more do.
B) It parses smart values, and provides a full read-out of the Request/Response Headers and Payloads (which makes the Audit Log super jealous).


Here is an example which illustrates my objectively true and based point : 

Screenshot 2022-07-04 210509.png


The point that I find raises my blood pressure more than a deep fried double down ice cream sandwich the most interesting is the "expecting a value for operator '=' after field 'title'". This tells me two things : 

  1. That the (smrt) value is not being passed along whatsoever. 
  2. My life was not supposed to go like this.


I have tested this with other Smart Values and get pretty much the same result constantly, which is frustrating. But even more frustrating will be when someone replies to this thread with the correct answer and it's both incredibly obvious and has been right infront of my big ol' smell horn this whole time. 

Agraj Mangal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 04, 2022 • edited

Ok couple of things 

  1. 405 typically means you are not using the right HTTP method to query - I can see in the above screenshot you are using GET but can you please double check in the actual configured rule - also you may not be able to use a Custom Body with GET if the CQL endpoint does not support that. 
  2. Can you try with some other smart value if that is also not being able to resolve or is it just custom fields that are causing an issue ?

I was able to use the following successfully to call the CQL endpoint 


Edit 1 -- Just tested it works for Custom Fields also. The catch is you would need to enclose the smart values in single quotes in your CQL query if the smart value is resolving to multiple words. An an example try using 

Like Dam likes this

Alright - I've managed to get it to work.

I'll save the super-long explanation, but the behaviour I was running in to was because many page titles contained dashes "-", which wasn't being handled by the ".urlencode" tag. The only way around this was  and required a workaround by wrapping double quotes around the smart value, but pre URL encoded as in "%22".

This is what the final query looks like using the ".leafValue" of a cascading select list from a custom field (via Prime Custom Fields).

Screenshot 2022-07-11 112611.png


This allows me to extract the URL from the response and place a Smart-Embed of the relevant confluence page into a custom field using this string :



 Like this : 

Screenshot 2022-07-11 112912.png



Thanks very much for your help!

Like Dam likes this

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events