Forums

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

Using Smart Values in JSON request

Damian Eickhoff
February 7, 2022

Hi Everyone,

I can't figure out how I can use Smart Values in a JSON API Request. This is the request i'm doing:

{
"briefDescription": "TEST",
"action":"{{field.priority.name}}"
}

 Except, the action in the payload stays empty.

{
  "briefDescription": "TEST",
  "action": ""
}

I just used the priority.name as a example, but it should give a output anyways which it doens't. I'm not sure if i'm doing anything wrong.

Hope someone can help me out.

4 answers

0 votes
jiraestro
December 17, 2025

It sounds like you are working with Jira Automation and trying to send data to an external API. This is a common hurdle, and the issue usually boils down to the context of the trigger or how the Smart Value is being escaped for JSON.

Here are the most likely reasons your Smart Value is returning an empty string and how to fix them.

1. Check the Trigger Context
Smart Values rely entirely on the "object" that triggered the rule.

Is it an Issue-based trigger? If your rule starts with "Scheduled" or an "Incoming Webhook," the automation engine doesn't automatically know which issue to look at. You might need a "For Each: Issues" branch or a "Lookup Issues" action first.

Does the field exist? If you are using {{field.priority.name}}, make sure the issue actually has a priority set. If the field is empty on the Jira ticket, the JSON output will be empty.

2. Use the Correct Syntax
While {{field.priority.name}} sometimes works, the standard and more reliable syntax for the Issue Priority is: {{issue.priority.name}}

Try updating your payload to this:


{
"briefDescription": "TEST",
"action": "{{issue.priority.name}}"
}

 

3. Handle JSON Escaping (The asJsonString Function)
If your Smart Value contains special characters (like quotes, newlines, or backslashes), it can break the JSON structure, causing the receiving API to reject it or the automation to fail silently.

Jira provides a specific function to ensure the value is safe for a JSON payload: {{issue.priority.name.asJsonString}}

 

4. Debugging with the "Log Action"
Before sending the Webhook, add a Log Action right before it.

In the log message, paste: Priority is: {{issue.priority.name}}

Run the rule.

Check the Audit Log. If the log shows "Priority is: ", then the Smart Value is failing to fetch the data. If the log shows "Priority is: High", then the issue lies in the Webhook configuration or the receiving server.

0 votes
Jawann Swislow
Contributor
December 7, 2023

I was working on something similar with the Send web request automation. The syntax in your original post should be fine.

I think the problem is that {{field.priority}} is not a valid smart value. It should be {{issue.priority.name}}.

0 votes
Renata-Gabriela Kajcsa
March 14, 2023

Hello! Have you found a solution?

0 votes
Vishwas
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 Champions.
February 7, 2022

Hey @Damian Eickhoff 

Welcome to Atlassian Community !!

I guess you are trying to pass smart value in advanced editing option for automation rule.

So there are few allowed smart values that can be converted into JSON format as documented here https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/

See if this helps.

Regards,

Vishwas

Damian Eickhoff
February 8, 2022

Hi @Vishwas ,

 

Thank you for your response and welcome !

Yes, I try to use these smart value in a web request. I already read that documentation you are referring to, but even if I do:

{
"briefDescription": "TEST",
"action":"{{field.priority.name.asJsonString}}"

the payload for "Action" would still be empty. So no luck there unfortunately.

Vishwas
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 Champions.
February 10, 2022

Hey @Damian Eickhoff 

Haven't tried this yet, just saw the document and shared. I will give a try and get back.

Thanks,

Vishwas

Damian Eickhoff
February 15, 2022

Hi @Vishwas 

Have you already had a moment to test this?

Hope to hear from you.

Vishwas
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 Champions.
February 15, 2022

Hey @Damian Eickhoff 

Not yet, if you can send me the screenshot of the automation rule. i will try to use the same and try further

Suggest an answer

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

Atlassian Community Events