Process just the first Bundle

Hello

I could potentially get a number of results back from a search. I cannot use Limit (for various reasons) but only want to insert 1 record into AirTable with the first bundle (record), regardless of the order.

If I don’t use Limit and get 5 results back from the search, it inserts 5 rows into AT.

Any ideas?

Hello @mdb213,
By default when you use Make’s default Iterator module it needs an Array as input and then it’s iterate through it.
Check this carefully and understand it.

How Iteration work with different modules

In Make when you have any of the modules that return multiple bundles and then after that on the very next module, you use direct operations like add/update/delete, They consider it as an iterator and integrate through several bundle returns from that module. For example, when you use search records from Sheet, Mails or Airtable records itself.

For example, if you’ve used Search records from Google and then use the Add to Airtable module directly after the Google sheet module then it adds all the records to Airtable which come from Gsheet.

Solution for you

In your case use the Array Aggregator module after your multiple bundle (or search) module, Choose the fields you need on your next module.
Then use a set of multiple variables to get the first element from that Array from the Array Aggregator module.
{{get(yourArray; 1)}} this is return first element(bundle) of array.
Then in the next module use the get and map functions to point out specific values on specific fields.

I think If you know how to use these modules and function things then this is enough for you.
If this does not solve your issue then also share your input/output data with a screenshot.


:bulb:P.S.: Always search first, Check Make Academy. If this is helpful, mark it as a solution :white_check_mark: and :+1:
Need expert help or have questions? Contact or comment below! :point_down:

2 Likes

Great! Makes sense and thank you for taking the time to explain