Hi everyone,
I’m trying to build an automation that processes invite codes from an external API, where I need to:
a. Fetch multiple invite codes from an API. [module 12]
b. Filter those codes to only select ones where the status is “Available”.
c. Pick one invite code (the first available one) and mark it as “Assigned” in my API webhook. [module 15]
With help from our engineer I was able to auth the API, fetch the codes and I can even assign the status now.
The problem is that I cant’ find a way to filter only 1 result from the iterator. [module 14]
I’m looking for something like “Maximum number of results” like Webhooks tool has.
I tried aggregating the results and then slicing them up, but the Aggregator only references the previous module (Source module) and skips the filter between these modules.
Also tried to apply the slice function inside the iterator, with slim results.
Then I tried to move the slice function to a Set Variables module after the aggregation but got an error with the mapping. Moving the Set Variables module after aggregation didn’t work either.
I’m wondering if this is the right way at all, and if there’s a logical way to filter the amount results?
I have shared a screenshot of the automation here. Everything that is connected at the bottom works great. [17, 19, 2, 5, 10] Admin auth, iterator and Update the status [12, 13, 14, 15] works well together and also combined with the automation at the bottom, but will spit out all the available codes instead of just 1. For now I keep them separated and pull the codes manually to the google sheets.
Thank you for participating!