---
title: How to add multiple loops of table data per document
slug: how-to-add-multiple-loops-of-table-data-per-document
image: https://make-cxp-documentation.ams3.cdn.digitaloceanspaces.com/apps-center-icons/PREVIEW_DEFAULT.png
createdAt: 2025-11-05T14:23:18.837Z
---

While Make natively supports only one loop per document, this guide demonstrates a method to include multiple independent loops of data in a single document.

## Prerequisites

Before you begin, complete the following setup:

Create a Google Doc which has two independent looping sections as placeholders. These will be replaced by dynamic data during document generation.&#x20;

For example:

- One loop for a list of countries and carriers&#x20;
- Another loop for a list of warehouses

A sample template is shown below:

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/aMMHKvngCezyMBV3JCOHj-20251106-154324.png)

## Steps to add multiple loops of data

### Step 1: Prepare your input data

::::WorkflowBlock
:::WorkflowBlockItem
Collect your input data for your tables. A sample JSON file is attached below.

```javascript
[
  {
    "key": "country_carrier",
    "value": [
      {
        "entry": [
          { "key": "country", "value": "NO" },
          { "key": "carrier", "value": "Posten Norge" }
        ]
      },
      {
        "entry": [
          { "key": "country", "value": "SE" },
          { "key": "carrier", "value": "PostNord Sweden" }
        ]
      },
      {
        "entry": [
          { "key": "country", "value": "DK" },
          { "key": "carrier", "value": "DAO Denmark" }
        ]
      }
    ]
  },
  {
    "key": "warehouse_list",
    "value": [
      {
        "entry": [
          { "key": "warehouse", "value": "Nordic Central" },
          { "key": "city", "value": "Oslo" },
          { "key": "loading_spec", "value": "Dock A" }
        ]
      },
      {
        "entry": [
          { "key": "warehouse", "value": "Coastal Hub" },
          { "key": "city", "value": "Stockholm" },
          { "key": "loading_spec", "value": "Gate 2" }
        ]
      },
      {
        "entry": [
          { "key": "warehouse", "value": "Continental Depot" },
          { "key": "city", "value": "Copenhagen" },
          { "key": "loading_spec", "value": "Platform B" }
        ]
      }
    ]
  }
]
```
:::
::::

This will be the input for your workflow.&#x20;

### Step 2: Add the Parse JSON module

::::WorkflowBlock
:::WorkflowBlockItem
Click the **+** sign on your scenario builder.
:::

:::WorkflowBlockItem
Search and add the **Parse JSON&#x20;**&#x6D;odule.
:::

:::WorkflowBlockItem
In the **JSON string** field, paste your JSON data.

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/goCx09cbMkM5DtwxFr-hR-20251107-073524.png)
:::

:::WorkflowBlockItem
Clic&#x6B;**&#x20;Save**.
:::

:::WorkflowBlockItem
Right click on the module and click **Run this module only**.
:::
::::

The raw JSON data is transformed from a single block of text into keys and values that can be used and mapped by subsequent modules in your scenario.

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/tdQHXt_rlKdvBjgXDP1Vb-20251107-074245.png)

### Step 3: Add the Array aggregator module

::::WorkflowBlock
:::WorkflowBlockItem
Click the **+** sign to add a new module.
:::

:::WorkflowBlockItem
Search and add an **Array aggregator&#x20;**&#x6D;odule.

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/ws6feFsqGTsfFpm0iDoCo-20251107-074504.png)
:::

:::WorkflowBlockItem
Click **Save**.
:::
::::

Array aggregator will eventually combine multiple items from the JSON file into one array. It also needs a traget data structure type for looping which is not availble yet. Therefore, you will configure this module at a later stage during this workflow.&#x20;

### Step 4: Download the document template

::::WorkflowBlock
:::WorkflowBlockItem
Click th&#x65;**&#x20;+** sign to add a new module.&#x20;
:::

:::WorkflowBlockItem
Search and add the **Google Drive - Download a file** module.
:::

:::WorkflowBlockItem
From the **Enter a File ID** dropdown, click **Select from the list**.
:::

:::WorkflowBlockItem
From the **Choose a Drive field** drop down, click the drive where your template document is saved. In this scenario, it is *My Drive.*
:::

