Google Drive Search

An Alfred Workflow


Short Description

Search Google Drive files via the Google Drive File Stream app.

Last Updated

22 Dec 2020

Compatibility

Yosemite
(10.10)
Mavericks
(10.9)
Mountain Lion
(10.8)
Lion
(10.7)
Snow Leopard
(10.6)
Yes Yes Yes Yes Yes
 

Version

1.0.0
 

Bundle ID

com.bongiornot.googledrivesearch
 

SETUP 1. Install and set up Google Drive File Stream (https://support.google.com/a/answer/7491144).

2. Set the trigger keyword as desired. If using the default keyword ('), disable Alfred's Quick File Search mode, which also uses the ' keyword (Alfred Preferences -> Features -> File Search).

3. Trigger using the keyword, then hold control and press return to initialize. Indexing must complete before searching will work.

4. (Optional) If desired, set certain files (such as Office documents) to open in Google Drive rather than in the default application. Right-click a file of the desired extension in Finder and select "Get Info". Under "Open With", select openInGoogleDrive.app (located in this workflow's folder) and click "Change all".

USAGE Trigger the workflow via the keyword (default=').

Note: The Spotlight search (default) is fast but unreliable and will also take time to be indexed at first use. If the Spotlight search is not returning results as expected, trigger the workflow via the keyword, hold option, and press return to search via the manual index (which is slow but reliable).

ADVANCED SETUP (Only if using custom mount point) The workflow assumes Google Drive is mounted in the default location (/Volumes/GoogleDrive). For other locations, make sure the GoogleDriveDir environmental variable matches the mount point ("Default mount point" in Google File Stream's preferences panel).

IMPROVEMENTS

  • Improve stability of Spotlight indexing/search for volume mounted by Google Drive File Stream
  • Faster method for opening files in browser (rather than automated right-clicking in Finder)
  • Fix file icons via openInGoogleDrive.app plist. Intented usage: If setting Office files to open with openInGoogleDrive.app, restart your computer to update the icons (Google Docs icon for .DOC and .DOCX, Google Sheets icon for .XLS and .XLSX, Google Slides icon for .PPT and .PPTX).