The general question is, instead of calling an app/module multiple times, how I can call it once and use the returned data as needed? For example, iterating another set of data against it to find matching values?
Scenario Example: Watch Hubspot object for changes and update ClickUp task.
The hubspot Module may return multiple ‘bundles’/objects.
In order to update a task you need a task ID, so this means adding another module to return a list of tasks, of which you can then search through to find the Task ID where a field matches a value in the hubspot bundle.
Everything is working, but it seems inefficient that the module runs an operation on ClickUp for every updated deal found in Hubspot. The number of operations consumed in the scenario seems unnecessary, when all I need to do is call ClickUp once to get the list of tasks, find matching values, and then send a Post request to update matched records, with values pulled from the updated Hubspot records.
My attempt at solving this was by using an Array Aggregator on the initial Hubspot module, then adding an Iterator after the ClickUp request, but I started encountering other issues that made this all seem unnecessarily complicated, and so it made me doubt whether I was on the right track.
Module 1: Watches for updated deals.
Module 2: Finds the task where ClickUp custom field = field from Hubspot deal.
Filter: checks whether the fields between the HubSpot deal and ClickUp tasks have differences. If different, proceed to Module 3.
Module 3: Updates the ClickUp task, using the Task ID from Module 2, and the fields from Module 1.
Module 2 is firing more than it needs to, since it really only needs to get called once. It’s purpose is to get the associated task ID in ClickUp for each hubspot deal.
The second flow that I reference has since been abandoned so I don’t have a picture right now.
Have you considered Storing the related clickup Task ID inside of a custom field in Hubspot, so your watch CRM payload already contains the related clickup ID?
You would of course have to have an integration that maps the taskID to hubspot but it would save you from your step2 altogether in future automations.
You would still need a Get Task module since your doing data compare, but it wouldnt be a ListAll module anymore.
Thanks Lorenzo. Yes, storing the ClickUp Task as a field in HubSpot has been on my mind as phase 2 to this implementation, and I can see how that would at least avoid the step of having to find the Task ID, but, as you point out yourself, it doesn’t result in any efficiency with respect to the number of operations, as is the intent of the topic in trying to understand whether a module can only be triggered once.
Getting a specific task or getting a list of tasks, in this scenario, still consumes an operation/step in the process. We are substituting one module for another. What I’m imagining as ideal is the scenario where you only need to request a list of “all tasks” once, then use that list to determine which tasks need to be updated. I’ve tried to abstract the root question so it can revolve around Make’s approach to flow design - where I understand a “bundle” to flow through each module as a unique operation - and therefore trying to fill my knowledge gap on how I can instead have a module, or any number of modules, only trigger once. The scenario being that I don’t need to have it run for every object in the response from the original trigger.
Note: In the flow I made, I’m effectively using the List Tasks module instead of the Get Task module since the Get Task module is limited. It can only be used to find a specific task where one knows the ID. Zapier has a similar Get Task option, but it offers the option to find a task based on any field associated with a task, the assumption being that the value in that field presumably needs to be unique. I’m using the List Tasks module instead, and including a filter in the request that searches for the Deal ID included in the Task.