Google Workspace Automation Toolkit
A PowerShell and Node.js toolkit for Google Workspace automation. It handles exact CLI arguments and structured responses across documents, spreadsheets, files, email and calendar workflows.
Toolkit architecture · API integrations
The challenge
PowerShell 5.1 re-parsed quoted JSON passed to the Workspace CLI, breaking requests and making file operations difficult to automate consistently.
Objective
Preserve exact arguments and simplify common Workspace operations so larger automations can build on them.
The solution
A PowerShell helper and Node runners call the CLI with explicit argument arrays. Helpers cover document creation, file URLs and service-specific operations.
Key features
- Reliable invocationExact argv construction eliminates the PowerShell quoting mangling that broke raw GWS commands.
- Document creation from HTMLCreate real Google Docs from HTML with correct working-directory handling for upload and output paths.
- Full service coverageRunners for Drive, Docs, Sheets, Gmail, Calendar, Tasks and Slides — everything a business workflow needs.
- Used in production flowsThe toolkit created the pricing matrix and activity log sheets that power the Marcus Vance Automotive intake workflow.
How it works
- 01 — Script calls helpere.g. New-GwsDocFromHtml
- 02 — Exact argv builtNo PowerShell re-parsing
- 03 — GWS CLI executedDirect node + run.js
- 04 — Structured resultsJSON parsed to objects
- 05 — Workflow continuesFiles, mail, sheets drive by data
Outcome
The toolkit is used in workspace automations and provisioned the automotive workflow’s pricing matrix and activity log.