Docs convert gdoc md
Skill opendatahub-io/docs-skills/skills/docs-convert-gdoc-md
Read a Google Docs document, Google Slides presentation, or Google Sheets spreadsheet and output as Markdown or CSV. Use this skill when asked to read, fetch, import, or convert a Google Doc, Google Slides, or Google Sheets URL.From its SKILL.md
npx -y skills add opendatahub-io/docs-skills --skill docs-convert-gdoc-mdAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.2 KB, as published. Nobody here has run it
Convert Google Docs, Slides, or Sheets
Export Google content using gcloud CLI or Google Application Default Credentials for authentication:
- Google Docs → Markdown (
.md) - Google Slides → Markdown (
.md) via PPTX with slide titles, bullet points, tables, and speaker notes - Google Sheets → CSV (
.csv)
Prerequisites
- The Red Hat Docs Agent Tools marketplace is installed
- Authentication — one of:
gcloudCLI installed and authenticated viagcloud auth login --enable-gdrive-access- Google Application Default Credentials (ADC) — set
GOOGLE_APPLICATION_CREDENTIALSto a service-account JSON path, rungcloud auth application-default login, or use attached workload/metadata credentials
python-pptxis installed for Slides export (python3 -m pip install python-pptx)
Instructions
- The user provides a Google Docs, Slides, or Sheets URL.
- Run the conversion script with the URL as the argument.
- Read the output file and present the content to the user.
Run the script
The script is at ${CLAUDE_SKILL_DIR}/scripts/gdoc2md.py.
Always quote the URL and output file arguments:
uv run --script ${CLAUDE_SKILL_DIR}/scripts/gdoc2md.py [--comments] [--include-resolved] "<url>" ["<output_file>"]
- The script auto-detects the URL type:
/document/d/→ Google Docs → Markdown/presentation/d/→ Google Slides → Markdown (via PPTX)/spreadsheets/d/→ Google Sheets → CSV
- If no output file is specified, it defaults to
<id>.mdor<id>.csv.
Include Google Docs comments
Use --comments to pull comment threads from the document and insert them as Markdown footnotes:
uv run --script ${CLAUDE_SKILL_DIR}/scripts/gdoc2md.py --comments "<google-doc-url>"
- Each comment with a highlighted text anchor becomes a footnote reference placed after the quoted text in the Markdown body.
- Comments without an anchor appear as footnotes at the end.
- Reply threads are included under the parent comment.
- By default, resolved comment threads are excluded. Add
--include-resolvedto include them. - The
--commentsflag only applies to Google Docs. The script ignores it for Slides and Sheets.
Error handling
- 401: Authentication expired or invalid. Tell the user to run
gcloud auth login --enable-gdrive-access. - Credential errors: Malformed JSON, missing ADC, or refresh failures are caught and reported. Verify the credentials are configured per Prerequisites.
- 403: No permission. The user needs access to the document.
- 404: Wrong URL or the document doesn't exist.
- No authentication method available: Neither
gcloudnor ADC is configured. Tell the user to set up one of the methods described in Prerequisites. - ImportError:
python-pptxnot installed. Tell the user to runpython3 -m pip install python-pptx.