Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: issue when filtering with smart values during variable creation

Thibault DUCHATEAU
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2025

Hi there!
I am having a lot of trouble getting the following filter to work.

Context: I am making an API call that returns a list of messages.

I want to filter only the items on the following fields:
- metadata.event_type=“hardCodedString”
- metadata.event_payload.field=“{{value}}” <= value is (supposed to be) a string

A few notes:
- some items do not have a "metadata" field.
- some items do not have the "event_payload.field" field.

Here is the expression I am currently using:

{{#webResponse.body.messages}} 
{{#if(equals(metadata.event_type, "hardCodedString"))}}
{{#if(equals(metadata.event_payload.field, value))}}{{ts}}| {{/}}
{{/}}
{{/}}

Since the field “value” is unique (from a business perspective), I should only get one result or none at all.


However, I regularly end up with inconsistent results: items without metadata, items where the event_type does not match, and items where the field value (within event_payload) does not match.

Does anyone have any idea where the problem might be coming from?

Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events