You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello, I am running into an issue. I am trying to use the Pattern utility to generate JSON which is then integrated into a larger JSON blob within my HTTP Payload. It looks like, according to the documentation, that the variable is auto-escaped when included in the payload section.
I am trying to generate a custom Slack webhook message, and I am getting invalid JSON errors when attempting to do this for example:
testreport = {"text":"test"}
Payload = {$testreport}
Is there any advice on this? Is there an equivalent for variables akin to the _html option like {$testreport_string} which does no modification to the data coming out of the report?
The report variable when fed through the http request payload is a string. Typically I will do a split by "\n" and process each line of the report accordingly. This will depend on your pattern.
The pattern I presented above has no "\n" characters. It is just a single line of JSON in a Trello variable being referenced in the payload.
From the documentation:
Variables that are used in the URL are automatically URL-encoded to create valid URLs; variables used in the payload are automatically escaped to be part of a valid JSON string.
I am assuming that my would be valid JSON is getting converted to:
{\"text\":\"test\"}
Which I unfortunately don't want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{$reportvariable} by itself is a string and the value depends on the your criteria and pattern in your command. You can use it is a payload in http request e.g {"somekey" : "{$reportvariable}" } to your endpoint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is unfortunately not the use case I am looking for. I guess my problem is more of a feature request then.
With a variable of:
{$reportvariable} == "text":"test"
I want to be able to have the payload be:
{"somekey":"hello world", {$reportvariable}}
Which would result in a payload of:
{"somekey":"hello world", "text":"test"}
I will try and look for a different solution.
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.