Hi, I’m pretty new to Make, and after studying all modules in the Make Academy I’ve spend half a day trying to solve a problem with processing collections in arrays in collections.
My goal is to read calendar items from Infinity and send them to (create them in) Google Calendar. The challenge is that the Infinity module does not always provide the item name in array element 1, start date in array element 2 and end date in array element 3. I have seen start date ending up in element 2, and with another calendar item in element 3.
Luckily the attribute id defines whether it’s the title or start date or end date that is contained in the array element.
Here’s the JSON that I created to test the scenario:
[
{
“id”: “c1”,
“values”: [
{
“data”: “Calendar item 1”,
“attribute_id”: “T”
},
{
“data”: “2025-02-23”,
“attribute_id”: “S”
},
{
“data”: “2025-03-01”,
“attribute_id”: “E”
}
]
},
{
“id”: “c2”,
“values”: [
{
“data”: “Calendar item 2”,
“attribute_id”: “T”
},
{
“data”: “2024-10-18”,
“attribute_id”: “E”
},
{
“data”: “2024-10-12”,
“attribute_id”: “S”
}
]
}
]
The blueprint attached shows a very simple scenario with just a Parse JSON module and a Set multiple variables module.
I have added nested IF statments to the value fields to determine the attribute type. Variable 1 (“Event”) should only be filled if the attribute id = T(itle), variable 2 (“Start date”) should only be filled if the attribute id = S(tart date), and variable 3 (“End date”) should only be filled if the attribute id = E(nd date).
However, all three variable are filled with the event title. I can’t see the cause of the error. Any help is much appreciated!
Please refer to the blueprint to see what’s happening.
blueprint.json (5.9 KB)