Workflows

Posted on Wed 21 June 2017 in Articles • 3 min read

This article is part of a series, iOS Workflows

I've been using the Workflow app on iOS for about six months. It's a fantastic little app for automating tedius tasks on the iPhone or iPad, akin to Apple's Automator for the Mac.

Though its future is a little sketchy following Apple's acquisition (and some workflows maybe redundant in iOS 11), I thought I'd briefly write about some of the workflows I use.

Workflow App

Current UV

The Australian sun tries its best to kill you for nine months of the year so I like to know the current UV levels in Melbourne before I — or my kids — venture outside. This workflow, queries an Australian Government weather service that provides real-time UV data via a RESTful web service. Unfortunately, the output is too messy for Workflow to directly digest so I send it to a Pythonista script for further processing. It then comes back to Workflow and I display the result in an iOS system notification.

Update Word Count

Every year I participate in Nanowrimo and am constantly updating my wordcount. I wanted a means to do this without having to visit the Nanowrimo website, login and manually post my word count. On a Mac, this isn't a huge ball ache, but if I'm writing on a iPad (at least the mini 2) it meant I had to switch to Safari. This workflow uses the official Nanowrimo word count API to post my new limit directly from my iPhone. Incidently, I also created a command line version using Python for when I am writing on the Mac.

Copy Base64 to Apple Note

For a variety of reasons, I often convert notes, snippets of code or links to Base64-encoded strings before sending them across the network (via email or web service). This workflow takes a Base64 string from the iOS clipboard, decodes it as plain text and dumps the contents in a new Apple Note.

A variation on this workflow allows me to deposit the decoded data to the file service of my choice (iCloud or Dropbox). I use this for Python code, where white space and character encodings matter to the Python interpreter. I've learnt the hard way not to copy Python code in an out of Apple Notes.

Enter weight

Directly editing and querying Apple's health database in iOS is a pain in the arse. This workflow allows me to enter my weight and displays a message that tells me if I've gained or lost weight when compared to the previous record.

Time@Location

My wife asked me to record how long it took me to get from one train station to another on my daily commute. I created a workflow that records the current time at my location and writes it to a Note. Do this at the start and end point of the journey and I get a convenient means to compare the times.

Newsletter

This is my latest workflow and I'm still testing it but so far so good. This workflow automates the creation of my weekly newsletter. It reads my RSS feed and extracts all new entries within a one-week window. It then formats the text as HTML and dumps it into the body. It also reads a text file containing the list of recipients and adds these to the BCC field.

Before doing this, I created an Automator action on my Mac that uses Python and MultiMarkdown. However, I had to resort to a few unsightly AppleScript hacks to get the email working because the Email automator actions doesn't allow you to use a variable in the email's body.

In Workflow however, I managed to do everything I want and so I'll use this from now on instead of the Mac-based workflow.

More workflows

I feel like I'm only scratching the surface of what's possible with Workflow. Being able to automate a complex task on iOS is great, not least because I always have iOS devices with me and one of them (my iPhone) having 24/7 internet access. This makes iOS and Workflow, ideally suited for triaging and managing information.

As I develop more workflows, I'll post them. I'm especially interested in developing workflows for writing and couple Workflow to my own back end web services.

Share on: Diaspora*TwitterFacebookGoogle+Email