Sending Data including arrays to G-Sheet in bulk

I have data incoming to the Webhook, that looks like this:

The worktime-Array can contain quite a lot of collections.

Every time new data arrives, I want to add new rows to a google Sheet in Bulk. (If the Array has 4 collections, i want to add 4 rows)

Column A: projekt
Column B: {{1.worktime.day}}
Column C: {{1.worktime.start}}
Column D: {{1.worktime.end}}
etc.

→ I tried using Google Sheets “Bulk Ad Rows (Advanced)”, but don’t know how to map it, so I have the projekt in Column A of every row.

→ I also tried Iterator and Set Variable, to add projekt into the array before sending to G-Sheets, but also couldn’t get it to work

I want to use as little operations as possible, since this will run multiple times a day with lots of collections per incoming data.

Looking forward to your help !

Welcome to the Make community!

When you see ARRAY, think ITERATOR.

f6bfdc6c487724e92fe7cb6537b52f6d3c999487

Screenshot_2024-07-15_210752

Then,

Aggregators

Every result (item/record) from iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

There are other types of aggregator modules, click the below links to find out more:

Array Aggregator – mapping multiple bundles into a complex field

The Array Aggregator module is very powerful because it allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

This is done using the “Target structure type” of an Array Aggregator module.

Here is an example:

As you can see, the “Map” toggle on complex fields are used when you have an array. You can easily build an array variable to map to a future module’s field, by using an Array Aggregator module and select the “Target Structure Type” as the future module’s field you have mapped the array into.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.