# Google Sheets

## Links

- Product page URL: https://www.agentpmt.com/marketplace/google-sheets-api
- Product markdown URL: https://www.agentpmt.com/marketplace/google-sheets-api?format=agent-md
- Product JSON URL: https://www.agentpmt.com/marketplace/google-sheets-api?format=agent-json

## Overview

- Product ID: 696302894cf4309309cac7b2
- Type: connector
- Unit type: request
- Price: 500 credits
- Categories: Financial Modeling, Data Science, Mathematical Computing, Data Storage & Persistence, Data Processing, Data Formatting & Conversion, List & Array Operations, Sorting & Ordering, Finance & Accounting, Portfolio Management, E-commerce & Product Catalog, Survey & Feedback Collection, Marketing Automation, Team Collaboration & Workspaces, Task & Workflow Automation
- Generated at: 2026-07-14T22:07:03.477Z

### Page Description

Create, read, update, format, share, and export Google Sheets with agent-safe spreadsheet workflows. Append rows at the true table end, append columns after the last non-empty data column, update selected fields in matched rows, manage tabs, apply validation and formatting, and store CSV/PDF/XLSX exports in File Manager.

### Agent Description

Work with Google Sheets using safe short actions: create and find spreadsheets, list tabs, read data, append rows at the true table end, append columns at the current data edge, update selected fields by key, export specific sheets or whole workbooks, share files, format cells, protect ranges, add named ranges, set validation, add conditional formatting, and copy or move ranges.

## Details

### Details

Create, read, update, format, share, and export Google Sheets with agent-safe spreadsheet workflows. Append rows at the true table end, append columns after the last non-empty data column, update selected fields in matched rows, manage tabs, apply validation and formatting, and store CSV/PDF/XLSX exports in File Manager.

### Actions

- `create` (5 credits): Create a new spreadsheet, optionally with an initial tab, headers, and rows.
- `search` (5 credits): Search or list recent Google Sheets spreadsheets.
- `list_sheets` (5 credits): List the tabs in a spreadsheet with sheet ids and dimensions.
- `read` (5 credits): Read values from a tab or A1 range. If sheet_name is omitted, resolves the real first tab.
- `get_headers` (5 credits): Read the header row and return header-to-column mappings plus duplicate diagnostics.
- `get_data_range` (5 credits): Find the last non-empty row/column and recommended append start for a tab.
- `append_rows` (5 credits): Append rows at the true table end. Object rows are mapped by sheet headers.
- `append_column` (5 credits): Append one new column immediately after the last non-empty data column and write its header and values.
- `update_row` (5 credits): Update selected columns in a matched row using header names. Touches only requested cells.
- `export_sheet` (5 credits): Export a specific sheet or whole spreadsheet to File Manager as CSV, TSV, PDF, XLSX, ODS, HTML, or ZIP.
- `share` (5 credits): Share a spreadsheet with a user, group, domain, or anyone.
- `add_sheet` (5 credits): Add a new tab to a spreadsheet.
- `delete_sheet` (5 credits): Delete a tab by name, id, or index.
- `rename_sheet` (5 credits): Rename a tab by name, id, or index.
- `sort` (5 credits): Sort a range, preferably by header name.
- `find_replace` (5 credits): Find and replace text across the spreadsheet or one sheet.
- `format_cells` (5 credits): Apply cell formatting or number format to a range.
- `protect_range` (5 credits): Protect a range, optionally warning-only or with explicit editor emails.
- `unprotect_range` (5 credits): Remove protection by protected range id.
- `add_named_range` (5 credits): Create a named range.
- `delete_named_range` (5 credits): Delete a named range by id.
- `set_data_validation` (5 credits): Set a Sheets data validation rule on a range.
- `add_conditional_formatting` (5 credits): Add a conditional formatting rule to a range.
- `copy_paste` (5 credits): Copy a source range to a destination range.
- `cut_paste` (5 credits): Move a source range to a destination start cell.

### Use Cases

