Reference array of just emails for Google Calendar attendees (Error: Array of objects expected in parameter ‘attendees’)

Hello! I’m trying to use an existing aggregated array of emails from the VolunteerHub API (just emails, {“xyz@abc.com”, “abc@xyz.com”, “123@321.org”}) to create Google Calendar invitations with those emails as attendees.

I tried using just the array of emails itself, but I keep getting the error Array of objects expected in parameter ‘attendees’.

Then, I tried splitting it with commas, putting brackets around it, etc. No success.

Then, I learned that there’s a specific data structure required, but I couldn’t find out how to convert this into key-value pairs. It would be difficult for me to also extract the attendees’ names in this format from the VolHub API, so I’m hoping there’s some way to create this invite with just their emails.

Can someone help me bulk invite attendees from a pre-existing array into Google Calendar?



Welcome to the Make community!

Here’s how to map an array into a field:

You’ll need to Iterate over an existing array, then array aggregate, selecting the “Target structure type” so that you can map the sub-properties.

Every result (item/record) from a search/match module will output a bundle. To “combine” them into a single structure, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and has applies to many use-cases.

There are other types of aggregator modules, click the below links to find out more:

The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

Here is an example of using the “Target structure type” of an Array Aggregator module:

As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.

Links

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

General

Help Center Basics

Articles & Videos

2 Likes

Hi there! Thank you so much, this is helpful and I was able to do it. The problem I ran into however is that I need to preserve some of the other fields from the original call.

In this case, what’s being sent from previous modules are bundles of events, with an array of attendees inside. When I array aggregate just the events, I’m unable to get the other event details to make the calendar event.

I’m attempting a work-around where I array twice, and save variables in between, but it seems messy and I was hoping for a cleaner solution. What do you think?