PluginBench
Skill
Pass
Audit score 90

gws-drive-upload

googleworkspace/cli

Upload files to Google Drive with automatic MIME type detection and optional metadata.

What is gws-drive-upload?

Uploads a file to Google Drive with automatic MIME type detection. Use this when you need to programmatically transfer files to Drive, optionally specifying a parent folder or custom filename.

  • Uploads a file to Google Drive from a local path
  • Automatically detects MIME type based on file extension
  • Allows specifying a parent folder ID for organization
  • Supports custom target filename via --name flag
  • Infers filename from local path if --name is not provided

How to install gws-drive-upload

npx skills add null --skill gws-drive-upload
Prerequisites
  • gws CLI installed and configured
  • Google Workspace authentication set up (see gws-shared/SKILL.md)
  • Read access to gws-shared/SKILL.md for auth and global flags
Claude Code
Cursor
Windsurf
Cline

How to use gws-drive-upload

  1. 1.Ensure the file path is correct and accessible locally
  2. 2.Run `gws drive +upload <file>` with the path to your file
  3. 3.Optionally add `--parent FOLDER_ID` to specify the destination folder
  4. 4.Optionally add `--name 'Custom Name'` to rename the file on upload
  5. 5.Confirm the upload when prompted (write operation)

Use cases

Good for
  • Upload a report PDF to a specific Drive folder
  • Batch upload CSV data files with custom names
  • Transfer local documents to Drive as part of an automated workflow
  • Upload files to a shared drive folder by parent ID
  • Archive local files to Drive with renamed filenames
Who it's for
  • Automation engineers building Drive workflows
  • Teams managing document uploads programmatically
  • Users integrating local file systems with Google Drive
  • Developers building productivity tools

gws-drive-upload FAQ

How is the MIME type determined?

MIME type is detected automatically based on the file extension.

What if I don't specify a --name?

The filename is inferred from the local file path, preserving the original name.

Can I upload to a specific folder?

Yes, use the --parent flag with a folder ID to specify the destination.

Is this a safe operation?

This is a write command, so you will be prompted to confirm before execution.

Where can I find more Drive commands?

See gws-drive/SKILL.md for all file, folder, and shared drive management commands.

Full instructions (SKILL.md)

Source of truth, from googleworkspace/cli.


name: gws-drive-upload description: "Google Drive: Upload a file with automatic metadata." metadata: version: 0.22.5 openclaw: category: "productivity" requires: bins: - gws cliHelp: "gws drive +upload --help"

drive +upload

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Upload a file with automatic metadata

Usage

gws drive +upload <file>

Flags

FlagRequiredDefaultDescription
<file>Path to file to upload
--parentParent folder ID
--nameTarget filename (defaults to source filename)

Examples

gws drive +upload ./report.pdf
gws drive +upload ./report.pdf --parent FOLDER_ID
gws drive +upload ./data.csv --name 'Sales Data.csv'

Tips

  • MIME type is detected automatically.
  • Filename is inferred from the local path unless --name is given.

[!CAUTION] This is a write command — confirm with the user before executing.

See Also

  • gws-shared — Global flags and auth
  • gws-drive — All manage files, folders, and shared drives commands