If ID exists update, if not create

Hello,

I am trying to implement the following scenario:

1- Read all rows of Microsoft Excel
2- Set the ID as Variable
3- List all tasks in the ClickUp list
4- Filter if the ID is or is not the same as the task name
5- If not create a new task with the name of the task to be the ID (that exists in the Excel)
6- If it already exists update the existing task, if the specific field was changed.

So far, I was able to create a scenario that read Microsoft Excel and create it as the task, but I have the issue of duplicated tasks, and updating existing tasks.

I tried to use two aggregators to compare two arrays between the excel sheet and ClickUp, but it still duplicate. Please note there is no Search option for Microsoft 365.

I appreciate your help.

Thanks,

Judy

Hi @Judy_Dibsi,

What you can do is filter in between the Get All Tasks and Array Aggregator, i.e Module 20 and 30.

In there, you can use filter to check if the array you obtained in the Array Aggregator after the List Worksheet Rows, contains the task name that you get from List all Tasks, So something like this,

Please note that you might need to use the map function instead of directly interacting with the array that you get from the aggregator. After which, Before the Create a task, you can then use if array length equals zero, to check if there is no match for the given task name and then create a task in ClickUp,

1 Like

Hi @Runcorn,

Thanks for your response. However, this did not work, I think because the excel data structure is a collection not an array.

Yeah, Like I mentioned you need to use map function on the array before doing filter.

3 Likes

Yes, but that just filter if it is available or not, and doesn’t create the ones that do not exist.

Thank you

It worked, but I did the opposite, compared the excel row with the array of available tasks.

Thanks :pray: :partying_face:

1 Like