azai91 / alfred-drive-workflow Goto Github PK
View Code? Open in Web Editor NEWAlfred workflow to search google drive
License: MIT License
Alfred workflow to search google drive
License: MIT License
Once using the Alfred command "d" the python process permanently occupies 100% of a processor core. Only killing the python process helps. Seems there is an endless loop...?!
I am using macOS Sierra 10.12.4 Beta and Python 2.7.10 is in the path.
I really hope this isn't user error, as your workflow appears to be dead simple. The workflow is installed and first appears to be working as evidenced by the first screenshot:
But as soon as I begin typing a file name, this is what happens:
I'm on El Capitan. Is this just a compatibility issue with the new OS?
Hi there, I've been using this workflow and I absolutely love it. I realized it was taking almost 100% of my processor capacity and I had to turn it off to bring it back to normal. The process that was taking all the CPU power was Python.
It also elevated Alfred's energy impact to 151.95
I am not really a programer so I wouldn't be able to point out exactly what was happening. Is there any fix I should do?
thanks!
I use the 'recent' URL in drive, often. It'd be super helpful to show this list in the alfred-drive-workflow, say with a 'drecent' keyword.
Great work on this!
I have a lot of folders in my drive, but this doesn't seem to include folder titles, just the documents inside them. It would be great if the search included folder titles. (If you think some people would dislike this, then maybe add it as a configuration setting.)
Additionally, if folders were added, it'd be nice to put matching ones up at the top of results.
Thanks!
Disconnects after update in Alfred and I can't get it to reauthorize, even after I delete and reinstall.
Just wondering if it's possible to allow for the workflow to access multiple google drive accounts?
Ideally, Cmd-Enter should open the folder in Finder.
Is there a way to do this?
This would solve all my problems with Google Drive File Stream: I work 50% in the browser, but need also use PDF Reader and occasionally Word/PowerPoint or KeyNote.
Thank you for a great tool!
Fr
I'm not sure what Alfred calls the second line of each item, but here's what I mean by "description," using forecast as an example:
It'd be great if that line could include metadata such as:
I'm not sure how best to format those or if they'd all fit, but having some of that information displayed -- at the very least last-modified -- would be really helpful.
Thanks for this helpful workflow!
Hey there,
I've been using your amazing workflow for quite a while and now I wanted to reinstall it in another laptop. The login seems not working though.
I can see the login page with all my Google accounts but the process gets stuck tight after I click "Allow" Alfred to access my Drive. It keeps on saying "Waiting for 127.0.0.1"
When trying to login to drive via the "Drive > Login" action, it redirects to this domain:
http://localhost:1337/?code=[code]
I get a "page not available" warning, and the login process doesn't complete.
I created an environment variable, but it still open in Safari (the default browser) instead of Chrome. Am I missing any step?
Is there a way to limit the search scope? The new version is slower for me and I think it is because it is searching my entire Google drive which has several terabytes of data.
Here is what my log file looks like:
[2017-09-05 11:20:37.699] [27607] [DEBUG] Latest online version is v2.0, we are running 2.0
[2017-09-05 11:20:40.360] [27607] [DEBUG] Loaded 149335 items from cache (created 5 days ago)
[2017-09-05 11:20:42.605] [27607] [DEBUG] Execution took 4.908 seconds
[2017-09-05 11:20:42.640] [27615] [DEBUG] Start background cache update
[2017-09-05 11:20:42.694] [27615] [INFO] Access token expired 5 days ago
[2017-09-05 11:20:42.998] [27621] [DEBUG] ./google-drive.rb ["--filter", "test"]
[2017-09-05 11:20:43.001] [27621] [DEBUG] Loaded 12 releases from cache (created 5 days ago)
[2017-09-05 11:20:43.002] [27621] [DEBUG] Latest online version is v2.0, we are running 2.0
[2017-09-05 11:20:43.206] [27615] [INFO] Access token added to keychain, expires in 3600 seconds
[2017-09-05 11:20:45.217] [27621] [DEBUG] Loaded 149335 items from cache (created 5 days ago)
[2017-09-05 11:20:46.143] [27621] [DEBUG] Execution took 3.145 seconds
[2017-09-05 11:20:46.174] [27629] [DEBUG] Skip background cache update: Another process is already running
[2017-09-05 11:20:46.421] [27631] [DEBUG] ./google-drive.rb ["--filter", "test "]
[2017-09-05 11:20:46.424] [27631] [DEBUG] Loaded 12 releases from cache (created 5 days ago)
[2017-09-05 11:20:46.424] [27631] [DEBUG] Latest online version is v2.0, we are running 2.0
[2017-09-05 11:20:48.420] [27631] [DEBUG] Loaded 149335 items from cache (created 5 days ago)
[2017-09-05 11:20:49.386] [27631] [DEBUG] Execution took 2.965 seconds
[2017-09-05 11:20:49.416] [27637] [DEBUG] Skip background cache update: Another process is already running
[2017-09-05 11:20:49.647] [27639] [DEBUG] ./google-drive.rb ["--filter", "test "]
[2017-09-05 11:20:49.648] [27639] [DEBUG] Loaded 12 releases from cache (created 5 days ago)
[2017-09-05 11:20:49.649] [27639] [DEBUG] Latest online version is v2.0, we are running 2.0
[2017-09-05 11:20:51.517] [27639] [DEBUG] Loaded 149335 items from cache (created 5 days ago)
[2017-09-05 11:20:52.693] [27639] [DEBUG] Execution took 3.045 seconds
[2017-09-05 11:20:52.743] [27642] [DEBUG] Skip background cache update: Another process is already running
[2017-09-05 11:20:52.839] [27615] [INFO] Got 460 items from Google Drive
@azai91, I usually get this notification when I try to create a new doc;
Sometimes it works in creating the new doc and sometimes it gives me the above. Any idea what is going on?
How is this code licensed?
I modified it to create a Google Calendar "Quick Add" Alfred workflow and I'd like to release it, but only if that's ok with you.
Nice work on this workflow ๐
Would it be possible to add Google Drawings to the list of Supported File Types ?
Would be super helpful to have this :)
Thank you for creating a great workflow that I use countless times every day.
Justin
This is to re-open the old un-resolved issue: #34
Please see the above ticket for details.
I am using the latest version of the workflow.
Hey Alexander,
I wanted to congratulate with you on your awesome plugin. I looove it. โค๏ธ
Unfortunately, I just ran the upgrade and it stopped working. It fetches correctly all the files but when I hit enter to open one of them nothing happens...
I tried to clear the apps cache but it didn't solve the issue.
Here's the debug log. Maybe you can help me finding the issue
Thanks ;)
[2017-09-24 18:25:19][STDERR: input.scriptfilter] [2017-09-24 18:25:19.210] [12359] [DEBUG] ./google-drive.rb ["--filter", "m"]
[2017-09-24 18:25:19.211] [12359] [DEBUG] Loaded 13 releases from cache (created 6 hours ago)
[2017-09-24 18:25:19.211] [12359] [DEBUG] Latest online version is v2.1, we are running 2.1
[2017-09-24 18:25:19.217] [12359] [DEBUG] Loaded 579 items from cache (created 2 minutes ago)
[2017-09-24 18:25:19.230] [12359] [DEBUG] Execution took 0.02 seconds
[2017-09-24 18:25:19][STDERR: input.scriptfilter] [2017-09-24 18:25:19.674] [12361] [DEBUG] ./google-drive.rb ["--filter", "mo"]
[2017-09-24 18:25:19.675] [12361] [DEBUG] Loaded 13 releases from cache (created 6 hours ago)
[2017-09-24 18:25:19.675] [12361] [DEBUG] Latest online version is v2.1, we are running 2.1
[2017-09-24 18:25:19.681] [12361] [DEBUG] Loaded 579 items from cache (created 2 minutes ago)
[2017-09-24 18:25:19.688] [12361] [DEBUG] Execution took 0.014 seconds
[2017-09-24 18:25:28][ERROR: action.script] [2017-09-24 18:25:28.413] [12364] [DEBUG] ./google-drive.rb ["", "https://docs.google.com/spreadsheets/d/[... corret URL ..]/edit?usp=drivesdk", "--name", ""]
[2017-09-24 18:25:28.413] [12364] [ERROR] Unknown argument
[2017-09-24 18:25:28.413] [12364] [DEBUG] Execution took 0.0 seconds
[2017-09-24 18:25:28][ERROR: action.script] [2017-09-24 18:25:28.623] [12366] [DEBUG] ./google-drive.rb ["--check-for-updates"]
[2017-09-24 18:25:28.625] [12366] [DEBUG] Loaded 13 releases from cache (created 6 hours ago)
[2017-09-24 18:25:28.625] [12366] [DEBUG] Latest online version is v2.1, we are running 2.1
[2017-09-24 18:25:28.625] [12366] [DEBUG] Execution took 0.002 seconds`
Hello, I've noticed an issue with this workflow properly seeing files I've renamed in Google Drive.
I had a file named "Tunnel Tutorial Guide" and renamed it to "SpaceStationTut", but I after doing so, I can only see "Tunnel Tutorial Guide" in the list that Alfred produces. If I do select "Tunnel Tutorial Guide", it does in fact bring me to the proper file ("SpaceStationTut").
Is there a way to clear the cache?
When I'm search drive, it searches all docs that have been shared with me, which much of the time isn't useful. It'd be great if they were displayed in order of recency.
Also, if there are no search results, I'd like to be able to hit enter and have it search drive for the same string. Sometimes docs won't show up in the search results for this workflow, but they do when I manually search in drive.
Would be cool
http://www.packal.org/workflow/alfred-drive-workflow
This URL says the workflow was last updated in December.
This is the URL I found the package in the first place. Might want to update.
I'd upgraded my Packal packages a couple months ago and gotten a newer version of this workflow. Performance was not great -- 3-4 seconds to show the auto-complete list, where I was used to << 1 second, before.
I updated again a week ago, and performance is much better. It's back to the <<1 second latency I was used to. I use this at least 5 times every day. Thanks for writing a solid tool!
No issue, just a 'thanks'.
Hi Alexander, please push version 2.1 to packel.org.
Workflow opens a new blank browser window when trying to open a file. Only happening since update of OSx.
As Google Drive will soon be replaced by "Backup and Sync from Google.app" I installed it.
The problem is I can't search through my files/folders anymore...
Here is the error I get in Alfred console:
`Starting debug for 'Apps Google Drive'
[2017-09-10 15:36:07][STDERR: input.scriptfilter] [2017-09-10 15:36:07.132] [5884] [DEBUG] ./google-drive.rb ["--filter", "D"]
[2017-09-10 15:36:07.212] [5884] [FATAL] Uncaught exception: Address already in use - bind(2)
[2017-09-10 15:36:07.212] [5884] [DEBUG] Execution took 0.08 seconds
[2017-09-10 15:36:16][STDERR: input.scriptfilter] [2017-09-10 15:36:16.092] [5890] [DEBUG] ./google-drive.rb ["--filter", "D"]
[2017-09-10 15:36:16.143] [5890] [FATAL] Uncaught exception: Address already in use - bind(2)
[2017-09-10 15:36:16.143] [5890] [DEBUG] Execution took 0.052 seconds
[2017-09-10 15:36:16][STDERR: input.scriptfilter] [2017-09-10 15:36:16.370] [5896] [DEBUG] ./google-drive.rb ["--filter", "Do "]
[2017-09-10 15:36:16.424] [5896] [FATAL] Uncaught exception: Address already in use - bind(2)
[2017-09-10 15:36:16.424] [5896] [DEBUG] Execution took 0.054 seconds
[2017-09-10 15:36:16][STDERR: input.scriptfilter] [2017-09-10 15:36:16.831] [5902] [DEBUG] ./google-drive.rb ["--filter", "Do n"]
[2017-09-10 15:36:16.887] [5902] [FATAL] Uncaught exception: Address already in use - bind(2)
[2017-09-10 15:36:16.887] [5902] [DEBUG] Execution took 0.056 seconds
[2017-09-10 15:36:17][STDERR: input.scriptfilter] [2017-09-10 15:36:17.348] [5908] [DEBUG] ./google-drive.rb ["--filter", "Do "]
[2017-09-10 15:36:17.399] [5908] [FATAL] Uncaught exception: Address already in use - bind(2)
[2017-09-10 15:36:17.399] [5908] [DEBUG] Execution took 0.051 seconds
[2017-09-10 15:36:18][STDERR: input.scriptfilter] [2017-09-10 15:36:18.472] [5914] [DEBUG] ./google-drive.rb ["--filter", "Do"]
[2017-09-10 15:36:18.550] [5914] [FATAL] Uncaught exception: Address already in use - bind(2)
[2017-09-10 15:36:18.550] [5914] [DEBUG] Execution took 0.078 seconds`
Today I accidentally installed the extension even though it was already installed. Now none of the commands (including login, logout) work.
I tried deleting and reinstalling but no luck.
Screencast: http://cl.ly/1K0b2r030n0R
This extension would be super useful for me, but for some reason it's missing a bunch of results... Has anyone else run into this before? I get much more robust options when I search in Drive directly-
Is there a way to open the local copy of files (but search with Google Drive search)? That is Spotlight (and Alfred since it uses Spotlight's database), don't typically find what I'm looking for. Versus Google search which always does in the browser. A big part is it shows any and all results with a certain word or phrase rather than just the top 10, etc. More importantly, Google indexes content in PDFs and Images such as scans.
Since Google doesn't have Googe Search for the Mac (not anymore at least). I was thinking, I could sync all my files to Google Drive, and then could use Google Drive search or Google Cloud Search to file files on my mac. The issue is it would open a copy in the browser or require me to download a copy which wouldn't be helpful. Would need to open the local file on my mac, no matter the format or app.
Is there any way this app could help with that or any others that could? Files are located in a certain folder, and Google Drive knows that folder structure so one would think there would be some way of accomplishing it but not sure if that currently exists.
Thanks for a great plugin! Just what I needed.
The workflow seems not to find any files that are not Google Docs, Spreadsheets or maybe Presentations. I've got tons of files in my Drive that are of other formats, and I'd love to find those as well.
A while ago the workflow started running very slowly for me so I decided to log out and log back in again in an attempt to solve the problem. However, once I tried to log back in, the browser fails with a 404 code. This issue seems similar to error #48 but there isn't a process running on port 1337 (at least I don't think so).
I'm running macOS 10.12.6 and Alfred v3.5.1 (883) on Opera.
The logs are:
[2017-12-09 21:09:28.699] [61031] [ERROR] Already waiting for authentication: Address already in use - bind(2)
[2017-12-09 21:09:28.699] [61031] [INFO] Requesting user authentication via browser
[2017-12-09 21:09:28.782] [61031] [FATAL] Uncaught exception: No access token
[2017-12-09 21:09:28.782] [61031] [FATAL] ./google-drive.rb:243:in `abort'
[2017-12-09 21:09:28.782] [61031] [FATAL] ./google-drive.rb:243:in `token'
[2017-12-09 21:09:28.782] [61031] [FATAL] ./google-drive.rb:320:in `get_items'
[2017-12-09 21:09:28.782] [61031] [FATAL] ./google-drive.rb:335:in `items'
[2017-12-09 21:09:28.782] [61031] [FATAL] ./google-drive.rb:499:in `<main>'
[2017-12-09 21:09:28.782] [61031] [DEBUG] Execution took 0.169 seconds
After this happened, I tried this on another laptop finding that I had been automatically logged out. However, the issue did not happen there and I was able to log back in successfully.
Here is what I did:
http://127.0.0.1:1337/?code=<redacted>
and fails with{"statusCode":404,"error":"Not Found"}
Most of the time my search results are dominated by 10-20 PDF's that have very little relation to my search term, while way down in the results list will be a gdoc or gsheet that almost exactly matches the search query.
I am trying d > login and also trying to get it to open default browser to login and it will not do so. Is there another way to authenticate to google drive.
Actual Behavior: It no longer shows results when I do a search. See image below:
Expected Behavior: It displays results for the search as it did before. I am a regular and long-time user (thank you!) and it just suddenly stoped working.
I have already tried
[2017-12-11 13:45:36.137] [5930] [DEBUG] Execution took 10.07 seconds
[2017-12-11 13:52:39.511] [6949] [DEBUG] ./google-drive.rb ["--filter", "t"]
[2017-12-11 13:52:39.588] [6949] [DEBUG] Starting HTTP server
[2017-12-11 13:52:39.588] [6949] [INFO] Requesting user authentication via browser
[2017-12-11 13:52:44.719] [6949] [DEBUG] Received HTTP request: GET /?code=4/cKrxSBc-fHsLuzoB_4juPSes_7DJiNGZbANYVdzpFzs HTTP/1.1
[2017-12-11 13:52:44.729] [6949] [FATAL] Uncaught exception: Connection reset by peer - SSL_connect
[2017-12-11 13:52:44.729] [6949] [FATAL] /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/net/http.rb:933:in `connect_nonblock'
[2017-12-11 13:52:44.729] [6949] [FATAL] /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/net/http.rb:933:in `connect'
[2017-12-11 13:52:44.729] [6949] [FATAL] /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
[2017-12-11 13:52:44.729] [6949] [FATAL] /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/net/http.rb:852:in `start'
[2017-12-11 13:52:44.729] [6949] [FATAL] /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/net/http.rb:584:in `start'
[2017-12-11 13:52:44.729] [6949] [FATAL] /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/net/http.rb:508:in `post_form'
[2017-12-11 13:52:44.729] [6949] [FATAL] ./google-drive.rb:176:in `get_token'
[2017-12-11 13:52:44.729] [6949] [FATAL] ./google-drive.rb:147:in `block in accept_token'
[2017-12-11 13:52:44.729] [6949] [FATAL] ./google-drive.rb:133:in `loop'
[2017-12-11 13:52:44.729] [6949] [FATAL] ./google-drive.rb:133:in `accept_token'
[2017-12-11 13:52:44.729] [6949] [FATAL] ./google-drive.rb:221:in `block in token'
[2017-12-11 13:52:44.729] [6949] [DEBUG] Execution took 5.218 seconds
A big part of my workflow is creating documents from templates. I would like to search for the document I want and then copy it to the same location and open the copy.
Get the connection refused error when using OAuth to login to drive in Alfred. Any fix?
When searching with d keyword
, I see items that are trashed. I did not expect this.
Hi,
I would love using this wokflow as I'm a big fan of Alfred and the bookmarks-functions. But my problem is, that my default browser is firefox but all my Google-Drive-Stuff is in Chrome.
Is there a plan to let the user set the default browser somehow? Would be really cool!
Thanks and cheers, Christian
Can't login and configure plugin.
@azai91, I recently just updated to the latest version. However, after updating, any of my actions do not launch in the browser. That is;
Please help and thank you so very much for this awesome extension!
Hello,
Would it be possible to open the selected file from locally mounted GDFS / Google Drive folder instead of opening it in a browser, if the user has one of those local sync tools installed? This way the file would open in the correct native app directly.
br,
Timo
Can you make this so it works and opens docs in kiwi for gmail.
When logging in, it wants to give access to all my files to "Alfred Drive Workflow". Does this open my drive security to a 3rd party? I see that a CLIENT_ID and CLIENT_SECRET is predifined in the python script. Is there any documentation on who gains access and security in general using this workflow?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.