Advanced Drupal Workflow for Alfred V2

drupal planet, drupal, os x

A more up to date version of this module is now the basis for the d.o Alfred modules 2.x release

I've been a longtime fan of Alfred App, an award-winning productivity application for Mac OS X.

They've just released Alfred v2 which is re-written from the ground up to be faster, more efficient and easier to use, as a powerpack user of V1 I've been beta testing it for several months now.

Alfred 2 has a new replacement for extensions called workflows and I have written a Drupal workflow that handles the Drupal API integration in a much faster way than the old Version 1 extension.

Along the way I found a bug in the api modules handling of function dumps which is now fixed and live on thanks to jhodgdon, verified that this workflow causes less requests to than the Alfred V1 extension, and generally had a lot of fun debugging things until it was working properly.

This workflow caches the Drupal api function list's locally and shows the variables that the function expects to receive as well, hitting enter opens the relevant page on


Drupal API lookup
d5 [substring_of-hook]  (cached for 90 days)
d6 [substring_of-hook]  (cached for 90 days)
d7 [substring_of-hook]  (cached for 30 days)
d8 [substring_of-hook]  (cached for 2 days)

dg [nid or group]

do [nid or project]

Search Drupal site network
ds [string to search]

Drupal user
du [user id or name]

Drush (drush as per Alfred v1 Drupal plugin)
dd d [command]  (a Drush alias with a Drush command command Action - Invokes Drush
dd o [command]  (a Drush alias Action - Opens the URI associated with the Drush alias in a browser)

A more up to date version of this module is now the basis for the d.o Alfred modules 2.x release

See it in action


Great workflow, thanks! Just bought the powerpack just for this. Please share any update/addition :-)

Submitted by Manu on March 15, 2013 - 8:34pm

Great! How do you customize the font in alfred?

Submitted by Zhang Xiao on March 15, 2013 - 9:31pm
Submitted by Brian Gilbert on March 16, 2013 - 7:46am

This seems an interesting application. Once downloaded its an extension less file. Is it an executable ? Do I have to mark it as such using terminal ?

Submitted by Gijs on March 16, 2013 - 12:43am

The extension should be '.alfredworkflow' You need the alfred powerpack to be able to use it.

Submitted by Brian Gilbert on March 16, 2013 - 7:46am

This is great. Thanks for sharing the workflow!

Submitted by kostajh on March 16, 2013 - 1:04am

This is likely going to be incorporated into the d.o project.

Submitted by dstol on March 16, 2013 - 3:24am

Hi, thanks for your Drupal Alfred workflow. It seems really useful.

But, when I try any of the Drupal version search API scripts, I get the message, "Please wait while I cache the API list."

The caching never finishes (or begins?) as I always get the same message. Is there a way to manually run the caching process or debug why I can't get past this step?



Submitted by Damon Haley on March 16, 2013 - 3:30am

Hi Damon.. Which api version were you querying at the time?

Submitted by Brian Gilbert on March 16, 2013 - 7:45am

Yeah, having the same problem d7 api

Submitted by Deshi on March 16, 2013 - 10:54pm

I bought alfred just because I read this article and I am afraid I get a timeout issue for any Drupal API search query, too. Anyone have a solution? Anything else works well - keep up the good work.

Alfred2 on Mac OSX 10.6.8

Submitted by Meric One on March 18, 2013 - 8:47am

I've been able to replicate this intermittently, I am looking into it further.

Submitted by Brian Gilbert on March 18, 2013 - 8:50am

Great! Thanks a lot!

Could you include a search for as well? That's what I'm currently missing out from my old Alfred 1 setup.

Submitted by Per Sandström on March 22, 2013 - 10:04pm

I modified this workflow by adding a "df" action which opens the url:{query}

Submitted by bleen on April 6, 2013 - 12:33pm

I just noticed that this very useful workflow has stopped to function properly.
Fortunately fixing it was easy. The requests simply needed to be updated to use https.

1. Remove faulty local caches via "rm ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.realityloop.alfred.advanceddrupal/*.array"
1. Open Alfred Preferences
2. Select "Advanced Drupal" in the Workflows tab and double-click the left bubble(s) with the druplicon for each workflow
3. replace the http with https in line 2:
$apiurl = '' . $apiversion;

Thanks again for this nifty workflow :)

the cause in case you want to confirm you are facing the same issue and not something else:

cat ~/Library/Application Support/Alfred 2/Workflow Data/com.realityloop.alfred.advanceddrupal/d7.array

a:10:{s:50:"<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">";s:0:"";s:12:"<html><head>";s:0:"";s:24:"<title>302 Found</title>";s:0:"";s:13:"</head><body>";s:0:"";s:14:"<h1>Found</h1>";s:0:"";s:92:"<p>The document has moved <a href="">here</a>.</p>";s:0:"";s:4:"<... (CentOS) Server at Port 80</address>";s:0:"";s:14:"</body></html>";s:0:"";s:0:"";s:0:"";}

Submitted by cjoy on June 10, 2013 - 8:04am

I highly suggest you start using the Drupal workflow that I am now a co-maintainer of at this change along with a bunch of other new features are is already in place there. There is als a note at the start of this post about it.

Submitted by Brian Gilbert on June 18, 2013 - 2:30pm

Add new comment