google-drive
Upload files, create folders, list and search Google Drive via CLI
What this skill does
# Google Drive > Upload files, create folders, list and search Google Drive via CLI. ## When to use - Upload proposals, invoices, contracts to client folders - Create new client folder structure - List or search files in Drive - Any Google Drive file management task ## Dependencies - Other skills: `google-auth` (if token expired) - External: Python 3, `google-api-python-client`, `google-auth` ## Paths | What | Path | |------|------| | Script | `$GOOGLE_TOOLS_PATH/drive_manager.py` | | Token | `$GOOGLE_TOOLS_PATH/token.json` | | Credentials | `$GOOGLE_TOOLS_PATH/credentials.json` | | Venv Python | `$GOOGLE_TOOLS_PATH/.venv/bin/python3` | ## Known Folder IDs | Folder | ID | |--------|----| | Root (WeLabelData) | `<YOUR_DRIVE_ROOT_ID>` | | Clients | `<YOUR_CLIENTS_FOLDER_ID>` | | Templates | `<YOUR_TEMPLATES_FOLDER_ID>` | ## How to execute ### List folder contents ```bash cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py list FOLDER_ID ``` ### Create a folder ```bash cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py create-folder "Folder Name" --parent FOLDER_ID ``` ### Upload a file ```bash cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py upload /path/to/file.pdf --folder FOLDER_ID cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py upload /path/to/file.pdf --folder FOLDER_ID --name "Custom Name.pdf" ``` ### Search by name ```bash cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py search "query" cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py search "query" --folder FOLDER_ID ``` ### Share file/folder ```bash cd $GOOGLE_TOOLS_PATH && ./.venv/bin/python3 drive_manager.py share FILE_ID --email [email protected] --role writer cd $GOOGLE_TOOLS_PATH && ./.venv/bin/python3 drive_manager.py share FILE_ID --email [email protected] --role reader --notify --message "Please review" ``` ### Check permissions ```bash cd $GOOGLE_TOOLS_PATH && ./.venv/bin/python3 drive_manager.py permissions FILE_ID ``` ### Create Google Doc ```bash cd $GOOGLE_TOOLS_PATH && ./.venv/bin/python3 drive_manager.py create-doc "Title" --folder FOLDER_ID cd $GOOGLE_TOOLS_PATH && ./.venv/bin/python3 drive_manager.py create-doc "Title" --folder FOLDER_ID --html /path/to/content.html ``` ### File info (modified time, last editor) ```bash cd $GOOGLE_TOOLS_PATH && ./.venv/bin/python3 drive_manager.py info FILE_ID ``` ## Parameters | Parameter | Description | Default | |-----------|-------------|---------| | `folder_id` | Folder ID for `list` command | required | | `--parent` | Parent folder ID for `create-folder` | root | | `--folder` | Target folder ID for `upload` / `search` / `create-doc` | none | | `--name` | Custom filename for `upload` | original filename | | `--email` | Email to share with (`share` command) | required | | `--role` | Permission role: `reader`, `writer`, `commenter` | writer | | `--notify` | Send email notification when sharing | false | | `--message` | Custom notification message | none | | `--html` | Path to HTML file for doc content (`create-doc`) | empty doc | ## Examples ### List all client folders ```bash cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py list <YOUR_CLIENTS_FOLDER_ID> ``` ### Create a new client folder ```bash cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py create-folder "Acme Corp" --parent <YOUR_CLIENTS_FOLDER_ID> ``` ### Upload invoice to client folder ```bash cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py upload ~/invoices/inv-100.pdf --folder CLIENT_FOLDER_ID --name "Invoice #100.pdf" ``` ### Search for proposals ```bash cd $GOOGLE_TOOLS_PATH && python3 drive_manager.py search "proposal" --folder <YOUR_CLIENTS_FOLDER_ID> ``` ## Output Format All commands output JSON array. Each entry has: - `id` — Google Drive file ID - `name` — file/folder name - `mimeType` — MIME type (`application/vnd.google-apps.folder` for folders) - `webViewLink` — direct link to open in browser ## Limitations - Scopes: uses `drive.readonly` (list/search) + `drive.file` (create/upload/share). Cannot modify files not created by this app. - Upload: single file at a time. For bulk uploads, loop in bash. - Search: name-based only. Use Google Drive web UI for full-text content search. - Sharing: can only share files created by this app (drive.file scope). Cannot share files created elsewhere. - Create-doc: uses Drive API upload with HTML conversion (no Docs API needed). Formatting via HTML. ## Troubleshooting | Problem | Solution | |---------|----------| | `token.json` expired | Run `google-auth` skill to refresh | | 403 insufficient permissions | Check scopes in `google_scopes.py`, may need to re-auth | | File not found on upload | Use absolute path or `~` expansion | | Empty list result | Verify folder ID is correct, check trashed status | ## Related skills - `google-auth` — OAuth token management - `invoice-generator-agent` — generates invoices that can be uploaded here
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.