Following the release of Workflow 1.7 earlier this month, the Workflow team is debuting a set of tweaks and additions this week that further simplify the creation and management of workflows for both beginners and advanced users.
Run Workflow
Workflow 1.7.1 adds the ability to run a workflow inside another workflow that is currently executing. With this feature, you’ll be able to reference an entire workflow as a block of actions that lives outside the current workflow. To embed a workflow inside another one, there’s a new ‘Run Workflow’ action that lets you pick one of your existing workflows displayed in alphabetical order.
It’s important to note that what the Workflow team has built isn’t support for action presets and templates (something I’ve long been advocating for), but a way to treat an entire workflow as a single action that takes an input and generates an output. Instead of duplicating frequently used action routines across multiple workflows, you can now embed a workflow and use it as a function that only occupies one slot.
Imagine, for instance, workflows that filter and resize images, or that deal with parsing data returned from a web API; now, instead of recreating their functionality from scratch in other workflows, you can reference them, run them, and get the output they produce without leaving the workflow you’re currently executing.
Because an entire workflow becomes an action embedded somewhere else, Magic Variables generated in the external workflow won’t be available in the workflow you’re running. The ‘Run Workflow’ action is to be intended as a way to pass data to (or fetch it from) another workflow without having to recreate all of its actions every time. This can be especially useful if you have multiple variations of the same workflow, or if you often use function-type workflows with a specific purpose.
In the ‘Run Workflow’ action, you’re given the option to show the referenced workflow while it’s running or stay in the current workflow; if you choose the latter, the action will display a green progress bar while the referenced workflow executes. Personally, I prefer this method as there’s no jumping between different UIs; every menu, dialog, or other interaction from the external workflow is displayed when using the ‘Run Workflow’ action.
In my case, I’ve been able to reduce the number of workflows I display in the app’s action extension – as well as the actions required in my advanced workflows – by creating “launcher workflows” and conditional blocks that either ask me or understand which external workflow needs to be run.
To give you some concrete examples: with the ‘Run Workflow’ action, I’ve combined my workflows to stitch screenshots together and upload images to our CDN into a single workflow with a menu. After stitching multiple screenshots together in a single image, the Workflow extension now asks me if I want to save the resulting image to the library or if I want to upload it directly without saving it locally.
If I choose to upload it, a ‘Run Workflow’ action activates the standalone Upload Image workflow, passing the image variable as input. And because the referenced workflow is based on receiving input from the extension anyway, I didn’t have to update anything to make it work with this new system.
Same for my Trello workflows: instead of keeping three separate workflows with similar functionality in the extension, I created a launcher workflow as a starting point with a menu that asks me to pick which sub-workflows to run. Each workflow starts with the same input, and the output is displayed in the extension once it’s run.
By applying this method to dozens of workflows in my library, I’m further reducing the steps required to execute advanced automations. The new ‘Run Workflow’ action is the perfect complement to Magic Variables: they both make workflows more readable, easier to maintain, and more portable.
Richer Lists
In my coverage of Workflow 1.7, I asked for the ability to generate collections of items of different types:
Finally, with an easier way to convert variables between types as well as fetch details of a variable, it’s become clear that Workflow needs a ‘Generate Collection’ action to combine multiple variables together and pass them to another action.
Think about it: if you want to combine a string of text and an image in a single variable, how would you do that? You’d have to iterate over multiple bits of content and use the ‘Add to Variable’ action, which is still the only way to create collections of items with different types. A ‘Generate Collection’ action with an empty field would make it possible to bundle multiple Magic Variables together, enabling shorter workflows that, for example, send an email message containing text and images or tweets with messages and video attachments.
With this week’s update, in addition to supporting Magic Variables everywhere, Workflow can also generate a collection of Magic Variables with the ‘List’ action.
In Workflow 1.7.1, you can create lists that combine multiple data types in a single collection, which you can then present visually with a ‘Choose from List’ action or reference programmatically in other actions. The latter is a particularly intriguing concept, as you can now create macro variables where each Magic Variable has a unique index that can be individually extracted.
Once again, another way to save on steps and make actions more deeply integrated with each other.
New Glyphs
This isn’t a functional change per se, but it’ll be immensely appreciated by users who keep lots of workflows in the app.1 Workflow 1.7.1 comes with over 120 new glyphs (plus a redesign of existing ones) to be used as custom icons for your workflows.
After three years of the same set, glyphs in the old Workflow were starting to feel dated and limited. The new set highly increases visual differentiation between workflows, and I’m having fun updating all my existing workflows with new icons. I hope more color options are next.
The Workflow team has started 2017 with a series of major updates aimed at speeding up the creation of workflows and make them easier to assemble and share. Magic Variables and the ability to reference workflows as individual actions are fundamental shifts in the app’s visual programming model that dramatically improve upon the app’s solid foundation.
Looking ahead at Workflow’s future, folders seem like an obvious next step for superior organization, and I also would like to see more filters for the action extension. As always, however, I can’t wait to be surprised again by the Workflow team and see how their vision will reshape and improve iOS automation.
Workflow 1.7.1 is available on the App Store.
- I currently have 75, without counting those I put together every week for Club MacStories members. ↩︎