gsheet2md
Original:🇺🇸 English
Translated
3 scriptsChecked / no sensitive code detected
Reads Google Sheets and converts content to markdown. Use when the user asks to read, fetch, or convert Google Sheets data to markdown.
2installs
Added on
NPX Install
npx skill4agent add duongvm57/gsheet2md-skill gsheet2mdTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →gsheet2md
Read a Google Sheet by and turn the result into usable markdown.
SPREADSHEET_IDRequirements
- OAuth credentials at with:
~/.config/google-sheets/oauth-token.jsonclient_idclient_secretrefresh_token
- Google Sheets API enabled for that OAuth app
Output Policy
- Use the installed script from the skill directory, but write any authored markdown into of the current workspace.
./docs - If does not exist, create it before writing files.
./docs - Do not save generated documents into the installed skill directory.
Usage
Step 1: Resolve the installed script path
Find the directory that contains this . The Python script lives at:
SKILL.mdbash
<skill-dir>/scripts/read_sheet.pyStep 2: Fetch sheet data
bash
python3 <skill-dir>/scripts/read_sheet.py --spreadsheet-id <SPREADSHEET_ID> --sheet-name <SHEET_NAME>Step 3: Convert to readable markdown
After fetching the sheet data, the agent should turn it into a well-structured markdown document.
The agent is responsible for:
- Understanding the data structure
- Formatting sections with clear headings, tables, and lists
- Writing short descriptions where needed
- Organizing the content for human readers
- Saving the final markdown file under in the current workspace
./docs/<derived-sheet-name>.md
Parameters
| Parameter | Required | Description |
|---|---|---|
| Yes | The Google Spreadsheet ID |
| No | Sheet name to read. Defaults to the first sheet. |
| No | OAuth credentials path. Defaults to |
| No | Output file path. Defaults to stdout. |
| No | Output format: |
| No | Keep empty columns instead of cleaning them. |
Example
bash
# Fetch as JSON
python3 <skill-dir>/scripts/read_sheet.py \
--spreadsheet-id "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms" \
--sheet-name "Sheet1"
# Fetch as markdown table
python3 <skill-dir>/scripts/read_sheet.py \
--spreadsheet-id "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms" \
--format table
# Save raw output directly into the current workspace docs folder
mkdir -p ./docs
python3 <skill-dir>/scripts/read_sheet.py \
--spreadsheet-id "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms" \
--format table \
--output ./docs/sheet1.mdOAuth Credentials Format
json
{
"type": "oauth",
"client_id": "your-client-id.apps.googleusercontent.com",
"client_secret": "your-client-secret",
"refresh_token": "your-refresh-token"
}Workflow For Markdown Output
- Run the script to fetch the sheet data.
- Inspect the returned structure before formatting it.
- Ensure exists in the current workspace. If
./docsdoes not exist, create it../docs - Write a markdown document that matches the content shape instead of forcing a fixed template.
- Save the markdown document under using a filename derived from the sheet name.
./docs/