Siri Shortcuts Tutorial for Non-programmers (Part 2)
Hi, everyone! This is Lara Hammock from the Marble Jar channel and in today's video I'll tell you all about my new obsession -- automating iPhone and iPad activities with the Workflow app. This is the second part of a 3 part tutorial.
In the last video, we went over the basics of the Workflow app and automation. We talked about the screen setup, what a workflow is and the three different types of actions: get, transform, and share. In this video, we'll dive a bit more into the nitty gritty areas of inputs, variables, debugging, adding workflow items to your home screen, and automation for the Apple Watch. Here we go:
Inputs
As we talked about in the last video, each action is kind of like a tiny machine -- taking in an input, doing something to it, and then producing an output. An input can be almost anything. It can be the current date, stuff that is copied to the clipboard like a URL, or a paragraph of text. It could be the output from the previous action -- like a PDF file or edited photo. Or it could be a piece of information that is asked for when the workflow is executed. For example, in this workflow to add a new calendar event, you can see that there is only one action -- the Add Calendar Event action. There is input into this action, but you can see in each of these fields, it is set to "Ask When Run." So, let's go ahead and run it: you can see it is prompting me to fill in the info for event title, start and end date -- so this action is getting it's input from "Ask When Run." Which brings us to
Variables
Variables are pieces of information that you want to use later in the workflow. Sometimes, when you are gathering lots of pieces of information, you can't always pass them directly to the next action as input. In this case, you need to set variables, which prompts the Workflow to store those pieces of data for later use. Then you can call on them later. Let me give you an example. This Workflow is called Estimate Travel Time. It pulls a list of today's events from my calendar that have a location listed, then asks me to choose from this list of events. Once I've chosen the event, it pulls the location. Now -- I can send this info directly to the next action without setting it as a variable, HOWEVER, I'm going to need the piece of data again in another part of the workflow, so I set it as a variable, and I name this variable "Location." I'll use this variable name later to pull it back into the workflow. Setting a variable essentially sets aside this data to be called in later -- kinda like putting it in a word bank. Okay -- let's just continue to walk through this example. The next action uses the location to Get Travel Time from my current location. And then the workflow shares this information with me in the form of an Alert. You can see that it is using the input from the last action in this alert. "It will take you to get there right now." I didn't have to set that as a variable since it is coming directly from the action prior to it. But look the next action is going to need the location of the event again, however, it isn't coming from the action prior. SO -- I needed to Get Variable from the variable bank -- Location and then pass it to the next action, Show Directions (using Google Maps) to that address. So, let me run this workflow for you to give you an idea of how it works (pause). Do you see why I needed to set a variable in this workflow?
So, for variables, the two important functions are Set Variable, which puts that data in the variable bank and Get Variable, which brings it from the variable bank and adds it back into the workflow as an input. You can also just call up these variables within actions. Actions are like little machines, right? Taking input, processing, and producing output. But many times you can add your own rules to the action to refine it. For example, in this workflow, I'm sending information about a half-way point via email. Earlier in the workflow, I've asked the user to choose a contact, extracted the email address from that contact's details, then set that email address as a variable. In the Send Email action, when I put my cursor in the From field, a bunch of variables come up to choose from. The ones in green are system variables. In other words, they are always available -- you can plug in today's date, use the input from the last action, use whatever is in the clipboard, or you can choose to "Ask When Run", which means prompt for an answer when the workflow is being executed. The variables in blue include the variable that I set "Email Address". So, I can choose that variable from here. The others in blue are part of
Magic Variables
Magic Variables almost do away with the need to set variables manually. Why? The workflow automatically takes the output of each action in the workflow and sets it as a variable. For example, the halfway point was produced by the Get Halfway Point action and the Details of Contacts is actually the email address that we extracted from the contact earlier. It mostly eliminates the need to manually set variables at all. Instead of setting the Email Address variable, I could just pick this magic variable Details of Contacts and achieve the same effect. If you are curious about which actions produced each variable, you just have to push this magic wand and it will show you how each variable was produced. This magic wand is also super helpful if you aren't clear about what input is being passed into your action. It will show you that too.
Debugging
Inevitably, you will run into issues when you are creating more complicated workflows. They will get stuck, or produce something you weren't expecting. Two actions that might help you debug your workflow are Quick Look and Show Alert. If you insert these actions into the workflow where things are going south, they could give you additional information about why the workflow isn't working properly. For example, this is a workflow that is working properly, but if I put the Quick Look action in here, I can see exactly what information is being passed from this action to the next.
Workflow Items to Home Screen
One really nice feature is the ability to add specific workflow icons to your home screen. That way you can execute frequently used workflows with one tap. For example, I have a workflow to email a note to myself that I have added to my homescreen. In order to do this, go into the gears icon while you are editing the workflow. Once you are in here, you can edit the title and change the Icon and its color. You can even choose a custom image or photo for the icon. Then, choose Add to Home Screen, choose the Share button, then Add to Home Screen and you have a new app icon.
Apple Watch
There are 4 different types of workflows that you can create. There is a normal one, a today widget, which is required to be a bit simpler and will appear in your Today screen, an Apple Watch workflow which you can run directly from your watch, and an Action Extension, which I understand to be incredibly useful, but I haven't made much use of yet. I'm particularly excited about the Apple Watch workflows. I grudgingly love my Apple Watch -- you can see my video on that -- but there are limits to its functionality. Using Workflow really extends the functionality of my watch. I may do a full video just on workflows for the Apple Watch, but right now I have 4 that I use frequently: call my husband, log my weight in the Health app, Append a note to my food log in Evernote, and dictate a note to email to myself.
And that's it! Let me know what you think. Comments are always appreciated and thanks for watching!
Comments
Post a Comment