Extract Collection fields and Aggregate to Variable Array?

Complete rookie here so thanks in advance for your help!

I’m trying to update a Google Calendar event with attendees that correspond to emails that exist in 3 different places of an updated Clickup task.

Email #1 is contained in the “Assignees” array. I’m good here - Iterate the array, aggregate and map to my variable “Attendees” empty array, which will be mapped to the Google Calendar Attendee field.

#2 Driver Email: and #3 Vehicle Calendar ID: are contained in the Clickup Custom Fields collection (pictured). I think I need the JSON parser here but I have no clue how to set it up.


How do I get those two fields in a format that can be added into the emptyarray variable at the necessary times in my workflow?

Not exactly sure what you want to set up so correct me if I am wrong with my understanding.

What you want to do is aggregate all these emails and then set them as attendees in Google Calendar, right? If so what do you want to do is,

Remove the initial iterator of the Asignees array, and use the Set Variable Module that you have shown in the question where you want to do,

flatten(add(emptyarray;map(Assignees;email);Custom Fields.Driver Email))

In here,

  • add is a function available in Array Section
  • map will get a primitive array from the Assignees section and email is the raw name for the fields holding email in the Assignees array. It can be different so just hover over the emailAddress fields and you should see the raw value for it.
  • And, add() function first value will be a list of arrays from the Assignees field and the other one is the Driver email that you are getting from the Custom Fields

After these are set up, flatten will fix the resultant arrays by removing subarrays and merging the result. And, you can use the aggregator and do the same thing that you are currently doing, but iterate over the Set a Variable Module output.


Yes! Thank you for the explanation. That was exactly it. Now I’m off to experiment more with array functions. Thanks again.

1 Like