CLI downloading for google documents
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Due to security settings, it's difficult for us to publicly share documents from Google Drive. This script makes it trivial to publish a doc to the open web.


First thing you'll need to do is set up your repository as follows:

git clone
cd gapps-download
npm install

Then, follow step 1 of instructions here:

Download the client_secret.json from Google Drive.

Now, you're ready for action.


Once you identify your document's ID (hint, it's in the URL), downloading is as simple as:

node index DOC_ID DOC_TYPE

For a list of the document types, visit

(Note: Because this script streams to process.stdout it is possible to pipe to other applications, such as uploading to S3).

Sample Usage

node index 12345 text/html > out.html # Download a google doc to `out.html`
node index 12345 text/csv > out.csv # Download a google sheet to `out.csv`
node index 12345 > out.pdf # Download a google doc as a pdf
node index 12345 application/vnd.openxmlformats-officedocument.wordprocessingml.document > out.docx # Download google doc as a MS Word Document