Skip to main content
The Google Docs resource exposes Docs documents as a virtual filesystem mounted at some prefix such as /gdocs/. For Google OAuth setup, see Google Workspace Setup.

Config

Filesystem Layout

Example:
Documents are split into owned (documents you created) and shared (documents shared with you). The filename shape is:
If the modified date is unavailable, the date prefix is omitted. Reading a document file returns the full Google Docs API JSON for that document.

Cache

The Google Docs resource uses IndexCacheStore. Index entries store document IDs and metadata. There is no separate content cache — file content caching is handled by the workspace IOResult mechanism.

Example

See examples/gdocs/gdocs.py for the full working example.

Shell Commands

Standard commands available on the mounted Google Docs tree: Resource-specific commands:

gws-docs-documents-create

Create a new Google Docs document.
Returns the created document JSON.

gws-docs-documents-batchUpdate

Batch update a document.
Returns the batch update response JSON.

gws-docs-write

Append text to a document.
Returns the update response JSON.