Thursday, August 20, 2015

Including synced Google Drive files in Alfred searches

I use Google Drive quite a bit for personal documents and spreadsheets. I have enough there that I want a quicker process than what I had been doing, which was this:


  1. Go to Safari (if I'm not already in it)
  2. Open a new tab
  3. Go to drive.google.com
  4. Click on the search box, and type in part of the name of the doc I want
  5. Open it
I'm a big Alfred fan, so step one is to remember that I can just type in the domain name in Alfred to safe a few steps. So now I'm at:

  1. Cmd-space to open Alfred
  2. Type drive.google.com and hit enter
  3. Click on the search box, and type in part of the name of the doc I want
  4. Open it

Na, I'm lazier than that. What else can I do? I could use the Alfred web search to search my Drive. So that gets me to this:

  1. Cmd-space to open Alfred
  2. Type "drive the-thing-I-want-to-find" and hit enter
  3. Click on the result I want, assuming it's there
This one is a little annoying if I do a few searches to find what I want. Then I end up with multiple browser tabs to close. The fact that it's been in my Alfred config for who-knows-how-long and I never use it tells me it's not the solution for me.

Throughout this, I was wondering why I have these files from Google synced to my laptop, yet they aren't showing in Alfred searches. I checked the "Default Results" screen in my Alfred preferences to see if the Drive folder was being excluded. Nope.

"Documents" is checked, but apparently Alfred (or OS X) isn't treating those Google files as documents. The "Advanced" button always has good stuff behind it, so I clicked on that.

Blank. So, I dragged one type of each file into that window - files with extensions of .gsheet, .gdoc, and even .gmap (custom Google Maps I've saved over the years). If you have presentations or drawings, you'll want to drag those in too.



That was all it took. Now my Google docs are showing up in the normal Alfred results, just like any other file.
  1. Cmd-space to open Alfred
  2. Type "the-thing-I-want-to-find" until my desired doc is first (or near it).
  3. Worst case, I still have to scroll a few items, then hit enter.
So I'm down to 2, maybe 3 steps. In reality, it took me longer to write this post than to actually solve the problem, but I wanted to point out the variations that are possible (and trivial to set up and use) with Alfred. I love that product.

I highly recommend buying a license, not only for the additional features, but also because it's a cheap way to support the company. For about 2x as much, you can be a Mega Supporter, which gets you free lifetime upgrades. For me, that was well worth the cost.