Bundle containing parameters that are arrays - how to iterate around this?


I’ve done this difficult part! I get my handwritten notes OCR-ed by Google, summarised by OpenAI and OpenAI also populates a Structured Data Definition with action points. What I’m trying to do now is to take that “list” of action points, iterate over them and insert them into a Todo list using another module.

The problem is that I am dealing with a single output bundle that has 3 parameters, each parameter is an array. The parameters are taskName, dueDate and priority. I am at a loss how I can simply iterate over and insert ‘x’ number of tasks into Todoist depending on the number of array elements.

Here’s the output of OpenAI showing the data:

If I try to us an Aggregator module then it gives me an array of arrays, which is just as useless to me:

Any help would be lovely.



… of course, once I posted my question I managed to work out a solution. I don’t know if this is a good way of handling this, but it seems to work. Here’s what I ended up with in my scenario:

In the Iterator module I’m just iterating around ONE of the three array parameters I have:


… in the Tools - Set Multiple Variables module, I set 3 variables for taskName, dueDate and priority based on the array from the OpenAI output, and the number of the iteration we’re currently on, from the iterator. This is the part I didn’t think I could do in a Make module: it’s basically using normal code logic to retrieve an array value, like “taskName[1]”.

I then use the values set in the Set Multiple Variables module in the Todoist module to create the task.

Job done!



Excellent, glad you managed to figure this one out and for sharing your solution!