# How to set multiple Airtable linked records?

**URL:** <https://community.make.com/t/how-to-set-multiple-airtable-linked-records/47474>\
**Category:** Questions\
**Tags:** airtable\
**Created:** [July 23, 2024, 3:36pm UTC](https://community.make.com/t/how-to-set-multiple-airtable-linked-records/47474 "2024-07-23T15:36:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobertAndrews](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/robertandrews/32/2787_2.png) [@RobertAndrews](https://community.make.com/u/RobertAndrews)\
**Post date:** [July 23, 2024, 3:36pm UTC](https://community.make.com/t/how-to-set-multiple-airtable-linked-records/47474/1 "2024-07-23T15:36:57Z")

</div>

In this branch, the “Parse JSON” module plucks a Long Text field containing a pre-JSON string, in the format…

```auto
{
   "people":[
      {
         "name":"Bill Gates",
         "title":"Chairman",
         "company":"Microsoft",
         "role":"speaker"
      },
      {
         "name":"Dan Rather",
         "title":"Anchor",
         "company":"CBS News",
         "role":"interviewer"
      }
   ]
}

```

There will always be multiple people - there may be multiple **speaker** s, usually only one **interviewer**. For all those found, I want to search for and create/update (Upsert) them.

Assume 4 **speaker** s and 1 **interviewer**.

Then (and this is the key) I want to set these as linked records in one of two fields of the starting Airtable record, depending on their **role**.

 ![Screenshot 2024-07-23 at 16.32.32](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/c/a/ca1d724a38ed233be13e12981317536de7a9655e.png)

In the below, I’ve basically done this fine. However, w **hen it comes to the Router path filtered for acting on role “speaker”, is is Updating the starting record four times and overwriting the linked record, rather than adding all four to it once.**

I guess that’s because I’m using the Iterator to do “For each person”.

Does anyone have a better way of doing this, please?

 ![Screenshot 2024-07-23 at 16.27.29|428](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/e/5/e5cd4494a35870a548ca6a51624105c9a39ec4e0.png)

---

<div class="post-metadata">

**Author:** ![Mr.Make](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/mr.make/32/93066_2.png) [@Mr.Make](https://community.make.com/u/Mr.Make)\
**Post date:** [July 23, 2024, 3:42pm UTC](https://community.make.com/t/how-to-set-multiple-airtable-linked-records/47474/2 "2024-07-23T15:42:48Z")

</div>

Sure there is a better way to do this.

After you create the new or update the new person use an array aggregator and aggregate the IDs that you created or upserted

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/0/2022317efdb6a6fd6d6b24559c92e7b031ce8ae1.png)

Then you can map the ids into the linking.  
From the looks of it you will need to also aggregate the type of person then filter the mapping based on the type (basically what your filters do)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/1/e/1e5f1baf66d0153b9178a0fcb7a58ddbf72041ef.png)

---

<div class="post-metadata">

**Author:** ![RobertAndrews](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/robertandrews/32/2787_2.png) [@RobertAndrews](https://community.make.com/u/RobertAndrews)\
**Post date:** [July 23, 2024, 5:44pm UTC](https://community.make.com/t/how-to-set-multiple-airtable-linked-records/47474/3 "2024-07-23T17:44:54Z")

</div>

> [@Mr.Make](#):
>
> After you create the new or update the new person use an array aggregator and aggregate the IDs that you created or upserted

@Mr.Make

**1. This just results in four separate bundles, rather than a combined one.**

 ![IMG_1733](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/e/8eb571a2f263b46c371e1a8ba456e174a0ed4aa5.jpeg)

Using a Set Variable to test a map, I still don’t see this combining the rec IDs…

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/1/8/18a43a8824b1631bd0d34054dbe7274ff167d9a1.jpeg)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/5/d5359a0d253bd517337fffd928379282ef184686.jpeg)

Still unsure how to set multiple records in a linked record field…

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/6/8658f83a6b49364caffc7370370c2896eabc4cff.jpeg)

`{{map(; 461.array[].id; "id")}}` in the Airtable field gets sent as empty.

1. FYI, the person’s “role” is sourced in the earlier JSON and not in their Airtable record (though I do see it’s possible to combine fields from two modules in an array aggregation).

---

<div class="post-metadata">

**Author:** ![RobertAndrews](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/robertandrews/32/2787_2.png) [@RobertAndrews](https://community.make.com/u/RobertAndrews)\
**Post date:** [July 24, 2024, 8:45pm UTC](https://community.make.com/t/how-to-set-multiple-airtable-linked-records/47474/4 "2024-07-24T20:45:53Z")

</div>

@Mr.Make

I think it’s leading to four separate bundles because of the upstream Iterator I used to pluck four people out of the JSON object’s “people” node (which is its only parent node)…

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/1/719a487f6c539976f10d5c3d43cbc96022374cb2.jpeg)  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/8/98c18b1d00cb7c016f0dc488d811ece03605df0a.jpeg)

(This is necessary because the JSON object contains the people we’re looking for in Airtable. When we Upsert them to the People table, we then want to set them in the Assignments table in either the Speakers or Interviewer linked-record fields.)

But things are getting executed four times due to module 375.

It’s complicated by having to use both 1) recID from the Airtable output and 2) “role” from the JSON output.

Do I need to do something like start by initialising an array before the Iterator, then sequentially adding stuff to it?

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [October 22, 2024, 8:54pm UTC](https://community.make.com/t/how-to-set-multiple-airtable-linked-records/47474/5 "2024-10-22T20:54:39Z")

</div>


