Auto Things Shortcut

22 June, 2019 08:30PM ยท 4 minute read

I actually automate a bunch of things in my many workflows, but mostly they’re so specific I tend to think most people wouldn’t be interested. This is an exception.

Workflow don’t call it Workflow now it’s Shortcuts is something I’ve at best dabbled with in the past few years. I’ve found in the past few months as I’ve added multiple steps to post-production of my podcasts, that I was occasionally forgetting a few steps from time to time. I started looking for apps that created convenient templated checklists and came up with no really viable out of the box options that appealed.

I’ve been using Things to plan my life and tasks for many years now and having that on all of my devices (iPhone, Apple Watch, iPad and Macbook Pro) is extremely handy to have so rather than change that, I started digging into automating input into Things. I’d read that Things supported a URL Scheme so dove in.

First I built a test JSON Text string that was static, to prove that it would work:

{"type":"to-do","attributes":{"title":"Episode","when":"today","tags":["Podcasting"],"checklist-items":[{"type":"checklist-item","attributes":{"title":"Publish Notes"}},{"type":"checklist-item","attributes":{"title":"Publish Ad-Free"}},{"type":"checklist-item","attributes":{"title":"Test Item 1"}},{"type":"checklist-item","attributes":{"title":"Test Item 2"}},{"type":"checklist-item","attributes":{"title":"Test Item 3"}},{"type":"checklist-item","attributes":{"title":"Test Item 4"}},{"type":"checklist-item","attributes":{"title": "Test Item 5"}}]}}

The shortcut was really simple: The above JSON in a Text field, wrapped with “things:///json?data=[ JSON ]”, feeding into a URL object, then feeding into Open X-Callback URL, no custom callback or success URL and it worked perfectly.

A few experiments and the order of the keys in the JSON weren’t important, so long as the levels conformed with the URL Scheme it worked like a charm.

Creating a more sophisticated Shortcut was a bit more annoying. I’ve attached the Shortcut image and file but to walk through each section and why:

And we’re done. Yes I could tidy up some bits and yes you can use Magic Variables and yes I could embed Variables directly rather than Get Variable every now and then, but never mind that. The code is hopefully more readable than most other examples I came across, tried to follow, then just created it from the ground up to make sense.

Finished To-Do List

Hopefully that’s useful for some one (other than just me) at some point in the future that wants to make checklists from a standard template as a repeatable task in Things.