My First Alfred Workflow / by Joseph Palumbo

Let me start by saying to use is to love

I’ve used Alfred as a replacement for MacOS’ Spotlight for several years now and I consider myself a power user, but I’ve yet to dig into one of Alfred’s more power and versatile features - workflows.

Until now.

The problem I wanted to solve

I have my MacBook Pro setup to save screenshots to Dropbox, which then puts a shareable link to that screenshot into my clipboard. The problem is that in order to embed these screenshots into a web page (i.e. a Github README doc) you need to change the last part of the URL from ?dl=0 to ?raw=1.

Not a horrible task, but repetitive.

The Solution

Alfred’s workflow has a function that will find a piece of text and replace it with something else.

Screenshot 2019-02-21 11.28.43.jpg

So the entire workflow is setup like this:

⌃⌥⌘F triggers the workflow which takes the contents of my clipboard and runs it through a a utility that searches for the string “?dl=0” and replaces it with “?raw=1” and then returns that to my clipboard.

Screenshot 2019-02-21 11.36.05.jpg

Very simple, but very effective, and should save me quite a bit of time.