append spreadsheet rows safely, update CRM-style rows by key, export a sheet to CSV or PDF, create reporting spreadsheets, add data validation to templates, protect header ranges, share sheets with collaborators, copy or move spreadsheet ranges, format dashboards, manage sheet tabs

### Workflows Using This Tool

#### X (Twitter) Thought Leadership Engine: Human-Voice AI Posts from Industry News with Approval and Auto-Publish

Stay visible on X (Twitter) every week without staring at a blank compose box. Give this AI social media workflow your beats and your positioning, and it scans the last week of industry news, picks the strongest non-overlapping angles, and writes opinionated, fact-backed posts in a natural human voice that sounds like you, not a press release. Every post is screened by an automated writing quality check that strips robotic, overused AI phrasing, and posts that benefit from a visual get a custom 16:9 image. All drafts queue in a Google Sheet and come to you for batch approval, and the workflow checks back for your decision at 5 and 10 minutes. Approve and it publishes to X, attaching images and links correctly, then marks each row with the live post link so you keep a complete content log. Miss the window and nothing posts: every draft stays safely queued in the sheet, ready to approve and publish on a later run. Ideal for founders, executives, consultants, developer advocates, and marketers who want Twitter automation with editorial control: AI-generated social media posts, social SEO, personal branding, content marketing, and a consistent thought leadership presence built on real facts and a human voice.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/x-thought-leadership-engine-turn-industry-news-into-human-voice-posts-with-approval-and-auto-publish
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/x-thought-leadership-engine-turn-industry-news-into-human-voice-posts-with-approval-and-auto-publish?format=agent-md
- Published: 2026-06-10T20:59:52.887Z

#### Pipedrive AI Email Writer: Personalized Human-Voice Nurture and Follow-Up Drafts for Any CRM Segment

Turn any Pipedrive segment into a set of genuinely personal sales emails, written one contact at a time and waiting in your Gmail drafts for your final say. Point this AI email writing workflow at a pipeline stage, an owner, a label, or stalled deals with no recent activity, and it pulls each contact's deal history and notes from Pipedrive, finds the strongest personal hook for every relationship, and writes each email in a natural human voice around your goal: re-engaging a quiet deal, a renewal check-in, post-sale nurture, an upsell conversation, or a simple hello. Every email passes an automated writing quality check that catches robotic, overused AI phrasing and rewrites it before you ever see it. Nothing is sent automatically. Each message lands as a Gmail draft for you to review and send personally, while the workflow logs a note and a follow-up activity on every deal in Pipedrive, records the campaign in a Google Sheets log, and emails you a summary of what is ready. Built for account executives, customer success teams, founders doing their own outreach, sales follow-up and renewal plays, and anyone who wants CRM email automation that produces one-to-one messages that read like they wrote them.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/pipedrive-nurture-email-writer-personalized-human-voice-outreach-drafts-for-any-crm-segment
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/pipedrive-nurture-email-writer-personalized-human-voice-outreach-drafts-for-any-crm-segment?format=agent-md
- Published: 2026-06-10T20:59:48.301Z

#### Human-Voice AI Blog Writer: Research, Write, and Illustrate SEO Articles from Your Content Calendar

Turn a topic or a content-calendar spreadsheet into a publish-ready, fact-checked blog article written in a natural human voice. This AI blog writing workflow picks the next due topic from your Google Sheet (or takes one directly), researches it across live news and authoritative web sources, builds a sourced fact sheet and SEO outline, then drafts the full long-form article with a human-style writing agent that writes only from verified facts. Every draft runs through an automated writing quality check that catches robotic, banned AI phrases and rewrites them until the copy passes. A custom hero image is generated to match the story, the finished article is assembled into a formatted Google Doc with a sources section, the run is logged back to your content calendar, and the doc link lands in your inbox. Ideal for content marketing teams, SEO agencies, founders, newsletters, and solo bloggers who want an AI blog post generator and content automation pipeline that delivers consistent, on-brand, long-form SEO content without the research grind or the telltale AI voice.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/human-voice-blog-factory-research-write-illustrate-and-deliver-seo-articles-from-your-content-calendar
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/human-voice-blog-factory-research-write-illustrate-and-deliver-seo-articles-from-your-content-calendar?format=agent-md
- Published: 2026-06-10T20:59:39.285Z

