Here is the Agent prompt:
Analyze this work item using the “Priority Reference for Defect Triage” article and project history.
Return ONLY valid JSON on a single line. No code fences, no explanations, no markdown.
Example:
{"priority":"High","reason":"API timeout after deployment; matches High rule per reference"}
Rules:
- The JSON must contain exactly two keys: "priority" and "reason".
- "priority" value must be exactly one of: Highest, High, Medium, Low.
- "reason" must be a short human-readable sentence (no quotes inside).
- Do not add spaces, line breaks, or any extra text before or after the JSON.
When i print the raw output i get it correctly:
Raw = {"priority":"Low","reason":"No summary or description details match any higher priority rule; defaulting to Low per reference"}
I am trying to return Priority and Reason as separate variables and they give output as empty
Raw = {{agentResponse}} Priority = {{jsonStringToObject(agentResponse).priority}} Reason = {{jsonStringToObject(agentResponse).reason}}
Priority =
Reason =
Can you help set the right json parsing for agent output. Based on it i want to assign right priority to ticket
Hi @venkatasai.pulluri - welcome to the Community,
Jensen just published an article on parsing of the AgentResponse: How to Use {{agentResponse}} in Atlassian Automati... - Atlassian Community
including a JSON option. Maybe that's helpful too?
Welcome @venkatasai.pulluri
Have you checked this article? https://community.atlassian.com/forums/Atlassian-AI-Rovo-articles/Using-JSON-Output-from-Rovo-in-Automations/ba-p/3135411
It might be helpful for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@venkatasai.pulluri to add to @Rebekka Heilmann _viadee_ and @Nikola Perisic resources: The agent output is valid, but Automation treats it as a string with hidden whitespace. Wrap the raw value in a trim before parsing:{{jsonStringToObject(trim(agentResponse)).priority}}
and{{jsonStringToObject(trim(agentResponse)).reason}}.
Once trimmed, the fields resolve correctly and you can map the priority.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.