Google Docs is Google’s collaborative, cloud-based document service, enabling users to create, edit, and share documents in real time. As an integral part of Google Workspace, Docs offers rich formatting tools, commenting, version history, and seamless integration with other Google productivity tools.
Google Docs empowers individuals and teams to:
- Create and format documents: Develop rich text documents with advanced formatting, images, and tables.
- Collaborate and comment: Multiple users can edit and comment with suggestions instantly.
- Track changes and version history: Review, revert, and manage revisions over time.
- Access from any device: Work on documents from web, mobile, or desktop with full cloud synchronization.
- Integrate across Google services: Connect Docs with Drive, Sheets, Slides, and external platforms for powerful workflows.
In Aptlystar, the Google Docs integration allows your agents to read document content, write new content, and create documents programmatically as part of automated workflows. This integration unlocks automation such as document generation, report writing, content extraction, and collaborative editing—bridging the gap between AI-driven workflows and document management in your organization.
Integrate Google Docs into the workflow. Read, write, and create documents, insert text, tables, images, and page breaks, find and replace text, and apply text styling.
Read content from a Google Docs document
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | Google Docs document ID |
| Parameter | Type | Description |
|---|
content | string | Extracted document text content |
metadata | json | Document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |
Append content to a Google Docs document. Content is inserted literally; Markdown is not interpreted. For formatted output from Markdown, use the Create operation with the markdown toggle enabled.
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | The ID of the document to write to |
content | string | Yes | The content to write to the document |
| Parameter | Type | Description |
|---|
updatedContent | boolean | Indicates if document content was updated successfully |
metadata | json | Updated document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |
Create a new Google Docs document
| Parameter | Type | Required | Description |
|---|
title | string | Yes | The title of the document to create |
content | string | No | The content of the document to create |
folderSelector | string | No | Google Drive folder ID to create the document in (e.g., 1ABCxyz...) |
folderId | string | No | The ID of the folder to create the document in (internal use) |
markdown | boolean | No | When true, content is interpreted as Markdown and converted to formatted Google Docs content (headings, bold/italic, lists, tables, links, code blocks, blockquotes). Default: false (content inserted as plain text). |
| Parameter | Type | Description |
|---|
metadata | json | Created document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |
Insert text at a specific index in a Google Docs document. When no index is provided, text is appended to the end of the document. Text is inserted literally; Markdown is not interpreted.
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | The ID of the document to insert text into |
text | string | Yes | The text to insert |
index | number | No | The 1-based character index at which to insert the text. When omitted, text is appended to the end of the document. |
| Parameter | Type | Description |
|---|
updatedContent | boolean | Indicates if text was inserted successfully |
metadata | json | Updated document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |
Replace all occurrences of a search string with new text across a Google Docs document.
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | The ID of the document to update |
searchText | string | Yes | The text to find |
replaceText | string | No | The text to replace matches with. Use an empty string to delete matches. |
matchCase | boolean | No | Whether the search should be case sensitive. Defaults to false. |
| Parameter | Type | Description |
|---|
occurrencesChanged | number | The number of occurrences that were replaced |
metadata | json | Updated document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |
Insert an empty table with the given number of rows and columns into a Google Docs document. When no index is provided, the table is appended to the end of the document.
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | The ID of the document to insert the table into |
rows | number | Yes | The number of rows in the table |
columns | number | Yes | The number of columns in the table |
index | number | No | The 1-based character index at which to insert the table. When omitted, the table is appended to the end of the document. |
| Parameter | Type | Description |
|---|
updatedContent | boolean | Indicates if the table was inserted successfully |
metadata | json | Updated document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |
Insert an inline image from a public URL into a Google Docs document. The image must be publicly accessible and under 50 MB. When no index is provided, the image is appended to the end of the document.
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | The ID of the document to insert the image into |
imageUrl | string | Yes | The publicly accessible URL of the image to insert |
index | number | No | The 1-based character index at which to insert the image. When omitted, the image is appended to the end of the document. |
width | number | No | Optional image width in points (PT) |
height | number | No | Optional image height in points (PT) |
| Parameter | Type | Description |
|---|
objectId | string | The ID of the inserted inline image object |
metadata | json | Updated document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |
Insert a page break into a Google Docs document. When no index is provided, the page break is appended to the end of the document.
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | The ID of the document to insert the page break into |
index | number | No | The 1-based character index at which to insert the page break. When omitted, the page break is appended to the end of the document. |
| Parameter | Type | Description |
|---|
updatedContent | boolean | Indicates if the page break was inserted successfully |
metadata | json | Updated document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |
Apply bold, italic, underline, and/or font size to a range of text in a Google Docs document, identified by its start and end character index.
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | The ID of the document to update |
startIndex | number | Yes | The 1-based start character index of the range to style (inclusive) |
endIndex | number | Yes | The end character index of the range to style (exclusive) |
bold | boolean | No | Whether to make the text bold |
italic | boolean | No | Whether to make the text italic |
underline | boolean | No | Whether to underline the text |
fontSize | number | No | The font size to apply, in points (PT) |
| Parameter | Type | Description |
|---|
updatedContent | boolean | Indicates if the text style was applied successfully |
metadata | json | Updated document metadata including ID, title, and URL |
↳ documentId | string | Google Docs document ID |
↳ title | string | Document title |
↳ mimeType | string | Document MIME type |
↳ url | string | Document URL |