:::WorkflowBlockItem
From the **File ID&#x20;**&#x66;ield, search and click the *Template doc* file.

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/wkopdhebtQiShGWRih2am-20251107-075039.png)
:::

:::WorkflowBlockItem
Click **Save**.
:::
::::

The Google Drive module is now configured to download the *Template doc* file from the chosen location.

### Step 5: Fill out the document template

::::WorkflowBlock
:::WorkflowBlockItem
Click the **+** sign to add another module.
:::

:::WorkflowBlockItem
Search and add the **Microsoft Word Templates - Fill out a document** module.
:::

:::WorkflowBlockItem
In the **Name of filled out file** field, enter the name you want the output file to have. In this scenario, it is *Filled out doc.docx.*
:::

:::WorkflowBlockItem
From the **Data source** field, click **Form**.
:::

:::WorkflowBlockItem
Toggle the **Map** button to **ON**.
:::

:::WorkflowBlockItem
In the **Values** field, map the array output from the **Array aggregator** module.

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/FUvvT1AnsO0DN-H_htQ5n-20251107-075406.png)
:::

:::WorkflowBlockItem
Click **Save**.
:::
::::

A new Microsoft Word document is ready for use in your scenario. You will further configure the process of merging data to create a final document in the upcoming steps.&#x20;

### Step 6: Upload the generated file&#x20;

::::WorkflowBlock
:::WorkflowBlockItem
Click the **+** sign to add another module.
:::

:::WorkflowBlockItem
Ad&#x64;**&#x20;Google Drive > Upload a File&#x20;**&#x6D;odule.
:::

:::WorkflowBlockItem
Configure the module as shown in the image below.

**Enter a Folder ID**: Select from the list.

**New Drive Location**: Select your preferred Google Drive folder.

**New Folder Location:** Select a folder to save the output file from the Microsoft Word Templates - Fill out a document module.

**File**: Select **Microsoft Word Templates - Fill out a document**.

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/dbHJpwMJ0dhiFdiOPLt6f-20251107-075756.png)
:::

:::WorkflowBlockItem
Click **Save**.
:::
::::

The Google Drive module is now configured to upload the *Filled out doc.docx&#x20;*&#x66;ile into a chosen location.

### Step 7: Configure the Array aggregator module

Now return to the Array aggregator module to complete its setup. You configure the Array aggregator later in the scenario because it requires a **Target structure type**. The **Microsoft Word Templates** option only becomes available after the **values** field in Microsoft Word Templates module has been mapped to the output array from the Array aggregator module .

:::::WorkflowBlock
:::WorkflowBlockItem
From the **Target structure type** dropdown, click **Values&#x20;**&#x75;nder **Microsoft Word Templates - Fill out a document**.
:::

:::WorkflowBlockItem
From the **Value type&#x20;**&#x64;ropdown, click **Loop or section.**
:::

::::WorkflowBlockItem
In the **Key&#x20;**&#x66;ield, map the `key` from the Parse JSON module.

:::hint{type="info"}
If you do no see `key`, right-click on the **Parse JSON module&#x20;**&#x61;nd then click **Run this module only.&#x20;**&#x57;ait for sometime for the fields to load.
:::
::::

:::WorkflowBlockItem
Toggle to switch on the **Map** button next to the **Value&#x20;**&#x66;ield.
:::

:::WorkflowBlockItem
In the **Value** field, map the **`value[]`** from your parsed input (JSON) file.

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/3AYyQlPvsTT-G4RxRXe84-20251107-081707.png)
:::

:::WorkflowBlockItem
Click **Save**.
:::
:::::

The Array aggregator module is fully configured and ready to combine your parsed data into the required structure for the Word template for looping multiple tables.

### Step 8: Run your scenario

::::WorkflowBlock
:::WorkflowBlockItem
Click **Run Once** to run your scenario.
:::

:::WorkflowBlockItem
Review the generated output file to confirm that both looping sections have been populated correctly.
:::
::::

Your output file must contain two distinct tables or lists, each populated from its respective data loop:

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/J1O7lS9pd0TxpkOHzUnjf-20251107-082154.png)

Your scenario at a glance:

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/TFNZoJHeczSODRpACcGpY-20251107-145830.png)

