Generating Word documents in Make with one-to-many data from Airtable

Make is a great tool for processing data from Airtable, including generating Word documents. But when you need to follow one-to-many relationships, and use the child record data, things can get confusing, and the Make documentation doesn’t contain any Airtable-specific guidance.

Example requirements

In this example, I have a Companies table, and an Employees table. A company can have one or more employees:

In a Word document, I have the following placeholders (the curly braces are Make syntax):

and my desired output is:

Make scenario

This is the “scenario” that I used to generate the desired output:

1. Trigger Scenario

The scenario is triggered by a webhook. In Airtable, a column containing a button can be added. The button opens the webhook URL and appends the record ID of the current record:

2. Get Template

The Word template is downloaded from Dropbox (or you can use any other file storage service supported by Make).

3. Get Company Record

The first request to Airtable gets the company record (the parent in the one-to-many relationship), using the record ID received by the webhook:

4. Iterate on Employees

To get the employee records (the children in the one-to-many relationship), we must iterate through the array of employee record IDs supplied in the company record.

5. Get Employee Record

Inside the iteration context, an Airtable request is made for each employee record ID in the array.

6. Populate Document

Make has two types of Word template module. When working with iterators, you must use the “Fill a document with a batch of data” module.

N.B. You do not need to use an “Array aggregator” module, as the aforementioned Word module performs the same function. (I wasted hours on this!)

Set the Source Module option to the Iterator module. This controls the scope of the iteration context (represented by the grey, pill shaped, background in the scenario editor).

7. Upload Document

Finally, do something with the document; in my case, I upload it to Dropbox.