Mirroring Todoist tasks in Obsidian with Tasks-style formatting

I know a lot of folks on here are working between Todoist and Obsidian, so I wanted to share a script I wrote that allows you to use Todoist as your primary task management system while retaining some of the formatting and querying possibilities of the Obsidian Tasks plugin.

This whole thing developed because I love how flexible, powerful, and relatively lightweight Obsidian Tasks is, but I just can’t shake the cross-platform ease of Todoist. And I really dislike how the Todoist Sync plugin is styled.

So this script essentially mirrors your todos in an Obsidian Tasks-formatted document, which allows you to use Tasks filters in things like your daily notes. It converts Todoist projects to tags and creates deep links to each Todoist task. It also will complete tasks on Todoist if you check them off in Obsidian, but it will NOT create new tasks from the Obsidian vault (yet?). I have this set to run every two minutes on my Mac, and so far it has been working like a charm. But I haven’t tested it anywhere else.

You need to change the path to your vault and add your API key on lines 8 and 9. I’m extremely self-taught, but happy to answer any questions or take constructive feedback.