Creating an Array of Email Addresses: A Guide for Make.com Users
I’m trying to loop through a list of attendees for a Google Calendar event and create an array of external attendees’ names and email addresses, before processing them. I know there’s lots of questions about constructing arrays on this forum but I couldn’t find a suitable example which showed how to do this.
I’m iterating over the attendees array -
CleanShot 2023-08-22 at 12.25.19@2x [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/0/0e85f9a066521b52595b2622195801ec81fee86e.png]
Filtering out internal email addresses and then creating JSON objects -
CleanShot 2023-08-22 at 12.26.02@2x [https://europe1.discourse-cdn.com/business20/uploads/make/optimized/2X/a/a20e571b42433d5621aaa7f3ecbbb1cd6b9f04c2_2_302x250.png]CleanShot 2023-08-22 at 12.26.02@2x1094×904 76.1 KB [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/a/a20e571b42433d5621aaa7f3ecbbb1cd6b9f04c2.png]
Then aggregating the results into an array -
CleanShot 2023-08-22 at 12.26.45@2x [https://europe1.discourse-cdn.com/business20/uploads/make/optimized/2X/4/4f8149b565ad009c473de9711871680c3b22892c_2_221x250.png]CleanShot 2023-08-22 at 12.26.45@2x776×874 60.4 KB [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/4/4f8149b565ad009c473de9711871680c3b22892c.png]
And now I have an array where the items look like this -
CleanShot 2023-08-22 at 12.27.32@2x [https://europe1.discourse-cdn.com/business20/uploads/make/optimized/2X/b/b35cd228be1f3d38b1dcf597c4099a1b7d4e546c_2_345x113.png]CleanShot 2023-08-22 at 12.27.32@2x832×274 18 KB [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/b/b35cd228be1f3d38b1dcf597c4099a1b7d4e546c.png]
I thought I could simply insert that array as the body of my HTTP request, like this -
CleanShot 2023-08-22 at 12.28.51@2x [https://europe1.discourse-cdn.com/business20/uploads/make/optimized/2X/e/e847cd8506bfbc6a8fcd5c28b6ddef24d4da9cc8_2_302x250.png]CleanShot 2023-08-22 at 12.28.51@2x874×722 32.1 KB [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/e/e847cd8506bfbc6a8fcd5c28b6ddef24d4da9cc8.png]
But for some reason that produces Request Content like this -
CleanShot 2023-08-22 at 12.30.03@2x [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/4/441292c1d3b50d9bf8faa8db8810159d6ebf764b.png]
Which causes an error:
Unexpected token , in JSON at position 1
If I don’t wrap the array in square brackets, the Request Content is formatted like this -
CleanShot 2023-08-22 at 12.32.17@2x [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/a/a12940d1de22360747ecb8637f5f5055fea3b82d.png]
I’ve tried making every type of change to the formatting that I can think of but I just can’t figure out how to create an array from these JSON objects?
(If there’s a more efficient way to construct this array, which uses less operations, I’d really appreciate any pointers on that too). Here’s an example of the meeting event -
[
{
"kind": "calendar#event",
"etag": "\"...\"",
"id": "...",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=...",
"created": "2021-01-21T00:31:15.000Z",
"updated": "2023-08-14T21:14:09.737Z",
"summary": "...",
"description": "...">https://us02web.zoom.us/u/...",
"creator": {
"email": "...@gmail.com"
},
"organizer": {
"email": "...@gmail.com"
},
"start": "...",
"end": "...",
"recurrence": [
"RRULE:FREQ=MONTHLY;UNTIL=...;BYDAY=2MO"
],
"iCalUID": "...",
"sequence": 0,
"attendees": [
{
"email": "...@gmail.com",
"responseStatus": "accepted"
},
{
"email": "...@gmail.com",
"organizer": true,
"responseStatus": "accepted"
},
{
"email": "...@gmail.com",
"responseStatus": "declined"
},
{
"email": "...@gmail.com",
"responseStatus": "needsAction"
},
{
"email": "...@gmail.com",
"self": true,
"responseStatus": "accepted"
},
{
"email": "...@gmail.com",
"responseStatus": "declined"
},
{
"email": "...@gmail.com",
"responseStatus": "needsAction"
}
],
"reminders": {
"useDefault": true
},
"eventType": "default"
}
]
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.