Hi,
I've created an automation that needs to transform agentResponse. they trying to apply StringUtil functions it doesn't work.
I tried different formats in the agent response (json or plain text). I'm able to use functions like contains, but when trying to create variables with Substring functions, never returns any value.
{{agentResponse.substringAfter("commentContent:").substringBeforeLast("passedTriage").trim()}}
Initially, since I Formatted the agentResponse in json I tried using just agentResponse.fieldName, but that didn't worked, so I fallback to a String bases approach.
Hello @goncalo_santos ,
Welcome to community! I think you may have been affected due to the known BUG : Utility Functions on AgentResponse Throws Errors
I would suggest to save the Agent Response in one of the variables and then using substringAfter and substringBefore utility with the variable name.
Ex:
Variable name : RovoAgent | Smart Value : {{agentResponse}}
Add log action : Substring {{RovoAgent.substringAfter("commentContent:")}}
Please try it out and let us know the results!
You're awesome. Thanks for jumping in on this one!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My pleasure! @Dr Valeri Colon _Connect Centric_ Cheers!
Hope it helped @goncalo_santos as well!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @goncalo_santos
Your smart value expression may not work as expected due to limitations in chaining multiple functions. Consider simplifying the expression or using intermediate variables to isolate each function. Ensure that the separators used in substringAfter
and substringBeforeLast
exist in the agentResponse
. For more details:
And consider joining the Developer Community and Github Repo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Dr Valeri Colon _Connect Centric_ ,
The issue is not with the chain of functions. Tried an isolated substring and the result is the same.
The only string function it seems I can make work is the .contains.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the clarification, @goncalo_santos!
This is on the edge of my abilities so I can't recommend joining the Developer Community and Github Repo enough. I'll also suggest submitting a support ticket with a sample agent Response to confirm encoding or formatting behavior.
From your screenshot, it looks like the agent Response is returned in markdown-style formatting, possibly wrapped in triple backticks (```
), which prevents smart value functions like substringAfter()
from evaluating as expected.
Before applying string functions, strip formatting by adding: {{agentResponse.remove("```")}}
Then apply your original chain: {{agentResponse.remove("```").substringAfter("commentContent:").substringBeforeLast("passedTriage").trim()}}
Jira’s automation engine treats text literally when wrapped in code blocks, so string functions can't parse it correctly. .contains()
works because it's just checking presence—not parsing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.