Search code examples
javascriptn8nclickup-api

How to get a list of overdue tasks per person via the clickup API


1. Straightforward approach

If to check the dev tools in the Clickup app, there's a request

https://app.clickup.com/home/team/{team_id}/inbox

with payload

{userid: user_id, overdue_only: true, sort_by: "dueDate", sort_dir: -1, reminder_position: "top"}

That returns a list of overdue tasks+reminders IDs. It kinda answers my question, but it is undocumented, so I don't want really to wake up one day and see this endpoint is abandoned.

2. Using the documentation

The idea is to hardcode team id, get a list of all spaces per team, then a list of folders per space, then a list of lists per folders, then a list of folderless lists per space, then a list of tasks with filter on assignees per list of lists. Sounds like too much headache for a simple job.

Any better suggestions?


Solution

  • As recommended by the Clickup support team, the best option (as of current version) is to use filtered tasks:

    https://api.clickup.com/api/v2/team/%team_id%/task?assignees[]=%assignee_id%&due_date_lt=%unix_time_with_millisecinds%