jgacitua Posted September 20, 2022 Share Posted September 20, 2022 Hi @vitor I'm not seeing results for all accounts. I have 3 google drives attached and only see results for the first of 3. Maybe I'm configuring it wrong? Help thanks! ### Workflow version 2022.20 ### Alfred version 5.0.2 ### macOS version 12.5.1 ### Architecture i386 ### Preferences Default ### Full Disk Access Granted ### Google drive path Does NOT Exist: /Volumes/GoogleDrive, /Volumes/GoogleDrive-106588684568380285670, /Volumes/GoogleDrive-111289155870008731233 ### Cache dir cache.db tmp.db ### Cache file 16777220 4458622432 -rw-r--r-- 1 jaime staff 0 471040 "Sep 20 12:48:24 2022" "Sep 20 12:46:56 2022" "Sep 20 12:46:56 2022" "Sep 20 12:46:36 2022" 4096 1024 0 /Users/jaime/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/cache.db ### Temporary cache 16777220 4458626248 -rw-r--r-- 1 jaime staff 0 18034688 "Sep 20 13:05:41 2022" "Sep 20 13:05:41 2022" "Sep 20 13:05:41 2022" "Sep 20 12:54:02 2022" 4096 36992 0 /Users/jaime/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db ### Build progress Running ### Launchd job Loaded: - 0 com.alfredapp.googledrive Installed Link to comment
vitor Posted September 20, 2022 Author Share Posted September 20, 2022 6 minutes ago, jgacitua said: ### Google drive path Does NOT Exist: /Volumes/GoogleDrive, /Volumes/GoogleDrive-106588684568380285670, /Volumes/GoogleDrive-111289155870008731233 Google has probably changed the location of your drives; they’ve been doing that. Correct them and run :gdrebuildcache. Update to the latest version first, as it has a relevant change. Link to comment
jgacitua Posted September 20, 2022 Share Posted September 20, 2022 3 hours ago, vitor said: Google has probably changed the location of your drives; they’ve been doing that. Correct them and run :gdrebuildcache. Update to the latest version first, as it has a relevant change. Thanks Vitor!! I upgraded and it seems to be working again! I have a further question, how can I include the contents behind the links or aliases in the search? I added the path of the first Alias following the instructions to find the path. /Volumes/GoogleDrive-106588684568380285670/.shortcut-targets-by-id/1CZFQUFtLhk0_vCq2urLS3FL6TsqV-N1y/Legalbot I also did the rebuild cache. But that folder still does not appear in the search results.... maybe something is wrong ### Workflow version 2022.20 ### Alfred version 5.0.2 ### macOS version 12.5.1 ### Architecture i386 ### Preferences Default ### Full Disk Access Granted ### Google drive path Does NOT Exist: /Volumes/GoogleDrive, /Volumes/GoogleDrive-106588684568380285670, /Volumes/GoogleDrive-111289155870008731233, /Volumes/GoogleDrive-106588684568380285670/.shortcut-targets-by-id/1CZFQUFtLhk0_vCq2urLS3FL6TsqV-N1y/Legalbot ### Cache dir cache.db ### Cache file 16777220 4458853166 -rw-r--r-- 1 jaime staff 0 50896896 "Sep 20 17:06:20 2022" "Sep 20 14:15:32 2022" "Sep 20 14:15:32 2022" "Sep 20 13:55:25 2022" 4096 100480 0 /Users/jaime/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/cache.db ### Temporary cache Does NOT exist ### Build progress NOT running ### Launchd job Loaded: - 0 com.alfredapp.googledrive Installed Link to comment
vitor Posted September 20, 2022 Author Share Posted September 20, 2022 Aliases and symlinks are not followed, because that could lead to loops or gigantic caches. Link to comment
Octo Posted September 21, 2022 Share Posted September 21, 2022 Hi guys, Just bought the Workflows pack hoping I could use Alfred to search my Google Drive - but alas, tis not working. I've double checked the drive path is correct - but still getting the error "Google Drive path does not exist" any help would be amazing!! thanks in advance! - - - - - ### Workflow version 2022.21 ### Alfred version 5.0.2 ### macOS version 12.5 ### Architecture arm64 ### Preferences Default ### Full Disk Access Granted ### Google drive path Does NOT Exist: /Volumes/Google Drive/ ### 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 Installed Link to comment
vitor Posted September 21, 2022 Author Share Posted September 21, 2022 Welcome @Octo, 3 hours ago, Octo said: I've double checked the drive path is correct Check again, because it does look incorrect. Assuming Google hasn’t yet changed you drive’s location, the path would be /Volumes/GoogleDrive. Note there is no space. Link to comment
Eirene Posted September 23, 2022 Share Posted September 23, 2022 (edited) First, THANK YOU for an awesome workflow. The latest Google Drive update (replacing some folders with shortcuts) has prevented Spotlight from indexing the 99% of my files that are inside a folder owned by another member of my Google Workspace org. This works! You've saved my workflow. Second, I'm confused about which filepath to use for my Google Drive folder. When I open my Drive folder in Finder and then "right-click + option" to save the pathname, I get the first pathname below. But then when I try to go "up" the filepath, and then save the pathname again, it shows up as something very different: /Users/calebdelon/My Drive (caleb@paperbackexpert.com)/ /Users/calebdelon/Library/CloudStorage/GoogleDrive-caleb@paperbackexpert.com/.shortcut-targets-by-id/0B34ddi827qW8TDYzVUN1OHZ3U2s/**Paperback Expert Loom video showing this: https://www.loom.com/share/455362135db8405bae4095a44df974f8 Yet another option: When I go to Google Drive preferences, it shows this as the Google Drive Streaming Location: /Users/calebdelon/Library/CloudStorage/GoogleDrive-caleb@paperbackexpert.com So should I put that info the customized variable for google_drive_path? Or maybe this version: /Users/calebdelon/Library/CloudStorage ??? I'm moderately tech-saavy, such that I can follow directions when it gets to this point, but I don't really understand what's going on. Thanks for any help! Edited September 23, 2022 by Eirene typo Link to comment
vitor Posted September 23, 2022 Author Share Posted September 23, 2022 Welcome @Eirene, 7 hours ago, Eirene said: /Users/calebdelon/Library/CloudStorage/GoogleDrive-caleb@paperbackexpert.com Try that one first. Link to comment
Emal Posted September 26, 2022 Share Posted September 26, 2022 Hi @vitor Many thanks for this workflow... that saves mine! I have a weird behavior I'd like your input on: If I open a folder that Alfred suggests: 1. the path shown in the search box now includes /.Encrypted/ or /.shortcut-targets-by-id/jibberish, instead of the "normal" names of files. Not that a big deal, but sometimes I like reading this to be sure I'm opening the right file. 2. both folders suggested are actually the same, but if I open the first one, it has none of the files in it, only folders that may exist. The second folder has well everything in it. That's my second screenshot, with the bottom window being the folder opened through Alfred, the top one opened manually by me through the Finder. Is that a cache thing maybe? ### Workflow version 2022.12 ### Alfred version 4.7 ### macOS version 12.5.1 ### Architecture i386 ### Workflow environment variables Dict { ignore_list = result_limit = 50 auto_refresh = 1 google_drive_path = /Volumes/GoogleDrive } ### Full Disk Access Granted ### Google drive paths Exists: /Volumes/GoogleDrive 98908 paths ### Cache dir cache.db ### Cache file 16777220 133863107 -rw-r--r-- 1 emal staff 0 22163456 "Sep 26 15:28:59 2022" "Sep 26 14:37:24 2022" "Sep 26 14:37:24 2022" "Sep 26 14:30:24 2022" 4096 45184 0 /Users/emal/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/cache.db ### Temporary cache Does NOT exist ### Build progress NOT running ### Launchd job Loaded: - 0 com.alfredapp.googledrive Installed Many thanks Link to comment
vitor Posted September 26, 2022 Author Share Posted September 26, 2022 23 minutes ago, Emal said: the path shown in the search box now includes /.Encrypted/ or /.shortcut-targets-by-id/jibberish, instead of the "normal" names of files. That’s how Google Drive does it now, those are the true paths of the files. 24 minutes ago, Emal said: both folders suggested are actually the same, but if I open the first one, it has none of the files in it, only folders that may exist. Add .Encrypted to the ignore list. Link to comment
vitor Posted October 12, 2022 Author Share Posted October 12, 2022 (edited) Updated to 2022.22. Use File Picker for choosing Google Drive folder. Because it is now an editable field, adding multiple comma-separated drive locations is still possible. Add Configurable Keywords. Edited October 12, 2022 by vitor Link to comment
mishamsk Posted October 14, 2022 Share Posted October 14, 2022 Thought I'll post an update here. Almost a year later, the File Provider API version (https://support.google.com/drive/answer/12178485?hl=en) rolled out to my machine. And I can confirm that standard Spotlight (and thus Alfred) search works again. I believe Vitor's plugin is still a viable and more feature-packed alternative, but now a built-in alternative exists. At least for those who got the update from Google. Link to comment
christoph282 Posted November 2, 2022 Share Posted November 2, 2022 On 10/14/2022 at 2:16 PM, mishamsk said: Thought I'll post an update here. Almost a year later, the File Provider API version (https://support.google.com/drive/answer/12178485?hl=en) rolled out to my machine. And I can confirm that standard Spotlight (and thus Alfred) search works again. I believe Vitor's plugin is still a viable and more feature-packed alternative, but now a built-in alternative exists. At least for those who got the update from Google. @mishamsk Do you find that this works fully? It is working for me but only partly. It doesn't seem to find some files and folders. I can't tell if there's any pattern to those it can find. Link to comment
mishamsk Posted November 4, 2022 Share Posted November 4, 2022 On 11/2/2022 at 6:58 AM, christoph282 said: @mishamsk Do you find that this works fully? It is working for me but only partly. It doesn't seem to find some files and folders. I can't tell if there's any pattern to those it can find. @christoph282 I didn't do any specific testing, but so far haven't noticed that something is missing, have been able to find what I am looking for every time Link to comment
vitor Posted November 4, 2022 Author Share Posted November 4, 2022 @christoph282 This might not make a difference but it’s quick and easy so worth trying it out: go into Alfred Preferences → Default Results → Reset… (on the table). Reset to Applications and Home or Full Disk. Does everything show up then? Link to comment
benwhiting Posted November 7, 2022 Share Posted November 7, 2022 @vitor Thanks so much for creating and maintaining this awesome workflow. My hotkey for this is now firmly engrained in my muscle memory, and I use it dozens of times a day. Everything was working swimmingly for me, but with the upgrade to macOS Ventura I am now seeing repeated notifications for a background script, which seems to be related to this workflow (see attached). This especially happens any time my computer sleeps—when I wake it back up, I have several background script notifications. Have you seen that with this workflow before? ### Workflow version 2022.12 ### Alfred version 4.7 ### macOS version 13.0 ### Architecture i386 ### Workflow environment variables Dict { auto_refresh = 1 google_drive_path = /Volumes/GoogleDrive/My Drive, /Volumes/GoogleDrive/Shared Drives/Voss Fixtures Team result_limit = 50 ignore_list = } ### Full Disk Access Granted ### Google drive paths Exists: /Volumes/GoogleDrive/My Drive 6032 paths Exists: /Volumes/GoogleDrive/Shared Drives/Voss Fixtures Team 48546 paths ### Cache dir cache.db ### Cache file 16777220 123536149 -rw-r--r-- 1 benwhiting staff 0 10063872 "Nov 7 10:59:03 2022" "Nov 7 10:49:17 2022" "Nov 7 10:49:17 2022" "Nov 7 10:45:05 2022" 4096 20488 0 /Users/benwhiting/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/cache.db ### Temporary cache Does NOT exist ### Build progress NOT running ### Launchd job Loaded: - 0 com.alfredapp.googledrive NOT installed Link to comment
vitor Posted November 9, 2022 Author Share Posted November 9, 2022 Welcome @benwhiting, It’s weird that you‘re seeing multiple notifications, that looks like a bug in macOS’ new system. This is the first report I’ve seen of such a thing. Have you tried rebooting? If you change the auto_refresh Workflow Environment Variable to 0 then run :gdrebuildcache, the auto-cache rebuilding will be removed so you shouldn’t get the notification either. However, that means having to manually run :gdrebuildcache every time you want to update the file list. Link to comment
benwhiting Posted November 9, 2022 Share Posted November 9, 2022 @vitor I've definitely rebooted multiple times, and the notification bug is persisting. When does the auto-cache normally run? When I run it manually, I've been getting an alert from our corporate malware software—it doesn't like something about that script and may be interfering with the process. Link to comment
vitor Posted November 9, 2022 Author Share Posted November 9, 2022 (edited) 1 hour ago, benwhiting said: When does the auto-cache normally run? On boot and at 8PM. If the Mac is asleep at 8PM, it will run when it wakes up. But if it’s turned off it wouldn’t run, which is why it also runs at boot. The sleep behaviour is not behaviour I have control over, it’s how launchd works. 1 hour ago, benwhiting said: When I run it manually You mean when you run :gdrebuildcache? 1 hour ago, benwhiting said: it doesn't like something about that script and may be interfering with the process. The code is open, you can see and audit everything in the workflow. Two things are done when rebuilding the cache: Depending on your auto_refresh value it’ll either add or remove the launchd job (for rebuilding the cache periodically). The contents of your Google Drive are listed and added to a SQLite database (path is listed in your diagnostic), for fast retrieval when you use gd. As explained above, it’s easy to disable the first part. In Alfred 5 it’s even simpler, as Workflow Configuration allows that to be a literal checkbox. As for the second part, that’s the point of the workflow. I did try solutions without building a cache, but a lot of people have an immense amount of files in Google Drive, such that any other method is incredibly slow. If you have software which is blocking that, you have to whitelist/fix it there. You may also try to force Google Drive to update to the File Provider version (unsure if that’s possible, Google is moving people gradually) and see if it works for you without the workflow. If it doesn‘t work at first, try resetting your scope to something else. No guarantees that’ll work, though, Google’s Spotlight integration is still flaky: works for some but not others. I’d be interested to know your results either way. Also, make sure you’re on Alfred 4.8 or version 5. Edited November 9, 2022 by vitor Link to comment
benwhiting Posted November 10, 2022 Share Posted November 10, 2022 @vitor Yes, :gdrebuildcache I changed the auto_refresh to 0 and rebooted my machine, but I still had 3 script notifications this morning. Link to comment
vitor Posted November 10, 2022 Author Share Posted November 10, 2022 Maybe your security software is preventing the removal of the file. Open the folder at ~/Library/LaunchAgents (~ represents your home folder) and delete what has googledrive in the name. Should be easy to find. Then reboot. Link to comment
benwhiting Posted November 10, 2022 Share Posted November 10, 2022 I actually don't see any googledrive files in that folder. Link to comment
vitor Posted November 10, 2022 Author Share Posted November 10, 2022 If you don’t see the file in the folder and you’ve already rebooted, the only explanation is that it is not the launch agent from this workflow causing the notification. You should at most have gotten one notification once; whatever is causing those three warnings is not this. Link to comment
benwhiting Posted November 10, 2022 Share Posted November 10, 2022 @vitor Okay, thanks for your help. I guess I'll start searching online forums to try to narrow down what might be causing these notifications. Once again, thanks so much for creating and maintaining this workaround while Google Drive gets their act together. Link to comment
vitor Posted November 10, 2022 Author Share Posted November 10, 2022 I have other workflows which use the same technique, in case you want to share the files you have in that folder. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now