Json Path filter is not mapping in WF

This path brings the valid result (Image)


Using this same path within WF, the result is empty. Image2

output.json (12,0,KB)

Hi @clebercarvalhoRaise!

I’ve noticed the first site you’re using isn’t as reliable at predicting how JSON path filtering will work in IDN, the site that’s linked on this page: Filtering Events | SailPoint Developer Community has been more reliable for me:

Online JSONPath Evaluator Tool (javainuse.com)

Try getting it working there and hopefully that should help.

Another thing I noticed is in the body of your email you wrapped that JSON path with a set of curly braces, trying double curly braces, so instead of {JSONPATH}, try {{JSONPATH}}

Hi @clebercarvalhoRaise

To reference a variable in the send email action, you need to add the reference in the templating context of the send email action, for example, if I want to reference the identity name in the email, I would add this in the context:

{“name.$”:“$.getIdentity.name”}

Where name will be the name of my defined variable and the json path expression “$.getIdentity.name” will be the value. Then to use this in the email body I would simply use:

$(name).

For what you want to achieve, you would need to define a variable in the send email context for the jsonpath expression “$.getAccounts.[?(@.sourceld==‘776fa20a72cf400ebc91491bf9d8fd4d’)].nativeldentity” so it would look something like this:

image

Hope that helps

1 Like

Just a small update on this, this should work for you @clebercarvalhoRaise :

Body: ${name}

Templating Context:
{"name.$":"$.getAccounts.accounts[?(@.sourceId=='776fa20a72cf400ebc91491bf9d8fd4d')].nativeIdentity"}

Thanks,
Shailee

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.