google-drive

Export, download, and upload Google Drive and Google Docs files via the Drive API.

1|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/devbasex/ai-plugins --skill google-drive-devbasex
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: google-drive
Source: https://github.com/devbasex/ai-plugins/tree/main/plugins/ndf/skills/google-drive
Command: npx skills add https://github.com/devbasex/ai-plugins --skill google-drive-devbasex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-api-python-client, google-auth, google-auth-oauthlib, and includes scripts (resource) components.

What problem does it solve? Accessing Google Drive and Google Docs content from a CLI or agent environment normally requires manual downloads through a browser. This Skill lets you export Docs to text, HTML, or PDF, download binary files, and upload files with shareable links directly from the command line. ## Core Features & Use Cases - Document Export: Convert Google Docs, Sheets, and Slides to plain text, HTML, PDF, DOCX, CSV, or XLSX formats using the Drive API export endpoint. - File Download & Upload: Download binary files (images, PDFs) by file ID and upload local files with an automatically generated public share link. - Shared OAuth Authentication: Reuses the ndf:google-auth skill's OAuth2 token, so no separate credential setup is needed once Google authentication is configured. - Use Case: A user needs the contents of a shared Google Doc as plain text for analysis. They extract the file ID from the document URL and run the script to export it directly to a local file. ## Quick Start Ask the AI to export a Google Doc to plain text by providing the document URL or file ID, for example: export this Google Doc to text using the google-drive skill.

Frequently Asked Questions about google-drive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export a Google Doc to text or PDF from the command line?▼

Run the gdrive_fetch.py script with the document's file ID and a --mime flag such as text/plain, text/html, or application/pdf. The script uses the Drive API export endpoint and writes the result to a local file.

How do I find the file ID of a Google Doc?▼

The file ID is the segment between /d/ and /edit in the document URL. For example, in https://docs.google.com/document/d/FILE_ID/edit, the ID is the string labeled FILE_ID.

Can I upload files to Google Drive and get a shareable link?▼

Yes, run the script with --upload followed by the local file path. It uploads the file, grants anyone-with-link read permission, and prints the file ID, view link, and a direct download URL.

Why do I get a 403 Insufficient scopes error with the Google Drive API?▼

The stored OAuth token lacks the required Drive scopes. Re-authenticate through the ndf:google-auth skill by clearing the existing token and requesting the drive.file scope again.

Does this work with a service account instead of user OAuth?▼

No, the script relies on user OAuth credentials obtained through the ndf:google-auth skill. Service accounts do not have access to a user's personal Drive files, which causes 404 File not found errors.