I’m hoping to get some help with an issue I’m encountering, as I couldn’t find much information online or in the documentation.
When I iterate over a single array, I can access all the keys I need. For example, when iterating over a Gmail array aggregator, I can retrieve values like the email address, subject, etc., and everything works perfectly.
However, when I try to iterate over two arrays by adding each as an individual item (Item 1 and Item 2) and turning off the Iterator Map toggle, I only see the 3 keys shown in the attached screenshot. I’ve confirmed this behavior happens specifically because I added more than one array into the iterator. The nested values inside these arrays aren’t accessible.
For context, I’m familiar with the basics of Make.com, so feel free to explain with some detail.
Could someone help me understand why this happens and how I might resolve it? Any advice or insight would be greatly appreciated!
You’d probably want to join the arrays first using merge, and not manually insert each array into separate Items.
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 —
Every time I receive an email, I want to check if there is a task in ClickUp with the same task name as the sender’s email address. If a match is found, I want to create a subtask in that ClickUp task. The subtask should have the subject line of the email as its name.
If no matching task exists in ClickUp for the sender’s email address, I want to create a new parent task in ClickUp using the sender’s email address as the task name. From then on, any additional emails from that sender should create subtasks under the parent task (using the email subject line as the subtask name).
I’m having trouble getting this workflow to work as expected and could use some guidance on why it’s not functioning properly.
Any help would be greatly appreciated—thanks in advance! It would also be great to understand why my iterator values are not working as expected. When I check the filter, it sometimes shows as empty.
Do I need to use two separate iterators—one for each module (e.g., one iterator for the emails module and another for the “List All Tasks” ClickUp module)?
@BeyondCode , This should work directly. but needs adjustments.
This will iterate for each new mail, so for example if you have 2 mails, it’ll list all tasks 2 times (one for each), but on each iteration it’ll go through ALL of the tasks. so if we have 50 tasks, we’re going through them each time. The problem is that if the task doesn’t match with the mail (say 49 of the tasks don’t match), this will create 49 tasks (besides of matching with 1/50 task and creating subtask).
Here’s the adjustment to avoid this issue :
before “NO match” branch, we filter out Bundle position=Total bundle numbers of Clickup (we’re at the end of the task list) and we check if the subtask has not yet been created (next filter). The state of subtask being created or not is being renewed in the beggining of the scenario.
Man you have really helped me here and in quick time. I seriously appreciate it! I will look into this asap as this is my main focus atm, if I have any issues I’ll try to respond in the next few hours, but I’ll also make sure to confirm this solution worked for sometime today most likely. Cheers and thanks again!
Ok, @kudracha here’s my first question in regards to your second module used in the flow—please feel free to correct me if I’m misunderstanding anything.
The “List All Tasks” ClickUp module behaves like an iterator, and since it comes directly after the “Watch Emails” module (which is also an iterator), the “List All Tasks” module ends up performing multiple operations instead of just one. Specifically, for every email received, it repeats the same operation.
For example, if I receive 50 emails, the “List All Tasks” module runs 50 operations—one for each email. To prevent this (as mentioned in my original post), I added an Aggregator module right after the “Watch Emails” module. This allowed the “List All Tasks” module to perform just one operation, retrieving all tasks in a single run, instead of repeating the task retrieval for each email.
Could you clarify why the “List All Tasks” module performs duplicate operations for each email and why you didn’t use an aggregator right after the watch emails module to save operations moving forward? I’d like to avoid increasing the number of operations unnecessarily, especially when processing a high volume of emails. By using an Aggregator module, I can consolidate the data and ensure that the “List All Tasks” module runs only once to fetch all the necessary tasks.
Let me know if I’ve misunderstood anything here. Thanks in advance for your help!
Yeah, I’m still really stuck on this. The solution you provided, Kudrachaa, works, but for two days now, I still haven’t found a way to cut down on operations. The Iterator ends up using way too many operations in the current setup, which is why I initially used the Array Aggregators.
@samliew , or Kudrachaa, if you have any insights, I’d really appreciate your feedback. I’ve spent so much time on this already—almost three days now working into the late night haha… It’s been a very intensive learning process, constantly going back and forth with different solutions, only to hit a dead end each time haha… Kudrachaa, I’d also like to understand the reason for why you used the purple tool modules, what is the purpose for the second one and the others? I"m also very confused on what is the reason for the total number of bundles filter argument…
I’m a little busy at work these days, let me answer :
Edit - removed : [List tasks do work as an iterator, but if you declare it as an array and then use iterator, it’ll be just one extra step (and an operation). for 1 mail you list 1 time and if you have 10 items listed, you’ll need to create task/subtask 10 times total anyways.] - not true, see here:
It’s true that if you list all tasks BEFORE you watch mails, you could aggregate in an array and then iterate 1 time instead of 50 for 50 mails. The problem is that you can only put Watch mail in the first place. I don’t think there’s a way to decrease operation numbers on this…
There’d be a way to decrease operations with variable declarations. You’ll have to limit watch mail to 1 at a time and remove all variables. instead of variables, we’ll :
Put a ‘parse json’ module at the end of ‘yes’ Branch after clickup:createsubtask and put ‘emptystring’ in the body. (the pink one in make native functions, texts tab). Add ‘commit’ error handling to this parse json module.
remove filter before Clickup:createtask in ‘no’ branch and make sure you have filter bundleposition=bundletotal in ‘NO’ filter.
==> this will TERMINATE the scenario safely whenever it finds a task, and if it reaches end of the list and doesn’t find the task anyways, creates a task. it’s a way to do if/else condition. Json parse is used to throw an error rapidly. This will not work for Mail limit more than 1. (you can test if you want)