Google Docs
Integration for Google Docs. Through Langdock’s integration, you can access and manage Google Docs directly from your conversations.
Authentication: OAuth Category: Google Workspace Availability: All workspace plans
Available Actions
Get Document
googledocs.getDocument
Retrieve Google Docs content with flexible options
Requires Confirmation: No
Parameters:
documentId(TEXT, Required): The ID of the Google Doc to retrieve. This is the string of characters in the URL after ‘document/d/’ when viewing the documentextractPlainTextOnly(BOOLEAN, Optional): When true, returns only the plain text content of the document without formattingmetadataOnly(BOOLEAN, Optional): When true, returns only the document metadata without the full contentincludeTabsContent(BOOLEAN, Optional): When true, returns document with tabs structure populated. When false or unspecified, returns content from the first tab only
Output: Returns document content with the following structure:
documentId: Document IDtitle: Document titlebody: Document body content (if not metadata only)plainText: Plain text content (if extractPlainTextOnly is true)viewUrl: URL to view the document in Google DocsretrievedAt: Timestamp when the document was retrievedhasMultipleTabs: Whether the document has multiple tabs (if includeTabsContent is true)tabs: Array of tab objects (if includeTabsContent is true)metadata: Document metadata including creation time, modification time, owners, etc.
Search File
googledocs.searchFile
Search for Google Docs documents in your Google Drive using flexible filters such as document name, owner, modification date, folder, and sharing status
Requires Confirmation: No
Parameters:
nameContains(TEXT, Optional): Only return documents whose name contains this text. Partial and case-insensitive matches are allowedowner(TEXT, Optional): Only return documents owned by this email address. Leave blank to include documents from any ownermodifiedAfter(TEXT, Optional): Only return documents modified after this date (inclusive). Use ISO format (e.g., 2024-05-01)modifiedBefore(TEXT, Optional): Only return documents modified before this date (exclusive). Use ISO format (e.g., 2024-06-01)folder(TEXT, Optional): Only return documents located in this folder. Provide the folder ID. Leave blank for all foldersmaximumResults(TEXT, Optional): The maximum number of documents to return. Leave blank to use the default (5000). The maximum allowed is 10,000
Output: Returns an array of document search results with the following structure:
id: Document IDname: Document namemimeType: Document MIME typecreatedTime: Creation timestampmodifiedTime: Last modification timestampowners: Array of owner informationwebViewLink: Link to view the documentsize: File size in bytesdescription: Document descriptionproperties: Custom propertiesappProperties: Application-specific properties
Update Document
googledocs.updateDocument
Update a Google Docs document
Requires Confirmation: No
Parameters:
documentId(TEXT, Required): The ID of the Google Doc to update. This is the string of characters in the URL after ‘document/d/’ when viewing the document, you can also retrieve it via the search file toolmarkdownText(MULTI_LINE_TEXT, Optional): Optional raw Markdown to append and convert to native Google Docs formatting (supports headings #..######, lists -, *, 1., and bold text).tab_id(TEXT, Optional): Optional: ID of the tab to target. If omitted, defaults to first tab.tab_title(TEXT, Optional): Optional: Title of the tab to target (used if Tab ID is not provided).anchor_text(TEXT, Optional): Optional: Insert content immediately after the paragraph that contains this text in the selected tab. If not provided, content is appended to the end of the tab.anchor_match_case(BOOLEAN, Optional): Optional: When true, the anchor text match is case-sensitive.actions(OBJECT, Optional): Available Actions
Available operations (summary)
Text operations
Inserting text: by exact character index or safely via endOfSegmentLocation
Replacing text: specify containsText and replaceText (optional matchCase)
Deleting content: specify a range with startIndex and endIndex
Formatting operations
Styling text: range + textStyle + fields
Styling paragraphs: range (whole paragraphs) + paragraphStyle + fields
Document-wide styling: documentStyle + fields (background color requires RGB nested structure)
List operations
Create bullet/numbered lists: range of complete paragraphs + bulletPreset
Remove list formatting: specify range covering list items
Structural elements
Create tables: rows, columns (>=1) + endOfSegmentLocation (retrieve doc to get cell indices before populating)
Insert table rows/columns: tableCellLocation + insertBelow/insertRight controls
Delete table rows/columns: provide tableRowIndex/tableColumnIndex + tableStartLocation
Images
Insert image: location index, URI, objectSize (width/height with magnitude and unit)
Page breaks
Insert page break: specify a valid location index
Headers & footers
Create header/footer: type ("DEFAULT", "FIRST_PAGE", "EVEN_PAGE"). Retrieve doc after creation to get the header/footer ID before adding content
Footnotes
Insert footnote: provide location index (creates empty footnote to populate later)
Reference operations
Create named ranges: provide name + startIndex and endIndex (retrieve doc to get generated range ID)
Note: These operations can be combined in a batch update request. Some operations have dependencies (e.g., insert text before formatting it; create tables before adding content to cells; create headers/footers before populating them).
Output: Returns confirmation of the document update
Common Use Cases
Data Management — Manage and organize your Google Docs data
Automation — Automate workflows with Google Docs
Reporting — Generate insights and reports
Integration — Connect Google Docs with other tools
Best Practices
Troubleshooting
Authentication failed
Verify your OAuth credentials
Rate limit exceeded
Reduce request frequency
Data not found
Check permissions and data availability
Connection timeout
Verify network connectivity
Support
For additional help with the Google Docs integration, contact [email protected]

