Working Smarter with Alfred: Workflows

Alfred logo

Hello again, Alfred!

This is the second post in a series on Alfred, a productivity application for Mac OS X.

For an overview of Alfred, and to learn about using Custom Web Searches to work smarter and faster, read my first post in this series here.

In this post, I’m assuming you’re already familiar with Alfred and have purchased the Powerpack.

Understanding Workflows

An Alfred Workflow is basically a chain of things that you want to do on your Mac incredibly quickly.

The possibilities are honestly unlimited, so this makes it a bit complicated to actually explain what a Workflow is and how powerful they are. Instead, I’ll just show you a few of the Alfred Workflows I use to make my day-to-day tasks easier and more efficient.

These are just a few examples that barely scratch the surface, but it should be enough to help you grasp the general idea of Alfred Workflows and get excited about downloading or creating your own Workflows to make your job easier.

Don’t reinvent the wheel

There are many super smart Alfred users who have created many wonderful Workflows and shared them on the web. Websites like alfredworkflow.com and Packal have hundreds of available Workflows to download for free. You can also find lots of great resources on the Alfred Forum.

If you search around, you’ll likely find something that will shave off some time for things you frequently do on your Mac. I’ve downloaded a few of these, and the following list contains Workflows I use quite frequently.


Super fast GIF Workflow!

Pack’s team is distributed, so we rely on Campfire as a central place for communication. Sometimes text just isn’t the best avenue to convey emotion, so we (perhaps too frequently) harness the power of animated gifs.

pug wut

It’s a proven fact that the hilarity of a gif reply diminishes over time, so it’s absolutely essential to be quick with your response. Jonnie Hallman’s GIF Workflow can help.

This Workflow allows you to harvest your own GIFs and store them in a public folder on Dropbox. Just add keywords in the filename when you save a GIF, then search for them when you run the Workflow. Brilliant!


Don’t forget about emoji!

Carlos Galdino’s Alfred Emoji Workflow is the emoji equivalent of the GIF Workflow. Sometimes a reply just calls for something small, so Carlos has you covered.

emoji workflow

iMessage to a friend

Stefan Grund made a really handy iMessage Workflow to quickly send an iMessage right from Alfred. It’s not directly integrated to your Address Book, so you need to manually set up the Workflow for contacts that you message frequently.

imessage workflow

Like some other plugins, a little setup in the beginning saves lots of time down the road.


Phillips Hue Controller

Benjamin Knight wrote a Workflow to control Phillips Hue lights. I’ve written a couple posts about Philips Hue bulbs, and anyone who knows me knows I get really excited about these things.

hue workflow

With Ben’s Workflow, I’m able to control the lights in my house right inside Alfred.


Custom Alfred Workflows

Clearly, most of the Workflows that I’ve downloaded really don’t do too much to make my work more efficient. But that doesn’t mean all Workflows are just for fun and games.

Here are a few Workflows I’ve put together to help around the office.


Email the Pack Team

Alfred Workflow Setup

There are five us on the Pack team, so every time I wanted to send an email to everyone on the team, I’d cmd+tab to my mail program (Sparrow), cmd+n to open a new email. Then I’d start typing each team member’s name, followed by tab, until all four were in the To field. At best, that’s 14 keystrokes.

With Alfred, I’ve reduced it to 3.

I just invoke quicksilver, and begin typing emailpack.

Alfred Email Pack

Once Alfred detects what I’m typing, (it usually just takes the e) I just hit enter.

Immediately, a new message window is opened with everyone’s email address in the To field.

Alfred Email Pack

I can invoke this Workflow from anywhere on my Mac. In other words, I don’t need to be in Sparrow (or even have Sparrow open, for that matter).

This Workflow is a bit more complicated to set up, since it requires a little Applescript to make it happen.

Begin by creating a new blank Workflow, then set your keyword input. For your action, choose Run Script. Choose /usr/bin/osascript from the Language dropdown. Then, use this as a guide for creating your own email list:

tell application "Sparrow"
    activate
    set theMessage to make new outgoing message with properties {subject:"", content:""}
    tell theMessage
        make new to recipient at end of to recipients with properties {name:"Fred", address:"[email protected]"}
        make new to recipient at end of to recipients with properties {name:"Wilma", address:"[email protected]"}
        make new to recipient at end of to recipients with properties {name:"Barney", address:"[email protected]"}
        make new to recipient at end of to recipients with properties {name:"Betty", address:"[email protected]"}
         compose
    end tell
end tell

Yes, it takes a bit of time to get this set up initially, but all those saved keystrokes add up over time. Remember, this example is for Sparrow only, but it’d be easy to do something very similar for Mail.app.


Add an item to my Pep Rally inbox

At Pack, we use a task collaboration app we built at What Cheer called Pep Rally. Unfortunately Pep Rally isn’t available to the public, but it’s a tool that we rely on heavily.

One feature of Pep Rally I frequently use is the inbox. Adding an item to my inbox is a quick way to document a task quickly when I’m in the middle of completing another task.

Hobbs added a Python command line tool to interact with Pep Rally, so for this Workflow action I execute a BASH script to use it by selecting /bin/bash from the Language dropdown.

created=`/Applications/MAMP/htdocs/Pep-Rally/peprally_python/scripts/peprally inbox:create "{query}"`

if [[ $created == *TRUE* ]]
then
echo "{query}"
fi

Instead of opening Pep Rally and clicking on my inbox tab, I simply invoke Alfred, begin typing inbox, then hit tab and start typing what I need to remember.

Alfred Pep Rally Inbox

For this Workflow, I added a Post Notification output so Growl alerts me that my task was successfully added. To do this, I clicked the + symbol, then clicked OutputsPost Notification. With Alfred, you can output to Growl or Notification Center, and set a custom title and text for the notification. Using {query} in either of these fields will use the output from the previous action.

Alfred Growl

This one is a little vague, I know. But I chose to include it so you can see an example of extending Alfred to a CLI and to your own tools.


Go!

As I mentioned in my first post about Alfred Custom Web Searches, you should add helpful Workflows slowly. If you add too many new tools at once, you’ll never keep track of them all and all the potential efficiencies will be lost.

Soon these new tools will become second nature, and all the seconds you save in your day-to-day will definitely add up.

Do you have an Alfred Workflow you’d like me to check out? Let me know!