I’m trying to create a conditional action in a Directus flow that checks whether a card has collected all the stamps required by the related offer.
In my flow, I have a “Read Data” step called get_card
which successfully returns a card, its related offer, and all its stamps.
My condition looks like this:
{
"{{get_card.count(stamps)}}": {
"_eq": "{{get_card.offer.stamps_required}}"
}
}
{{get_card.offer.stamps_required}}
works perfectly — but the {{get_card.stamps(count)}}
part always comes back as undefined
.
I’ve tried variations like {{get_card.stamps.length}}
and {{get_card.stamps.count}}
, but no luck.
Am I referencing the stamp count incorrectly here? What’s the correct way to get the number of related items in a flow condition?
Thanks in advance!