• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Clickup automation - filtering multiple returned values

megabunch

Member
Your Task History ID
IjU3NjUwNTY1MDYzMzA0MzU1MjZkNTUzNzUxMzUi_pc
I am trying to create an automation with Clickup using API, and the JSON is returning multiple tasks with a custom field called "Schedule Date"

There are around 30 tasks in total in the response https://share.cleanshot.com/dYwY9QWH

I want to to able to look at this value for all 30 tasks, and if the date has passed (based on today's date) to change the status of the task.

I've managed to get the API call pulling the task data, and can see the dates in the JSON returned but I can't figure out how to search all 30 tasks without manually creating a router for each one...

Can this be done with iterator with an array or using text formatter?

I can see that I have all of the data I need there, but I don't know how to search the entire Clickup GET query to look for any dates that have passed in all 30 tasks that have been returned.

The field is always called "Custom Fields 5 Date Created" and the only thing that varies is the task number.

For example here's Task 26: https://share.cleanshot.com/GPrfsX5H and here's Task 27: https://share.cleanshot.com/dYwY9QWH

Can anyone help me and is there a way to search the entire result for dates that have already passed?

Thanks a lot!
 

megabunch

Member
Hi @ArshilAhmad thanks so much for taking a look at this!

I've added the final step to update the tasks as requested - will this process all of them in the array using iterator?

Also I'm not quite sure the filter logic is set up as we intended as it is using different fields: https://share.cleanshot.com/rHntC674

To confirm, we want to only update tasks where the custom field "schedule date" is in the past (compared with today's date).

I think it's schedule date "value" that we need to use instead of date created: https://share.cleanshot.com/J6d91tfL and that's the one that needs to be compared with today's date.

Here is an example task: https://share.cleanshot.com/83DWrSVC

To confirm what we want to do is:

1. Get all tasks from Clickup for a certain list using API with status "scheduled"
2. Review "schedule date" custom field for every task returned and see if it's in the past (i.e. schedule date is greater than today's date)
3. If that's true - update each task status to "complete" via task id.

Thanks a lot for your fast response and help... let me know if you have any questions!
 

megabunch

Member
Hi @ArshilAhmad we can see the Schedule Date "value" field returned inside the API call in Step 3 inside the Tasks array.


We can also see it inside Step 4 in the Tasks iterator inside "custom fields" here: https://share.cleanshot.com/pgdsMdM6

However it doesn't show anywhere in Step 5 (the 2nd "custom fields" iterator you added: https://share.cleanshot.com/Yz6zkytY

This means we cannot select it as a filter inside Step 6.

Let me know if you need any more details.... thanks very much.
 
Top