Retrieving the Generated Google Sheet After the Google Sheets Bulk Add Rows Module

Hello everyone,
In my scenario, I receive data from an Apify dataset items in JSON format. I then pass this data to the Google Sheets Bulk Add Rows module, and after that, I need to pass the sheet ID to the next HTTP module with a GET request. This request triggers a script that creates the required table using the provided data.

The problem is that the Bulk Add Rows module triggers the next action in the scenario after adding each row. As a result, my script and other modules run more than 180 times until all rows are added.

I tried passing data through the Array Aggregator by placing it before Bulk Add Rows, but it only passed one row, even though the output showed an array with all bundles. When I placed it after, it still triggered after adding each row. I also tried adding a filter, but none of my attempts were successful.

Could you please tell me how to correctly pass the sheet ID after all rows have been added?
Also, I would appreciate any advice on how to reduce the number of operations.

1 Like

here is one of my efforts


1 Like

Hi,
So Apify returnes a json and you need to parse it first before aggregating into an array to send it to Google sheets.
Try something like this:

In the aggregator it should have a target structure which is your bulk add rows module:


And in the Bulk add rows module just map it to the aggregated array:

1 Like

Hi there.
I really appreciate your response.
The thing is, Apify returns a parsed JSON (screenshot attached). I understand that it’s not an array, but an iterator requires an array.
Or did I misunderstand something?

1 Like

An array of bundles. What does it show to in the body?