This skill helps you read, create, and manage Google Docs via OAuth, enabling seamless document handling.
npx playbooks add skill abdullahbeam/nexus-design-abdullah --skill google-docs
Read, write, create, and manage Google Docs via OAuth authentication.
python3 00-system/skills/google/google-master/scripts/google_auth.py --check --service docs
Exit codes:
python3 00-system/skills/google/google-master/scripts/google_auth.py --login---
python3 00-system/skills/google/google-docs/scripts/docs_operations.py read <document_id>
python3 00-system/skills/google/google-docs/scripts/docs_operations.py create "My Document" --content "Initial content here"
python3 00-system/skills/google/google-docs/scripts/docs_operations.py insert <document_id> "Text to insert" --index 1
python3 00-system/skills/google/google-docs/scripts/docs_operations.py append <document_id> "Text to append at end"
python3 00-system/skills/google/google-docs/scripts/docs_operations.py replace <document_id> "old text" "new text"
python3 00-system/skills/google/google-docs/scripts/docs_operations.py export <document_id> --format pdf --output ./report.pdf
python3 00-system/skills/google/google-docs/scripts/docs_operations.py list --query "report"
python3 00-system/skills/google/google-docs/scripts/docs_operations.py copy <document_id> "Copy of My Document"
python3 00-system/skills/google/google-docs/scripts/docs_operations.py rename <document_id> "New Title"
---
The document ID is in the URL:
https://docs.google.com/document/d/[DOCUMENT_ID]/edit
---
from docs_operations import create_document, append_text
doc = create_document("Weekly Report - Jan 2024")
append_text(doc['document_id'], "Key findings from this week...")
print(f"Report created: {doc['url']}")
from docs_operations import copy_document, replace_all_text
new_doc = copy_document(template_id, "Invoice #1234")
replace_all_text(new_doc['document_id'], "{{CLIENT}}", "Acme Corp")
replace_all_text(new_doc['document_id'], "{{AMOUNT}}", "$5,000")
---
| Operation | Function | Description |
|-----------|----------|-------------|
| Read | read_document() | Get document content |
| Info | get_document_info() | Get title, ID, URL |
| Create | create_document() | Create new document |
| Copy | copy_document() | Duplicate document |
| Rename | rename_document() | Change title |
| Insert | insert_text() | Insert at position |
| Append | append_text() | Add to end |
| Replace | replace_all_text() | Find and replace |
| Export | export_document() | Export to text/HTML/PDF/DOCX |
| List | list_documents() | List accessible docs |
---
See [../google-master/references/error-handling.md](../google-master/references/error-handling.md) for common errors and solutions.
---
First-time setup: [../google-master/references/setup-guide.md](../google-master/references/setup-guide.md)
Quick start:
pip install google-auth google-auth-oauthlib google-api-python-client.env file at Nexus root: GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_PROJECT_ID=your-project-id
python3 00-system/skills/google/google-master/scripts/google_auth.py --loginWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.