Update Document on Google Cloud Firestore For Array String

I’m stuck with what looks like a Make UI / Firestore connector issue and I want to explain it clearly.

My setup

  • I iterate over an array of items using Iterator

  • I collect their id fields with Array Aggregator

  • Aggregator output looks correct, for example:

    [
      { "id": "koltuk" },
      { "id": "lamba" }
    ]
    
    

My goal is to update a Firestore document field:

items: ["koltuk", "lamba"]

So this is a simple array of strings.


What I tried

In Google Cloud Firestore → Update a Document module:

  • Field name: items

  • Value type: Array Value

  • Value (Map enabled):

    map( ArrayAggregator.Array ; id )
    
    

Make’s own help tooltip for map() says:

“Use raw variable names for keys”

So the syntax should be correct.


The problem

Even though:

  • The Array Aggregator output is correct

  • map(Array; id) is syntactically valid

  • The value field visually contains the expression

I always get this error on execution:

BundleValidationError: Missing value of required parameter ‘value’

It’s as if Make considers the field empty, even though the expression is there.

The red validation warning in the module UI also never disappears.


Important notes

  • If I turn Map ON, the Firestore module fails validation

  • If I turn Map OFF, I can’t dynamically pass the array

  • The same array works perfectly in other modules

  • Firestore document field exists and is an empty array: items: []

  • This is NOT an append use case — I just want to overwrite the array

This feels very similar to other Make UI bugs where expressions are not recognized as actual values (I saw similar issues discussed with OpenAI / Content blocks).


Hey there,

the error suggests that the field is not expecting an array there. Or maybe its missing something in a different field altogether. Can you show a screenshot of the module setup?

Hey @Stoyan,

Thanks for reply. In the below you can see my setup and Flow Control Array

Ok so what you are doing is mapping the entire array inside the value of the first item of the array. Toggle the map button next to Add or Update Fields to map the array instead. Also, you need to make sure the array follows the expected structure.

Welcome to the Make community!

According to the official documentation,

update(ref, values)

The values argument contains multiple property-value pairs that will be written to the Database together. Each child property can either be a simple property (for example, “name”) or a relative path (for example, “name/first”) from the current location to the data to update.

source

Therefore, I believe this field has been used incorrectly:

This is because, when you unmap the Value field, to insert/update items in that array, you’ll also need to specify a TYPE as well.

For more information, see “Mapping a Complex (Collection) Structure Into an Array Field” below.


From your screenshot / output bundle, it appears that you have an array of items. What do you do when you have an array?

“Looping” Through Array Items

When you see an array in a module’s output, think of using an Iterator module. This allows you to individually access and process each item in the array.

In this example, this variable is an array of items (collections). You’ll want to map this variable in an Iterator module.

Question: Have you tried mapping your array variable into an Iterator module, ran the scenario once, and view the output? Then …

Combining Bundles Using Aggregators

Every result/item from some module types (like Trigger / Iterator / List / Search / Match modules) can potentially and likely output more than one bundle. These multiple bundles will individually run subsequent modules once per bundle, which is not optimal in most cases:

  • one operation per bundle per module, which could lead to…
  • use of multiple credits per bundle per module (some modules use more than one credit)
View example screenshots

Aggregator Example

The “Search Rows” module runs one time, returning 999 results (999 bundles).

  • Without Aggregator: the tools module run 999 times (999 operations)


    (and if there are more modules, they run 999 times each)

  • With Aggregator: the tools module only runs 1 time (1 operation)

:warning: Warning: :police_car_light:
This can easily use your entire quota of credits if you are not careful or fail to understand this concept.

To “combine” multiple bundles into a single variable, so that you can process all of the items in a single operation, you’ll need to use an aggregator. Aggregators is a type of module that accumulates bundles and outputs one bundle (unless you are using “Group By”). An example of a commonly-used aggregator module is the Array aggregator module.

You can find out more about some other aggregator modules here:

Question: Which is the best aggregator do you think you’ll need for your use-case?

Mapping a Complex (Collection) Structure Into an Array Field

The Array Aggregator module is very powerful because it allows you to build a new complex array of collections that matches a later module’s array field to map multiple items (collections) to it. Such fields initially may allow you to manually add individual items, but toggle the “Map” switch on, and you can map an array variable (from an Array Aggregator) containing multiple collections.

Simply select the respective “Target structure type” in an Array Aggregator module.

As you can see from the above example, the “Map” toggle on complex fields are used when you have an array variable (like from an array aggregator).

:clipboard: Note: :light_bulb:
Other combinations of modules may also allow you to generate an array that matches a future module field’s array structure, like “Aggregate to JSON + Parse JSON”, or “Create JSON + Parse JSON”, but this is an advanced topic.

Question: Are you mapping your array into a field that accepts more than one item/collection?

Example

Here is an example of how your scenario could look like:

This is just an example. Your solution may or may not look like this depending on requirements and actual data.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!