# 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.

- **Type:** Skill
- **Install:** `agentstack add skill-opendatahub-io-docs-skills-docs-convert-gdoc-md`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [opendatahub-io](https://agentstack.voostack.com/s/opendatahub-io)
- **Installs:** 0
- **Category:** [Data & Analytics](https://agentstack.voostack.com/c/data-and-analytics)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [opendatahub-io](https://github.com/opendatahub-io)
- **Source:** https://github.com/opendatahub-io/docs-skills/tree/main/skills/docs-convert-gdoc-md

## Install

```sh
agentstack add skill-opendatahub-io-docs-skills-docs-convert-gdoc-md
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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](https://aireilly.gitlab.cee.redhat.com/redhat-docs-agent-tools/install/) is installed
- Authentication — one of:
  - `gcloud` CLI installed and authenticated via `gcloud auth login --enable-gdrive-access`
  - Google Application Default Credentials (ADC) — set `GOOGLE_APPLICATION_CREDENTIALS` to a service-account JSON path, run `gcloud auth application-default login`, or use attached workload/metadata credentials
- `python-pptx` is installed for Slides export (`python3 -m pip install python-pptx`)

## Instructions

1. The user provides a Google Docs, Slides, or Sheets URL.
2. Run the conversion script with the URL as the argument.
3. 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:

```bash
uv run --script ${CLAUDE_SKILL_DIR}/scripts/gdoc2md.py [--comments] [--include-resolved] "" [""]
```

- 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 `.md` or `.csv`.

### Include Google Docs comments

Use `--comments` to pull comment threads from the document and insert them as Markdown footnotes:

```bash
uv run --script ${CLAUDE_SKILL_DIR}/scripts/gdoc2md.py --comments ""
```

- 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-resolved` to include them.
- The `--comments` flag 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 `gcloud` nor ADC is configured. Tell the user to set up one of the methods described in Prerequisites.
- **ImportError**: `python-pptx` not installed. Tell the user to run `python3 -m pip install python-pptx`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [opendatahub-io](https://github.com/opendatahub-io)
- **Source:** [opendatahub-io/docs-skills](https://github.com/opendatahub-io/docs-skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-opendatahub-io-docs-skills-docs-convert-gdoc-md
- Seller: https://agentstack.voostack.com/s/opendatahub-io
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