#### GitHub Dev Announcements

Generate user-facing development update announcements from recent GitHub commits across one or more repositories. The user supplies a list of repos on the first run (wildcards like `org/*` allowed); the workflow stores them in a Google Sheet so subsequent runs need no input. For each run, the agent fetches commits since the last run (or last 7 days on first run), categorizes them into New Features / Updates / Bug Fixes, applies a security filter to strip internal paths, endpoints, secrets, and vulnerability details, drafts the announcement in a Google Doc, polishes the writing with a quality check tool, and logs the run (date, repos, commit count, doc URL, status) back in the sheet. Designed as a starting template — users can remix it to add their own follow-up steps such as posting to Slack or emailing subscribers.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/github-dev-announcements
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/github-dev-announcements?format=agent-md
- Published: 2026-04-30T17:43:08.504Z

#### Invoice OCR and Booking Pipeline

Automates accounts payable by accepting uploaded vendor invoices, extracting invoice data via OCR (vendor name, invoice number, date, line items, totals), categorizing expenses to the correct chart of accounts, booking them as bills in Zoho Books, and logging a processing summary. Eliminates manual invoice data entry for accounting teams.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/invoice-ocr-and-booking-pipeline
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/invoice-ocr-and-booking-pipeline?format=agent-md
- Published: 2026-04-19T18:29:42.593Z

#### Bank Statement OCR and Expense Categorization

Accepts uploaded bank statements, extracts transactions via OCR, categorizes each transaction by expense type, logs categorized data to a spreadsheet, and generates a spending breakdown chart. Perfect for personal finance analysis or small business bookkeeping.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/bank-statement-ocr-and-expense-categorization
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/bank-statement-ocr-and-expense-categorization?format=agent-md
- Published: 2026-04-19T18:29:42.593Z

#### Real Estate Open House Thank You Card Mailer

Automates personalized thank-you greeting cards for open house attendees. Pulls the latest attendee list from Google Sheets (names, addresses, and interests), scrapes the property listing photo AND property details from realtor.com, verifies address match, then creates and mails a custom folded greeting card to each attendee. The front features the listing photo, the back has the agent's logo, and the inside contains a personalized thank-you message with action-provoking phrases that reference ONLY factual property features verified from the listing.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/real-estate-open-house-thank-you-card-mailer
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/real-estate-open-house-thank-you-card-mailer?format=agent-md
- Published: 2026-03-02T00:17:40.261Z

#### Gluten Free Recipe Ingredients to Google Sheet

Fetches 5 gluten-free recipes from the web, extracts and aggregates all ingredients, deduplicates the list, and writes the final ingredient list to a new Google Sheet.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/gluten-free-recipe-ingredients-to-google-sheet
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/gluten-free-recipe-ingredients-to-google-sheet?format=agent-md
- Published: 2026-02-26T16:38:31.786Z

#### Kroger Grocery Order From Google Sheet

Reads your grocery list from a Google Sheet, searches Kroger for each item to find the best-priced match, adds them to your Kroger cart, then sends you a notification that your order is ready for checkout.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/kroger-grocery-order-from-google-sheet
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/kroger-grocery-order-from-google-sheet?format=agent-md
- Published: 2026-02-23T02:41:28.633Z

#### Accounts Receivable Follow-Up

Automates collections by pulling overdue invoices from Zoho Books, calculating days overdue, drafting collection emails with appropriate urgency levels, sending reminders to customers, and tracking collection efforts in a spreadsheet. Improves cash flow by ensuring consistent follow-up on unpaid invoices.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/accounts-receivable-follow-up
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/accounts-receivable-follow-up?format=agent-md
- Published: 2026-02-15T19:19:27.272Z

