how to make Alfred Workflows (& the ones I use)

tl;dr: create automations and workflows in Alfred

cost: $0 after one-time $31 cost

build time: 2 minutes (download existing) / 20-60 minutes (build your own)

you may remember me raving about Alfred in my SaaS stack article. (If not, it's a cool software that has a bunch of neat features like shortcuts, improved Finder, auto-snippets, and a Workflow builder)

Today I'll be sharing a few things that I love most about the Alfred ecosystem:

  1. finding existing Alfred workflows
  2. choice workflows that I use
  3. building your own Alfred workflows (no code!)
  4. building your own Alfred workflows (yes code 😈)

At its core, Alfred workflows are a way to quickly and easily automate common tasks, both on your computer and in the cloud. Here's a (complicated) implementation of one:

#1 - find workflows

Alfred itself has a somewhat laissez faire approach to community workflows. It has a forum, but it is rather word dense and utility light¹.

There are a few external collections of workflows worth checking out. Packal is the main one - start there, particularly if you know what to search for. Its discovery is rather weak, but the search is intuitive.

Another (more technical option) is Github. If you are particularly concerned with the security of your device, it's better to start on Github, as not every Packal workflow links to the source code GH repo.

(there's even an Alfred Workflow on Packal to search Packal for Alfred Workflows)

#2 - my workflows

here's the full list:

#2.1 - let's look at a couple of the most interesting ones

Trello for Alfred - with a simple OPTION+T, it will copy the text you've selected, and create a card on a Trello board you select.

Email Followup - quickly starts a new email draft in your browser to the recipient of your choosing. How it works is explained below!

#3 - make your own workflows (no code)

#3.1 - email followups

let's take the above workflow as an example. We want to trigger the workflow when we type something into the Alfred bar, pass the email address to the workflow, and have it open a new tab that creates a email draft.

for the output, we use the out-of-the-box Open URL capability. Gmail helpfully provides us with a URL that will create a new email draft. We can pass the email address value with the merge tag {query}{query}

#3.2 - trigger any Zapier Zaps

Imagine you have some data you want to add quickly at the bottom of a Google Sheet, but you don't want to have to go to Google Drive, search for it, wait for it to load, and all that.

Through the Zapier for Alfred template, you can make a trigger that feeds a small bit of data into a webhook which Zapier will trigger from. I've provided an example below, where I'm gathering press mentions and associated metadata.

In the description subtext, we specify that four parts of data are passed: Company, URL, Date, and On Site. An example of invoking this Workflow would be:

press Acceleprise ` ` 6/9/20 ` Yes

on the Zapier side, you'll have a Zap triggered by webhook, a stage that executes some Python (included below) to unpack the data, and a write to Google Sheets.

Here's the code for Stage 2:

OutputKeys = ["Company", "URL", "Date", "On Site"]
Output = dict()

for n, val in enumerate(input['query'].split('`', input['query'].count("`"))):
    Output[OutputKeys[n]] = val.strip()

return Output

Once you've set this workflow up, you can use it to easily add data without having to context switch. If you're particularly familiar with Google Sheets, you can add formulas that VLOOKUP the added rows to add even more context to the data.

This workflow is equally helpful for content marketers finding possible backlinks, performance marketers, logging their targeting changes, CX folks tracking instances of a particular cancellation, and more.

And that's all there is to it! Alfred Workflows can support highly specific use cases, particularly if you're willing to modify Workflow templates created by others. An example might be a hotkey that posts a standup in a given Slack channel, using the text currently copied on your clipboard. There are even more ideas and supported services here

#4 - make your own workflows (yes code)

Made it this far? Nice.

You've probably run cronjobs before. you've definitely run goofy one-off scripts.

Now you can quickly add or extend functionality in a whole new way that becomes quick and easy quickly.

Let's say you want to make a quick API call much, much quicker.

You could use the Open Url functionality or the Terminal functionality (with curl) to make a very simple request. Because I wanted to process the output (and only print part of the response), I wrote a quick Python script to do it. The Alfred workflow then becomes a very simple handoff of Keyword {query} to cd to python The query gets passed to the .py file via sys.argv

¹ The forum is pretty helpful for building and troubleshooting your own workflows, though.

Thanks for reading. Questions or comments? 👉🏻