Export Things to Todoist

Todoist recently rolled out a new version featuring task duration and therefore time-blocking. 🤯
So I've been slaving over a crazy Shortcut to export my Things data to Todoist. 🤷 The pseudocode is basically:
Get API key
Make Lookup dictionary
For each Area in Things:
Create Todoist Project
Store Things ID -> Todoist Project ID in Lookup
For each Project in Area:
Create Todoist Project with Area ID as Parent
Store Things ID -> Todoist Project ID in Lookup
For each Header in Project:
Create Todoist Section with Project as Parent
Store Header Name -> Section ID in Lookup
For each To-Do:
If has a Header:
Create Todoist Task using the Lookup to find Header's Section ID
Set Task ID to returned Todoist Task ID
Else
If has a Parent:
Find Parent ID -> Todoist Project ID using Lookup
Create Todoist Task with Parent ID
Set Task ID to returned Todoist Task ID
Else
Create Todoist Task
Set Task ID to returned Todoist Task ID
If Things To-Do has Deadline:
Update Task ID with Deadline
If Things To-Do has When:
Create "Start: Task" sub-task with Parent -> Task ID
If Things To-Do has Checklist:
For each item in Checklist:
Create Sub-Task with Parent -> Task ID
As complex as that is... it's worse in the Shortcuts editor.
Programming in Shortcuts sometimes feels like parenting a toddler: you have to say the same things multiple times, and most of the time neither you nor the child can remember if you've already dealt with this issue. I swear Shortcuts destroys or forgets a nested variable at random.
And the scroll-jacking! If Shortcuts would stop yanking my screen around! But I digress:
If nothing else… some things I learned:
- Don't. Copy. Actions. With. Variables. 😤
- Use Reveal on nested variables to ensure it is pointed at the right objects.
The export currently:
- translates Areas, Projects, and Headers into nested Projects with Sections
- imports:
- Title and Content
Tags(For some reason, the Shortcut Export wipes this out every time!)- When (as a meta-start task)
- Deadline
- Checklists
It does not:
- save Project notes
- handle repetition schedules
- Reminders
- Evening
- import Logged projects or tasks
- handle Headers with the same string in different Projects. I just renamed mine.
It runs relatively quickly on my small-ish database of 200ish active tasks. It has to do a lot of little API calls to function, so it's possible you may run into Todoist's rate limit with a larger database.
Install
- Download the Shortcut here: Things ➡️ Todoist.zip
- Be on the Pro plan of Todoist.
- Get your API key for Todoist ready.
- Run the shortcut, pasting in the API when prompted.
- Reply "Always" when Shortcuts asks permission to use Things data.
- Profit.
…
Shortcuts are finicky… but if you run into any problems, drop me a line and I'll try to help.
Changelog
-
2023-09-25 20:43:59 -0500strike
-
2023-09-25 11:00:06 -0500Struggling with Shortcuts. Sorry y'all.
-
2023-09-25 09:27:12 -0500Update zip
-
2023-09-25 08:54:26 -0500Things -> Todoist