### Related Content

No related content is currently linked to this product.

## Integration Details

### DynamicMCP

- Setup page URL: https://www.agentpmt.com/dynamic-mcp
- Claude setup guide: https://www.agentpmt.com/dynamic-mcp#platform=claude
- ChatGPT setup guide: https://www.agentpmt.com/dynamic-mcp#platform=chatgpt
- Cursor setup guide: https://www.agentpmt.com/dynamic-mcp#platform=cursor
- Windsurf setup guide: https://www.agentpmt.com/dynamic-mcp#platform=windsurf

Use the local router for command-based MCP clients. It forwards requests to `https://api.agentpmt.com/mcp` and does not execute tools locally.

```bash
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

### REST API

The live page renders cURL, Python, JavaScript, and Node.js examples. Logged-in users see those examples prefilled with their own API and budget credentials.

- Purchase endpoint: https://api.agentpmt.com/products/purchase
- Authorization format: `Bearer <base64(apiKey:budgetKey)>`

```bash
curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eW91ci1hcGkta2V5LWhlcmU6eW91ci1idWRnZXQta2V5LWhlcmU=" \
  -d '{
    "product_id": "696302894cf4309309cac7b2",
    "parameters": {
      "action": "create",
      "title": "example_title"
    }
  }'
```

### Autonomous Agents

Autonomous agents can access this tool through AgentAddress credit balances or direct x402 payments. Use the Autonomous Agent API reference for endpoint shapes after choosing the access pattern below.

- Autonomous Agent API reference URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents
- Autonomous Agent API reference markdown URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents?format=agent-md
- Credit-Based Access Using AgentAddress: https://www.agentpmt.com/docs/autonomous-agents/credit-based-tool-usage-with-agentaddress
- AgentAddress is preferred for persistent file access, stored platform state, and maximum tool use ability across repeated calls.
- Direct x402 is for independent one-off tool calls that do not require shared files or stored platform state.
- Direct x402 public payments: USDC on Base, Arbitrum, Optimism, Polygon, and Avalanche.

#### Product Skill Package

This product has a published Agent Skill package for product-specific operating instructions.

- Skill slug: google-sheets
- Version: 1.0.0
- Download SKILL.md: https://raw.githubusercontent.com/AgentPMT/agent-skills/main/skills/google-sheets/SKILL.md
- Package source: https://github.com/AgentPMT/agent-skills/tree/main/skills/google-sheets
- OpenClaw listing: https://clawhub.ai/agentpmt/google-sheets
- OpenClaw install: `openclaw skills install google-sheets`
- skills.sh install: `npx skills add AgentPMT/agent-skills --skill google-sheets`
- Last published: 2026-06-24T02:13:50.713Z

### Schema

#### Credentials

These runtime credentials should be provided under `parameters._credentials` when required.

- Google OAuth (`google_oauth`, oauth_token, required)
  Help: Connect your Google account.
  Connection ID: 69616abea90ed54743f01957

#### Parameters

- Schema type: actions

```json
{
  "actions": {
    "create": {
      "description": "Create a new spreadsheet, optionally with an initial tab, headers, and rows.",
      "properties": {
        "title": {
          "type": "string",
          "description": "Spreadsheet title.",
          "required": true
        },
        "initial_sheet_name": {
          "type": "string",
          "description": "Optional first tab name.",
          "required": false
        },
        "initial_headers": {
          "type": "array",
          "description": "Optional first header row.",
          "required": false,
          "items": {
            "type": "string"
          }
        },
        "rows": {
          "type": "array",
          "description": "Optional initial rows as arrays or objects keyed by headers.",
          "required": false,
          "items": {
            "type": "object"
          }
        }
      }
    },
    "search": {
      "description": "Search or list recent Google Sheets spreadsheets.",
      "properties": {
        "query": {
          "type": "string",
          "description": "Optional search text matched against spreadsheet name/content.",
          "required": false
        },
        "max_results": {
          "type": "integer",
          "description": "Maximum results to return, 1-100.",
          "required": false,
          "minimum": 1,
          "maximum": 100
        }
      }
    },
    "list_sheets": {
      "description": "List the tabs in a spreadsheet with sheet ids and dimensions.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        }
      }
    },
    "read": {
      "description": "Read values from a tab or A1 range. If sheet_name is omitted, resolves the real first tab.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "sheet_id": {
          "type": "integer",
          "description": "Optional numeric sheet id.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "Optional A1 range. Bare ranges are qualified with sheet_name.",
          "required": false
        },
        "value_render_option": {
          "type": "string",
          "description": "FORMATTED_VALUE, UNFORMATTED_VALUE, or FORMULA.",
          "required": false
        }
      }
    },
    "get_headers": {
      "description": "Read the header row and return header-to-column mappings plus duplicate diagnostics.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "header_row": {
          "type": "integer",
          "description": "One-based header row, default 1.",
          "required": false,
          "minimum": 1
        }
      }
    },
    "get_data_range": {
      "description": "Find the last non-empty row/column and recommended append start for a tab.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "Optional A1 range to inspect.",
          "required": false
        }
      }
    },
    "append_rows": {
      "description": "Append rows at the true table end. Object rows are mapped by sheet headers.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "rows": {
          "type": "array",
          "description": "Rows as arrays or objects keyed by headers.",
          "required": true,
          "items": {
            "type": "object"
          }
        },
        "header_row": {
          "type": "integer",
          "description": "One-based header row, default 1.",
          "required": false,
          "minimum": 1
        },
        "value_input_option": {
          "type": "string",
          "description": "USER_ENTERED or RAW.",
          "required": false
        }
      }
    },
    "append_column": {
      "description": "Append one new column immediately after the last non-empty data column and write its header and values.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "column_name": {
          "type": "string",
          "description": "New column header.",
          "required": true
        },
        "column_values": {
          "type": "array",
          "description": "Values to write below the header at the data table edge.",
          "required": true,
          "items": {
            "type": "string"
          }
        }
      }
    },
    "update_row": {
      "description": "Update selected columns in a matched row using header names. Touches only requested cells.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "row_number": {
          "type": "integer",
          "description": "Optional one-based row number.",
          "required": false,
          "minimum": 1
        },
        "key_column": {
          "type": "string",
          "description": "Header used to find the row when row_number is omitted.",
          "required": false
        },
        "key_value": {
          "type": "string",
          "description": "Value to match in key_column.",
          "required": false
        },
        "updates": {
          "type": "object",
          "description": "Column patch keyed by header names.",
          "required": true
        },
        "multi": {
          "type": "boolean",
          "description": "Allow all matching rows to update.",
          "required": false
        }
      }
    },
    "export_sheet": {
      "description": "Export a specific sheet or whole spreadsheet to File Manager as CSV, TSV, PDF, XLSX, ODS, HTML, or ZIP.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name for specific-sheet export.",
          "required": false
        },
        "sheet_id": {
          "type": "integer",
          "description": "Optional numeric sheet id.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "Optional range for CSV/TSV exports.",
          "required": false
        },
        "format": {
          "type": "string",
          "description": "csv, tsv, pdf, xlsx, ods, html, or zip.",
          "required": true
        },
        "filename": {
          "type": "string",
          "description": "Optional stored filename.",
          "required": false
        },
        "expiration_days": {
          "type": "integer",
          "description": "File Manager expiration, 1-7 days.",
          "required": false,
          "minimum": 1,
          "maximum": 7
        }
      }
    },
    "share": {
      "description": "Share a spreadsheet with a user, group, domain, or anyone.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "email": {
          "type": "string",
          "description": "Email for user/group shares.",
          "required": false
        },
        "domain": {
          "type": "string",
          "description": "Domain for domain shares.",
          "required": false
        },
        "role": {
          "type": "string",
          "description": "reader, commenter, writer, organizer, fileOrganizer, or owner.",
          "required": false
        },
        "permission_type": {
          "type": "string",
          "description": "user, group, domain, or anyone.",
          "required": false
        }
      }
    },
    "add_sheet": {
      "description": "Add a new tab to a spreadsheet.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "new_sheet_name": {
          "type": "string",
          "description": "New tab name.",
          "required": true
        }
      }
    },
    "delete_sheet": {
      "description": "Delete a tab by name, id, or index.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Tab name.",
          "required": false
        },
        "sheet_id": {
          "type": "integer",
          "description": "Numeric sheet id.",
          "required": false
        },
        "sheet_index": {
          "type": "integer",
          "description": "Zero-based tab index.",
          "required": false
        }
      }
    },
    "rename_sheet": {
      "description": "Rename a tab by name, id, or index.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "new_sheet_name": {
          "type": "string",
          "description": "New tab name.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Current tab name.",
          "required": false
        },
        "sheet_id": {
          "type": "integer",
          "description": "Numeric sheet id.",
          "required": false
        },
        "sheet_index": {
          "type": "integer",
          "description": "Zero-based tab index.",
          "required": false
        }
      }
    },
    "sort": {
      "description": "Sort a range, preferably by header name.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name when range is bare A1 notation.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "A1 range to sort.",
          "required": true
        },
        "sort_specs": {
          "type": "array",
          "description": "Sort specs with header/column_name or dimensionIndex and order/sortOrder.",
          "required": true,
          "items": {
            "type": "object"
          }
        }
      }
    },
    "find_replace": {
      "description": "Find and replace text across the spreadsheet or one sheet.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "find": {
          "type": "string",
          "description": "Text or regex to find.",
          "required": true
        },
        "replacement": {
          "type": "string",
          "description": "Replacement text.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab limit.",
          "required": false
        },
        "match_case": {
          "type": "boolean",
          "description": "Case-sensitive match.",
          "required": false
        },
        "match_entire_cell": {
          "type": "boolean",
          "description": "Match entire cell contents only.",
          "required": false
        },
        "search_by_regex": {
          "type": "boolean",
          "description": "Treat find as regex.",
          "required": false
        }
      }
    },
    "format_cells": {
      "description": "Apply cell formatting or number format to a range.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "A1 range to format.",
          "required": true
        },
        "cell_format": {
          "type": "object",
          "description": "Text/background/alignment/wrap formatting.",
          "required": false
        },
        "number_format": {
          "type": "object",
          "description": "Sheets numberFormat object.",
          "required": false
        }
      }
    },
    "protect_range": {
      "description": "Protect a range, optionally warning-only or with explicit editor emails.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "A1 range to protect.",
          "required": true
        },
        "description": {
          "type": "string",
          "description": "Protection description.",
          "required": false
        },
        "warning_only": {
          "type": "boolean",
          "description": "If true, warn instead of blocking edits.",
          "required": false
        },
        "editor_emails": {
          "type": "array",
          "description": "Users allowed to edit protected range.",
          "required": false,
          "items": {
            "type": "string"
          }
        }
      }
    },
    "unprotect_range": {
      "description": "Remove protection by protected range id.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "protected_range_id": {
          "type": "integer",
          "description": "Google protectedRangeId to delete.",
          "required": true
        }
      }
    },
    "add_named_range": {
      "description": "Create a named range.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "A1 range.",
          "required": true
        },
        "name": {
          "type": "string",
          "description": "Named range name.",
          "required": true
        }
      }
    },
    "delete_named_range": {
      "description": "Delete a named range by id.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "named_range_id": {
          "type": "string",
          "description": "Google namedRangeId to delete.",
          "required": true
        }
      }
    },
    "set_data_validation": {
      "description": "Set a Sheets data validation rule on a range.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "A1 range.",
          "required": true
        },
        "validation_rule": {
          "type": "object",
          "description": "Sheets DataValidationRule object.",
          "required": true
        }
      }
    },
    "add_conditional_formatting": {
      "description": "Add a conditional formatting rule to a range.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "range": {
          "type": "string",
          "description": "A1 range for the rule.",
          "required": true
        },
        "rule": {
          "type": "object",
          "description": "Sheets ConditionalFormatRule object; ranges can be omitted.",
          "required": true
        }
      }
    },
    "copy_paste": {
      "description": "Copy a source range to a destination range.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "source_range": {
          "type": "string",
          "description": "A1 source range.",
          "required": true
        },
        "destination_range": {
          "type": "string",
          "description": "A1 destination range.",
          "required": true
        },
        "paste_type": {
          "type": "string",
          "description": "Sheets pasteType such as PASTE_NORMAL or PASTE_VALUES.",
          "required": false
        },
        "paste_orientation": {
          "type": "string",
          "description": "NORMAL or TRANSPOSE.",
          "required": false
        }
      }
    },
    "cut_paste": {
      "description": "Move a source range to a destination start cell.",
      "properties": {
        "spreadsheet_id": {
          "type": "string",
          "description": "Google spreadsheet id or URL.",
          "required": true
        },
        "sheet_name": {
          "type": "string",
          "description": "Optional tab name.",
          "required": false
        },
        "source_range": {
          "type": "string",
          "description": "A1 source range.",
          "required": true
        },
        "destination_range": {
          "type": "string",
          "description": "A1 destination start cell.",
          "required": true
        },
        "paste_type": {
          "type": "string",
          "description": "Sheets pasteType such as PASTE_NORMAL or PASTE_VALUES.",
          "required": false
        }
      }
    }
  }
}
```

### Usage Instructions

# Google Sheets

Use short action names. Prefer `read`, `append_rows`, `append_column`, `update_row`, and `export_sheet` for common workflows.

Safety rules:
- Do not guess a tab is named `Sheet1`; omit `sheet_name` or call `list_sheets`.
- Do not calculate append row or column positions; use `append_rows` or `append_column`.
- `append_rows` appends at the true table end. `append_column` writes after the last non-empty data column, not at a blank default grid edge.
- Do not overwrite full rows when only selected fields changed; use `update_row` with `updates`.
- Use `export_sheet` for CSV/TSV/PDF/XLSX/ODS/HTML/ZIP exports. Specific-sheet rendered exports use an official temporary-spreadsheet flow.

Examples:
```json
{"action":"read","spreadsheet_id":"1abc...","sheet_name":"Leads","range":"A1:D20"}
```
```json
{"action":"append_rows","spreadsheet_id":"1abc...","sheet_name":"Leads","rows":[{"Name":"Ada","Status":"New"}]}
```
```json
{"action":"append_column","spreadsheet_id":"1abc...","sheet_name":"Leads","column_name":"Owner","column_values":["Sam","Riley"]}
```
```json
{"action":"update_row","spreadsheet_id":"1abc...","sheet_name":"Leads","key_column":"Email","key_value":"ada@example.com","updates":{"Status":"Qualified","Owner":"Sam"}}
```
```json
{"action":"export_sheet","spreadsheet_id":"1abc...","sheet_name":"Leads","format":"pdf","filename":"leads.pdf"}
```

### Frequently Asked Questions

#### How do I connect this tool to an external agent?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

You can install the local MCP server by opening a terminal and running:

```
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

This will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.

Alternatively you can connect to the hosted version with this config block, no installation required:

```
{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}
```

[View MCP Connection Instructions](/docs/mcp-reference/connection) for more details.

#### How does an external agent use this tool?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:

> Use the AgentPMT-Tool-Search-and-Execution tool. First call action 'get\_instructions' so you know how to use the tool search interface. Then call action 'get\_schema' with tool\_id 696302894cf4309309cac7b2 ("Google Sheets"). After reading the schema and any returned instructions, tell me what this tool can do, we are going to be using it

The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.

### Dependencies

This product has no public dependency products.