I'm creating an automation trying to link up some info with an external api. (BambooHR)
To do that, I need to get an ID off this API to later on make requests against.
I'm able to query a report which is a list of emails and IDs that match with them.
Trying to search the report is where I'm getting stuck.
If I manually specify a valid email in the query it works.
{{#webResponse.body.employees}}{{#if(workEmail.length())}}{{#if(equals(workEmail.toLowerCase(),"email@domain.com"))}}{{id}}{{/}}{{/}}{{/webResponse.body.employees}}
I can't figure out if/how it's possible to put in the value of issue.reporter.emailAddress.toLowerCase() where the "email@domain.com" is in the query.
Either end up with errors about parameter mismatches and needing to close braces and other statements or blank searches.
I also tried creating a separate smart variable to reference it but have the same issue where I can't seem to format it correctly.
Any tips on getting the variable in there?
For reference the webresponse I'm trying to get id values out of looks like this:
I have the value of the workEmail property, trying to get the associated id.
Found this amazing article by @Bill Sheboy which was the fix.
Painful to not have a way to use variables within the list iteration.
Bill, sorry to randomly tag you on this, but you've written by far the best article / workaround post I've seen for this issue and I really appreciate your work.
I've updated my method to use regex over the delimited string and it seems to be working.
Hello,
use the jsonEncode function to capture any values in rest response which has special chars like @.
for example: emailAddress.jsonEncode.
Hope this helps !
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can't find any anything in doco about using jsonEncode to pull values out of a json string.
Are you able to provide an example?
Updated my question to include sample json data that I'm trying to search.
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.