The time Siri shortcuts saved my bacon

So for the past year I've been playing around with Siri shortcuts on iOS. I've keep getting impressed with the level of complexity they offer and I've used them to build some very helpful workflows1. But recently, shortcuts got me out of a world of pain at work.

My team is responsible for updating a graphic a couple of times a day with the latest info. We got into a comfortable workflow where our team's mac mini (which is located behind the company firewall) runs a cronjob to curl a file and write the data to Google Sheets. Straightforward stuff.

But on that fateful day I checked Google Sheets at update time and didn't see new data. No biggie, I figured something was wrong with the cronjob. So I tried to ssh into our server, which is physically located in our office.

No dice. In fact, suddenly my work macbook can't access the VPN either. Deadline's coming up and I don't have any way to keep these numbers updated.

Except I do, because my company iPhone can access the VPN!

So I got to work, writing a script in Pythonista that requests the file and saves it to json2. Then I created a shortcut that:

  1. Connects me to the VPN
  2. Runs the pythonista script
  3. Gets the file and moves it Dropbox

It worked flawlessly. From there my personal mac mini was able to get the numbers to Google Sheets.

Deadline saved. Everyone's happy.

So yeah, I'm seriously impressed by the power of shortcuts. I wish it could do more for automation3, but not bad at all considering a little iPhone did the job normally reserved for a Mac.


1 I've got one to help my wife resize and upload all of her photos to wordpress and one to help me figure out how crowded my local gym is after work.
2 Shoutout to Pythonista for having the requests module built in. I'm definitely going to see what more it can do.
3 It would be nice to have that workflow trigger every hour without having to manually tap a notification.