Jump to content

Google Drive — List File Stream contents from Google Drive

Recommended Posts

@jgacitua I know what’s happening: I’m telling Finder to do the move, but it copies because it is a network drive.

I’m ambivalent as to the best solution. I can have the Universal Action copy the files then send the originals to the trash (better than outright removing in case something goes wrong with the copy, though it may lead to confusion) but that would only work one way because when using Alfred to move out of that directory, it would still copy.


The other option is to remove the option to move, to make the behaviour clear.

I have the code working, but need to have a think about what’s best / least surprising.

Link to comment

It seems after a recent Google Drive app update (or maybe even macOS) the path to my drives have changed to...




There is nothing at /Volumes/GoogleDrive/ anymore. Just thought it worth noting as I had to update my environment variable and rebuild the cache.

Link to comment
On 5/19/2022 at 11:51 AM, vitor said:


If you delete it, the Workflow will likely start working again.


But try just rebooting, first.


Please let me know the results, because even if it’s fixed by rebooting or removing, it’ll be a clue.


Removing the terminal customizations solved it. It was actually in zshenv, I forgot Catalina changed that by making zsh the default shell and zshenv is one of the start-up files.


The workflow was working fine with all these settings for quite a while, but whatever. I'm going to file this under "Be happy it's working and don't ask any questions." 

Link to comment
On 5/27/2022 at 6:08 PM, vitor said:

Are you sure you’re already on that version?Does Spotlight find the files? 


Yes, I'm on (Apple Silicon) - Monterey 12.3.1


Spotlight doesn't show the files either unfortunately.

I've also tried uninstalling, removing Application Support files and reinstalling, but still no dice.


Searching for the ~/Library/CloudStorage path you mention, it does not exist.

Edited by christianmagill
Link to comment


judging from the docs we'll have to wait until a pop-up comes (so it is still rolling out). But also looking at the bottom list, it seems that things are changing for worse.


Up until now there was hope that they'll just fix what they had (and it was an easy fix btw, someone on stack overflow troubleshooted spotlight issues and pinpointed the problem). Now, we are loosing the ability to search the whole drive. And I am not even sure that @vitor's plugin will help. Not familiar with FileProvider API, but the text reads as if metadata will not be available for all cloud files and it is managed by MacOS...



Link to comment
  • 4 weeks later...



I was using the workflow for two accounts simultaneously, and it was great. Suddenly, one of the accounts stopped responding. I understand I can use google_drive_path but I am not sure what that means - When I used this prompt in alfred, it doesn't work.


Can you please give me more information?

Link to comment
  • 2 weeks later...

This has happened twice till now:


I am using Alfred to access two different Google Drive accounts on the same computer. Suddenly, Alfred is only able to see and search one of them, and not the other (Both times it ignores the same account).


Any reason why this is happening, and what's a quick solution?

Link to comment
40 minutes ago, ftab said:

Any reason why this is happening


Probably due to the new behaviour in Google Drive. The solution is to no longer add both drive paths but instead add the folder which contains them. If you want to ignore some, add them to the ignores list (use the unique string in the name for matching). In the Alfred 5 version of the Workflow, that will be the supported method.


Edited by vitor
Link to comment

Updated to 2022.13.

  • Use Alfred 5 GUI user configuration.
  • Use Alfred 5 GUI Dialog box for diagnostics.
  • Ignore list is now new-line separated.
  • No longer allow multiple paths, to simplify path setting and more readily support Linked Shared Folders. If you have multiple Drives and want to ignore some, add the root to the Google Drive Path and the ones you wish to not see to the Ignore List.
  • Only try to auto-refresh if Alfred is open.
  • Hotkeys for gd and gdf.
  • Remove update conditional.

Link to comment
  • 3 weeks later...

Hello Everyone and specifically @vitor who appears to be the resident expert in this area!


Many thanks in advance for help here. I new here so apologies in advance if this is a dumb question.


I'm trying to use Alfred to search Google Drive for desktop. I followed the older instructions to setup the workflow which kinda works but it is spotty (not 100% sure I have it setup completely correctly).

Based on what I'm reading in this thread it sounds like there may have been some very recent developments which allow for Alfred to use default Spotlight to indexing again. But, to make this work ~/Library/CloudStorage needs to be added to Alfred's search scope. I understand how to add a file path to Alfred's search scope but where I'm stuck is this particular file path (~/Library/CloudStorage) does not seem to exist on my computer?


All help is greatly appreciated.

Link to comment

Thanks Vitor!


Really appreciate the response. After giving it a few days to settle in the workflow seems to be performing better so for now I'm going to give this a go. But, may come back with questions if I hit additional snags.


Thank you again. You're support and responsiveness is greatly appreciated!

Link to comment

Not sure why. it's saying the Volume does not exist. I have two accounts set up on this computer. Could this the problem?




### Workflow version

### Alfred version

### macOS version

### Architecture

### Preferences

### Full Disk Access

### Google drive path
Does NOT Exist: /Volumes/GoogleDrive

### Cache dir
Files NOT present

### Cache file
Does NOT exist

### Temporary cache
Does NOT exist

### Build progress
NOT running

### Launchd job
Loaded: -    0    com.alfredapp.googledrive


Edited by Trey S
Link to comment
What Local Drive file path should I tell Google Drive to mirror files in order to use command "in" , Please suggest.
I have researched and understand that Alfred Searching cannot cover file path of Google Drive for Desktop
Also I have already installed the Vitor's google drive workflow and currently use command GD, GDF
But I cannot use "in" command to search text in excel files located in Google Drive.
However, I tried Mirroring Clould file to be stored in local drive and hope that I can use "in" like using with file stored in my mac
Google drive shows option to mirror file into local drive as file path = /Users/name/My Drive
After done mirroring, I still cannot use "in" command , Am I missing anything here ?

CleanShot 2565-08-10 at 02.49.40@2x.png

Link to comment

@Alpha The Workflow creates its own cache and does not add the contents of files. That would make it potentially massive. You can’t use in with it, you have to use the Workflow’s own commands.


With mirroring it might be possible, it depends if Spotlight indexes the files then. It should, but the situation with Google Drive is weird enough that it might not. Either way, you’d have to select the option (it’s not in your screenshot) and wait for the indexing to happen.


Edited by vitor
Link to comment

Thanks for your reply @vitor 


Google drive shows option to mirror file into local drive as file path = /Users/name/My Drive
I still cannot work with "in" command (after lots of attemps & restarts), Suppose the Spotlight do not index the files,  Mind you suggest any other Local drive file path that will possibly work with "in" ? I will go ahead to change mirroring folder in GG drive settings.
Link to comment

If Spotlight indexes the mirrored files, the folder you have now is as good as can be. You can try forcing a Spotlight reindex (Alfred Preferences → Advanced → Rebuild macOS Metadata) but can’t say for sure if that’ll help. I will be slow to finish and Spotlight will consume a fair bit of resources, so make sure you’re plugged in to an outlet. While it’s finishing, you won’t be able to find any file (because all information will be removed then rebuilt).

Link to comment

I just followed your instruction @vitor , After wait for about 2 hour , the Reindex Windows is still opened, after testing, it still doesn't seem to work , Suppose the Spotlight do not index the files or Am I missing anything ?



Version 5 Mega supporter


My mac verision is ↓

macOS Monterey
Version 12.5

MacBook Pro (14-inch, 2021)
Chip Apple M1 Pro
Memory 16 GB
Startup Disk Macintosh HD





Edited by Alpha
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...