# Attachment Field in Airtable - Array of objects expected in parameter

**URL:** <https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959>\
**Category:** Questions\
**Tags:** arrays, airtable\
**Created:** [December 2, 2024, 2:09pm UTC](https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959 "2024-12-02T14:09:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![avallese](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@avallese](https://community.make.com/u/avallese)\
**Post date:** [December 2, 2024, 2:09pm UTC](https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959/1 "2024-12-02T14:09:16Z")

</div>

Hi Guys! I need your help with the following scenario:

1. A list of products is returned from Shopify.
2. I need to add a record in Airtable with one o more “Attachments”, depending on what is returned from Shopify. Here I get the following error: Array of objects expected in parameter in field “Adjunto” (Attachment).  
 ![Screenshot 2024-12-02 at 10.55.29](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/e/2e5d3436f9c67f0b2b8c32d43068a36ce3bbdf17.png)

This is the data returned from Shopify, this field can have one or more image urls.

 ![Screenshot 2024-12-02 at 10.56.09](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/c/6/c62f296e8a5715ad8d190c100bb71ca14496dabb.jpeg)

This is how I have mapped it in Airtable:

 ![Screenshot 2024-12-02 at 10.55.11](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/c/6/c660005588150d46f513ab5ea5acbae8b095fcf3.jpeg)

---

<div class="post-metadata">

**Author:** ![Terry\_Hopper](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/terry_hopper/32/13806_2.png) [@Terry\_Hopper](https://community.make.com/u/Terry_Hopper)\
**Post date:** [December 2, 2024, 3:14pm UTC](https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959/2 "2024-12-02T15:14:03Z")

</div>

Hi @avallese!

Airtable is expecting a collection including URLs and (optionally) FileNames. But the map function you’ve used is just sending a simple array or URLs.

For example, if you slide the “Map” control you’ll see Make is asking for something like this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/b/7b65f1c262f707a9ea6df998c4c130e47a8aab9a.png)

You can map the `Src` to the `File URL` field there.

This will, of course, only import the first image.

To create the correct array, you could Iterate over the Images array, and then use an Array Aggregator to build the correct collection to map to the Airtable app. If that sounded complex, i’ll walk you through it!

It will look like this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/7/575e43416e610915ea20d408d9a5dcbef16c3e25.png)

**The Iterator**

The first Iterator will be mapped to your Images array. In my scenario the Images array is called “Logo”:

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

**The Array Aggregator**

Select your Iterator as the Source Module.  
Your Target Structure Type will be your Adjunto field in the Airtable module.  
Map the File URL from your Iterator module.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/a/7ad5f2fd6dfc83d44fa8bdc3d5295a1829500440.png)

**the Airtable Module**

Map the Adjunto to the Array produced by the Array Aggregator module:

Like this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/4/d447e5860482276fcaf125b93cd107a867aa00ec.png)

Let us know how it goes.

Regards, Terry.

---

<div class="post-metadata">

**Author:** ![avallese](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@avallese](https://community.make.com/u/avallese)\
**Post date:** [December 2, 2024, 4:30pm UTC](https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959/3 "2024-12-02T16:30:39Z")

</div>

Hi Terry! Thanks for your reply.  
I wanted to avoid adding more modules to my scenario.  
Previously, I was using Google Sheets and this function worked fine to return all the urls separated by commas. Is there a workaround like this?

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

---

<div class="post-metadata">

**Author:** ![Terry\_Hopper](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/terry_hopper/32/13806_2.png) [@Terry\_Hopper](https://community.make.com/u/Terry_Hopper)\
**Post date:** [December 3, 2024, 12:18pm UTC](https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959/4 "2024-12-03T12:18:08Z")

</div>

Hi @avallese ,

Sorry, not without extra modules. The map function you’ve used is just sending a simple array of URLs, but Airtable needs more info.

Regards, Terry.

---

<div class="post-metadata">

**Author:** ![avallese](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@avallese](https://community.make.com/u/avallese)\
**Post date:** [December 3, 2024, 3:14pm UTC](https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959/5 "2024-12-03T15:14:15Z")

</div>

Hi Terry,  
Can it be converted to json or something like that?  
[  
{  
“url”: “Images[1]Src”  
},  
{  
“url”: “Images[2]Src”  
}  
]

I understand that I cannot insert this json directly in the “Adjunto” field.

---

<div class="post-metadata">

**Author:** ![avallese](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@avallese](https://community.make.com/u/avallese)\
**Post date:** [December 3, 2024, 3:50pm UTC](https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959/6 "2024-12-03T15:50:04Z")

</div>

I found a workaround.  
As the json cannot be passed directly in the “Attachment” field because it is considered just a string. I used the Json Parse module.

I also used an If statement to create the json correctly. In my case, I only needed 3 images.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/3/6/363338b18b444e8290a5ff47a84a4603ebb1c022.png)

I am sure there’s an easier workaround. I got inspiration from this thread:

> [@ERROR: Array of objects expected in parameter 'fields'](https://community.make.com/t/error-array-of-objects-expected-in-parameter-fields/26637/2):
>
> Welcome to the Make community! Your structure appears to be correct. However! That is just a JSON string representation of an array, but it is not a variable of type array. You need to convert the JSON string into an array using the Parse JSON module. Here is an example of how to map it: [Screenshot\_2024-02-03\_000227] You might need to “wrap” your array with a variable: { "array": INSERT\_ARRAY\_JSON } If you do not want to mess with JSON strings, you ca…

---

<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:** [December 17, 2024, 3:55pm UTC](https://community.make.com/t/attachment-field-in-airtable-array-of-objects-expected-in-parameter/62959/7 "2024-12-17T15:55:31Z")

</div>


