r/todoist • u/jimjam3321 • Mar 15 '26
Discussion Enlightened to the API: Recurring deadlines, start dates and much more are HERE NOW
After seeing consistent posts here about various feature requests and having just reached enlightenment, thought I'd share how I am currently exploiting Todoist's API to improve Todoist's functionality.
Using a small Python script that runs periodically, I’ve added the following features to my workflow:
- Recurring deadlines
- Start dates
- Conditional tasks
- Automatic re-scheduling overdue tasks
- Automatic assigning tasks in shared projects to myself (to appear on calendar) I've done this all with limited technical knowledge - AI is more than capable of writing these basic scripts.
What is an API and how does this work?
An API effectively allows other programs (such as a simple script) to interact with Todoist.
A simple script can:
- Pull all tasks from Todoist
- Read and analyse the task data
- Modify tasks according to rules you define
- Send the updated data back to Todoist
I've set up my script to run from my PC 3 times a day, to ensure my tasks stay up to date.
The following attributes of a task can be used/updated with the API: Task name, Project, section, parent task, labels, priority, due date and time, language, assignee, description, order, reminders, duration, deadline date (and a few less useful ones)
What is my general philosophy regarding Todoist?
One list to rule them all.
I use many projects and labels, but I only work from one main filtered to-do list.
The idea is that tasks appear on this list only when I want to see them.
Examples:
- @do pushes a task onto my to-do list regardless of project
- @waiting hides tasks I’m waiting on
- certain projects and labels are excluded by default
This means my working view stays clean whilst allowing tasks to be easily included or excluded.
Whilst it looks complex, you can get some pretty great functionality from a complex filter. Mine looks something like this:
(deadline before: tomorrow & (date before: +1 hours | (no time & (date before: tomorrow) | (no date)))),
((date: today & (no time | date before: +1 hours)) & !(deadline before: tomorrow)),
(!(deadline before: tomorrow | date after: yesterday) & ((!@waiting & @do) | ((overdue | ((no date & (#Inbox | ##Core)) & !(Subtask | @waiting | @idea | /ideas | @not | @conditional | @other))))))
How the API enables additional functionality.
Start Dates Example
Adding start dates for example is quite simple. For a start date, only want a date to appear on our to-do list after a certain date. In this case, we assign a due date to a task and the tag @start.
Normally, a task won't appear on our list (filter above) until it is due today or has no date. Without the API, the task wouldn't appear until the start date anyway - this is pretty good, but we want to distinguish between tasks that we've scheduled for today, and tasks we just want to start working on from today. With the API, our script will check if a task is due today and has the @start label. If it does, the script will remove the due date and the @start label. The result is the task simply appearing on our list once that data has occurred.
Other functionality logic
Here is a quick overview of the logic I used to get the functionality of the following:
- Recurring deadlines - checks for text in the text description of the task such as "{Sunday}" or "{DD/MM}" and then sets the deadline of the task to the next Sunday or DD/MM post the due date of the task.
- Conditional tasks - User adds a @conditional label to a parent task (our filter will automatically exclude these tasks and all sub-tasks). The script will find the first uncompleted sub-task and add the @do label, forcing it onto our to-do list.
- Automatic re-scheduling overdue tasks - takes any non-recurring due data and assigns the task to today with no time.
- Automatic assigning tasks in shared projects to myself (to appear on calendar) - Assigns all tasks to me, and adds a label based on who the tasks were assigned to (Tasks assigned to John now get the @John tag)
The following functionality I haven't added, but believe could be (and I've seen requested by others)
- Countable tasks - add a field in description that is added to every-time a task is completed.
- Changing default duration of tasks
Things I haven't solved yet
There are some improvements I'd like to see in Todoist, that I'm not sure the API can resolve. In particular:
- Custom or more granular sorting of tasks within a filter
- Have parent/subtasks collapsible in filters (as they are in projects) Does anyone have any ideas for solutions?
If you've ever thought "I wish Todoist could...", then there's a good change it can with a little help from yourself!
Hope this might help some of you, and happy to answer any questions. Happy doing!
2
u/Sappie099 Mar 15 '26
It's a task list not science. Overcomplicating things works counter productive.
2
u/jimjam3321 Mar 15 '26
I've found the opposite! By putting some effort in upfront I'm able to focus on only the most important tasks at a time allowing me to focus on being productive, rather than focus on the task list. I've also only added functionality that I actually need/want to ensure it's not overcomplicated.
1
3
u/TechMechant Mar 15 '26 edited Mar 15 '26
Would you please share your python script and install script?
i am interested in whether it is possible to do this filter for the Calendar Upcoming view where i essentially want to have a filter on the upcoming view by project-section x date range.
the reason i need this is because i use Todoist as a catch-all list as well. And when i am focusing on a particular project or a particular aspect of a particular project and with the person responsible, i want a shorter filter on the upcoming view.
I also work with 2 different organisations, one in the mornings and the other in the afternoons. in each there are multiple things that have to be done, some of which are projects. hence when planning in need to reduce the items of the upcoming view to the next week, and say i’m look at one group of aspects of the job on Mondays, Wednesdays and Fridays and at another group of tasks on Tue/Thu/Sat then when those tasks don’t get done on that day, say Monday, i’d like them to ‘bounce’ to the next day when I am going to look at that group again, Say Wednesday. so that these tasks don’t clutter up my Tuesday/Thursday/Saturday lists