Google Docs
16 tools • OpenAPI spec ↗
GETget_document/documents/:documentIdGet a Google Doc by ID. Returns full document structure including body, headers, footers, lists, and styles.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc to retrieve. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| suggestionsViewMode | string | No | How to render suggestions: 'DEFAULT_FOR_CURRENT_ACCESS', 'SUGGESTIONS_INLINE', 'PREVIEW_SUGGESTIONS_ACCEPTED', or 'PREVIEW_WITHOUT_SUGGESTIONS'. |
| includeTabsContent | boolean | No | Whether to include tab content in the response (default false). |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "get_document"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "get_document",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
GET https://app.ferrule.io/api/v1/google-docs/documents/:documentId Authorization: Bearer <your-api-key> Content-Type: application/json
Response
{
"documentId": null,
"title": null,
"revisionId": null,
"body": null,
"headers": null,
"footers": null,
"footnotes": null,
"lists": null,
"inlineObjects": null,
"namedRanges": null,
"documentStyle": null,
"namedStyles": null
}GETget_document_text/documents/:documentId/textGet the plain text content of a Google Doc. Extracts all text from paragraphs, stripping formatting.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc to extract text from. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "get_document_text"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "get_document_text",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
GET https://app.ferrule.io/api/v1/google-docs/documents/:documentId/text Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTcreate_document/documentsCreate a new empty Google Doc with the given title. Returns the created document.
Request
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| title | string | No | The title for the new document. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "create_document"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "create_document",
"params": {}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents Authorization: Bearer <your-api-key> Content-Type: application/json
Response
{
"documentId": null,
"title": null,
"revisionId": null,
"body": null,
"headers": null,
"footers": null,
"footnotes": null,
"lists": null,
"inlineObjects": null,
"namedRanges": null,
"documentStyle": null,
"namedStyles": null
}POSTinsert_text/documents/:documentId/insert-textInsert text at a specific index in a Google Doc. Index 1 is the beginning of the document body.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| text | string | No | The text to insert. |
| index | number | No | The zero-based index to insert text at. |
| segmentId | string | No | The segment ID (header, footer, or footnote ID). Omit for the document body. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "insert_text"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "insert_text",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/insert-text Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTappend_text/documents/:documentId/append-textAppend text to the end of a Google Doc. Automatically determines the correct insertion index.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| text | string | No | The text to append. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "append_text"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "append_text",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/append-text Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTdelete_content/documents/:documentId/delete-contentDelete content within a range in a Google Doc. Specify start and end indices.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| startIndex | number | No | The start index of the range to delete. |
| endIndex | number | No | The end index of the range to delete. |
| segmentId | string | No | The segment ID (header, footer, or footnote ID). Omit for the document body. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "delete_content"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "delete_content",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/delete-content Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTreplace_all_text/documents/:documentId/replace-all-textFind and replace all occurrences of a text string in a Google Doc.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| findText | string | No | The text to find. |
| replaceText | string | No | The replacement text. |
| matchCase | boolean | No | Whether the search is case-sensitive (default true). |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "replace_all_text"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "replace_all_text",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/replace-all-text Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTupdate_text_style/documents/:documentId/update-text-styleUpdate text formatting (bold, italic, underline, font, color, etc.) for a range within a Google Doc. Only specified properties are changed; others are left unchanged.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| startIndex | number | No | The start index of the range to format. |
| endIndex | number | No | The end index of the range to format. |
| segmentId | string | No | The segment ID (header, footer, or footnote ID). Omit for the document body. |
| bold | boolean | No | Set bold formatting. |
| italic | boolean | No | Set italic formatting. |
| underline | boolean | No | Set underline formatting. |
| strikethrough | boolean | No | Set strikethrough formatting. |
| fontSize | number | No | Font size in points (e.g. 12). |
| fontFamily | string | No | Font family name (e.g. 'Arial', 'Times New Roman'). |
| foregroundColor | object | No | Text foreground color as RGB values (0-1 each). |
| link | string | No | URL to link the text to. Pass empty string to remove link. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "update_text_style"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "update_text_style",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/update-text-style Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTupdate_paragraph_style/documents/:documentId/update-paragraph-styleUpdate paragraph formatting (alignment, spacing, indentation, named style) for a range within a Google Doc. Only specified properties are changed.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| startIndex | number | No | The start index of the range to format. |
| endIndex | number | No | The end index of the range to format. |
| segmentId | string | No | The segment ID (header, footer, or footnote ID). Omit for the document body. |
| namedStyleType | string | No | Named style: 'NORMAL_TEXT', 'TITLE', 'SUBTITLE', 'HEADING_1' through 'HEADING_6'. |
| alignment | string | No | Paragraph alignment: 'START', 'CENTER', 'END', 'JUSTIFIED'. |
| lineSpacing | number | No | Line spacing as a percentage (e.g. 100 for single, 200 for double). |
| spaceAbove | number | No | Space above the paragraph in points. |
| spaceBelow | number | No | Space below the paragraph in points. |
| indentStart | number | No | Start (left) indentation in points. |
| indentEnd | number | No | End (right) indentation in points. |
| indentFirstLine | number | No | First line indentation in points. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "update_paragraph_style"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "update_paragraph_style",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/update-paragraph-style Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTmanage_bullets/documents/:documentId/manage-bulletsAdd or remove bullet/numbered list formatting for paragraphs in a range.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| startIndex | number | No | The start index of the range. |
| endIndex | number | No | The end index of the range. |
| segmentId | string | No | The segment ID (header, footer, or footnote ID). Omit for the document body. |
| action | string | No | Whether to 'add' or 'remove' bullets. |
| bulletPreset | string | No | Bullet preset when adding (e.g. 'BULLET_DISC_CIRCLE_SQUARE', 'NUMBERED_DECIMAL_ALPHA_ROMAN'). Defaults to 'BULLET_DISC_CIRCLE_SQUARE'. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "manage_bullets"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "manage_bullets",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/manage-bullets Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTinsert_table/documents/:documentId/insert-tableInsert a table at a specific index in a Google Doc.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| index | number | No | The index in the document to insert the table at. |
| rows | number | No | The number of rows for the new table. |
| columns | number | No | The number of columns for the new table. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "insert_table"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "insert_table",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/insert-table Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTmodify_table/documents/:documentId/modify-tableModify a table in a Google Doc. Supports inserting/deleting rows and columns.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | string | No | The table modification action: 'insertRow', 'insertColumn', 'deleteRow', or 'deleteColumn'. |
| tableStartIndex | number | No | The start index of the table in the document. |
| rowIndex | number | No | The row index for insert/delete row operations. |
| columnIndex | number | No | The column index for insert/delete column operations. |
| insertBelow | boolean | No | For insertRow: insert below (true) or above (false) the reference row. Default true. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "modify_table"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "modify_table",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/modify-table Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTinsert_page_break/documents/:documentId/insert-page-breakInsert a page break at a specific index in a Google Doc.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| index | number | No | The index in the document to insert the page break at. |
| segmentId | string | No | The segment ID (header, footer, or footnote ID). Omit for the document body. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "insert_page_break"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "insert_page_break",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/insert-page-break Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTinsert_inline_image/documents/:documentId/insert-inline-imageInsert an inline image from a URL at a specific index in a Google Doc.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| index | number | No | The index in the document to insert the image at. |
| uri | string | No | The URL of the image to insert. |
| width | number | No | Image width in points. Omit to use the image's natural size. |
| height | number | No | Image height in points. Omit to use the image's natural size. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "insert_inline_image"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "insert_inline_image",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/insert-inline-image Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API
POSTbatch_update/documents/:documentId/batch-updateSend a raw batchUpdate request to the Google Docs API. Use this for complex or multi-step document modifications not covered by other tools. Accepts an array of request objects per the Google Docs API spec.
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| documentId | string | Yes | The ID of the Google Doc. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| requests | array | No | Array of request objects per the Google Docs batchUpdate API spec. |
Response
Examples
1. Describe method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_method",
"arguments": {
"service": "google-docs",
"method": "batch_update"
}
}
}2. Call method
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "call_google-docs",
"arguments": {
"method": "batch_update",
"params": {
"documentId": "<documentId>"
}
}
}
}Request
POST https://app.ferrule.io/api/v1/google-docs/documents/:documentId/batch-update Authorization: Bearer <your-api-key> Content-Type: application/json
Response
// Raw JSON from upstream API