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.