• Tools
Tools
  • Tools
loading...
No Results
  • AirDroid Business
    • Index
    • Clear app data and cache
    • Create a group
    • Delete groups
    • Disable lost mode
    • Error codes
    • Enable lost mode
    • Field reference
    • Get average screen time
    • Get account activities
    • Get a group
    • Get a group id by group name
    • Get a device by name
    • Get a device app by name
    • Get an activity log
    • Get all devices
    • Get all device apps
    • Get all devices with filter
    • Get device info push
    • Get device location report
    • Get device network connection history
    • Get device application usage duration
    • Get device application report
    • Get device online status report
    • Get device remote access report
    • Get data usage overview and trends
    • Get tag ids by tag names
    • Get top 10 apps by usage duration
    • Get top 10 data usage apps
    • Lock a device
    • Move devices to a group
    • Open app to foreground
    • Power off a device
    • Reboot device
    • Remote operation
    • Set tags
    • Turn off device screen
    • Unenroll a device
    • Update a device name
    • Update a device remark
    • Update a group name
    • Update a group remark
  • ActiveCampaign
  • Asana
  • AWS-S3
  • AWS Lambda
  • Appstore
  • BambooHR
  • Bitbucket
  • Brevo
  • Coda
  • Code
  • ConvertKit
  • CSV
  • Crypto
  • Clockify
  • Data Shaping
  • Date & Time
  • Delay
  • DingTalk
  • Discourse
  • Discord
  • Dropbox
  • Elastic Security
  • FeiShu
  • Firecrawl
  • Freshdesk
  • Freshservice
  • Freshworks CRM
  • Gerrit
  • Gitlab
  • Github
  • Grafana
  • Google Ads
  • Google Docs
  • Google Drive
  • Google Gmail
  • Google Sheets
  • Google Analytics
  • Google Calendar
  • Google Developer
  • Harvest
  • HaloPSA
  • Hacker News
  • Hubspot
  • Help Scout
  • Intercom
  • Jira
  • Jenkins
  • Kafka
  • Lemlist
  • MySQL
  • Monday
  • Metabase
  • MailChimp
  • Microsoft To Do
  • Microsoft Excel
  • Microsoft OneDrive
  • Microsoft Outlook
  • Notion
  • Nextcloud
  • Odoo
  • Ortto
  • Okta
  • PayPal
  • Paddle
  • Pipedrive
  • PostHog
  • PostgreSQL
  • Qdrant
  • QRCode
  • QuickBooks
  • Redis
  • Strapi
  • Stripe
  • Splunk
  • Shopify
  • Segment
  • ServiceNow
  • Search&Crawl
  • Text
  • Trello
  • Twilio
  • Todoist
  • Webflow
  • Wikipedia
  • WordPress
  • WooCommerce
  • Xml
  • YouTube
  • Zulip
  • Zoom
  • Zendesk
  • Zammad
  • Zoho CRM
Home > Tools

Google Docs

1. Overview

Google Docs is a cloud-based word processing application that allows for real-time collaboration and document creation. It is part of the free, web-based Google Docs Editors suite offered by Google.

The GoInsight Google Docs node enables you to integrate document management directly into your automated workflows. You can programmatically create, retrieve, and modify documents, streamlining processes like report generation, content management, and automated communication. Key capabilities include:

  • Creating new blank documents with a specified title.
  • Retrieving the full content and metadata of existing documents.
  • Updating documents with text, formatting, and other structural changes.

2. Prerequisites

Before using this node, you will need to have a valid Google Docs account. You may also need appropriate permissions within your Google Cloud Platform project to create and manage the API credentials required to connect to the Google Docs API.

3. Credentials

For a detailed guide on how to obtain and configure credentials, please refer to our official documentation: Credentials Configuration Guide.

4. Supported Operations

Summary

This node primarily operates on the Document resource, allowing you to create, retrieve, and update Google Docs documents.

Resource Operation Description
Document Create a Document Creates a new blank Google Docs document with an optional title. The document is saved to the user's root folder in Google Drive by default.
Document Get a Document Retrieves the content and metadata of a specified Google Docs document by document ID.
Document Update a Document Batch updates a Google Docs document. Supports multiple operations (insert text, delete content, update styles, insert tables, etc.) in a single request. All operations are atomic: they either all succeed or all fail together, no partial updates. Each successful update generates a new RevisionId visible in the document's version history.

Operation Details

Create a Document

Creates a new blank Google Docs document with an optional title. The document is saved to the user's root folder in Google Drive by default.

Options:

  • Title: The title of the document to be created (optional, creates untitled document if empty)

Output:

  • DocumentId (string): The unique identifier of the newly created document. Use this ID to reference the document in other Google Docs API calls.
  • DocumentUrl (string): The URL to access and edit the document in browser. Users can click this link to open the document directly.
  • Title (string): The title of the created document. If no title was provided during creation, this will be 'Untitled document'.
  • RevisionId (string): The revision ID of the document (valid for 24 hours). Used for tracking document versions and can be used with the Google Docs API to retrieve specific document snapshots. Most users can ignore this field.
  • OriginalStatusCode (number): The original HTTP status code returned by the Google Docs API. Default 0 means the request did not reach upstream (e.g., timeout or exception). Use for debugging.
  • StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (network timeout/connection failure).
  • ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.

Get a Document

Retrieves the content and metadata of a specified Google Docs document by document ID.

Input Parameters:

  • DocumentId: The unique identifier of the Google Docs document to retrieve (required). How to get it: 1) From the document URL: https://docs.google.com/document/d/[DocumentId]/edit. 2) By calling the Create a Document action (returns DocumentId in response). Example: '1ABC2DefGHI3jklMNOpqrSTUvwxYZ'.

Output:

  • DocumentId (string): The unique identifier of the retrieved document.
  • Title (string): The title of the document.
  • Body (object): The body content of the document (object format). Contains a 'content' array of structural elements (paragraphs, tables, lists, section breaks, etc.). Each paragraph element has an 'elements' array containing text runs with 'content' fields. Example path to text: Body.content[].paragraph.elements[].textRun.content. For detailed structure, see: https://developers.google.com/docs/api/reference/rest/v1/documents#Body
  • RevisionId (string): The revision ID of the document. Used for tracking document versions and can be used with the Google Docs API to retrieve specific document snapshots. Most users can ignore this field.
  • DocumentUrl (string): The URL to access and edit the document in browser.
  • OriginalStatusCode (number): The original HTTP status code returned by the Google Docs API. Default 0 means the request did not reach upstream (e.g., timeout or exception). Use for debugging.
  • StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (network timeout/connection failure).
  • ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.

Update a Document

Batch updates a Google Docs document. Supports multiple operations (insert text, delete content, update styles, insert tables, etc.) in a single request. All operations are atomic: they either all succeed or all fail together, no partial updates. Each successful update generates a new RevisionId visible in the document's version history.

Input Parameters:

  • DocumentId: The unique identifier of the Google Docs document to update (required). How to get DocumentId: 1) From the document URL: https://docs.google.com/document/d/[DocumentId]/edit — the DocumentId is the part between '/d/' and '/edit'. Example URL: https://docs.google.com/document/d/1ABC2DefGHI3jklMNOpqrSTUvwxYZ/edit → DocumentId is '1ABC2DefGHI3jklMNOpqrSTUvwxYZ'. 2) From the 'Create a Document' action response (field: DocumentId). 3) From the 'Get a Document' action response (field: DocumentId).
  • Requests: Array of update request objects (required). Each object specifies one operation to apply to the document. All operations are executed atomically (all succeed or all fail). Common operations and use cases: 1. insertText — Add new paragraphs, append content, insert headers: {"insertText": {"location": {"index": 1}, "text": "Hello World"}} - location.index: Position 1 = start of document body (after title). Use Get a Document to find the correct index. - text: Supports newlines (

for line breaks). 2. deleteContentRange — Remove outdated content, clear placeholders: {"deleteContentRange": {"range": {"startIndex": 1, "endIndex": 10}}} - startIndex: Inclusive start position. endIndex: Exclusive end position. 3. updateTextStyle — Format headings, highlight important terms (bold, italic, color, font size): {"updateTextStyle": {"range": {"startIndex": 1, "endIndex": 10}, "textStyle": {"bold": true}, "fields": "bold"}} - fields: Comma-separated style fields to update (e.g., "bold", "italic", "bold,italic", "fontSize", "foregroundColor"). 4. insertTable — Add structured data like pricing tables or comparison charts: {"insertTable": {"rows": 3, "columns": 3, "location": {"index": 1}}} 5. insertPageBreak — Separate report sections: {"insertPageBreak": {"location": {"index": 1}}} Multiple operations example (insert text then bold it): [{"insertText": {"location": {"index": 1}, "text": "Title

"}}, {"updateTextStyle": {"range": {"startIndex": 1, "endIndex": 6}, "textStyle": {"bold": true}, "fields": "bold"}}] Full operation list: https://developers.google.com/docs/api/reference/rest/v1/documents/request

Output:

  • DocumentId (string): The unique identifier of the updated document.
  • RevisionId (string): The revision ID (version number) of the document after the update. A new RevisionId is automatically generated on each successful update. You can use it to track document modification history.
  • Replies (object-array): Array of reply objects from the API, one per request in the same order. Each reply object has a single key matching the request type (e.g., 'insertText', 'deleteContentRange'), with operation-specific result data as the value. Common reply structures: - insertText: {"insertText": {"contentRange": {"startIndex": 1, "endIndex": 12}}} — returns the range of inserted text. Use this range to apply formatting to the inserted content in a follow-up call. - deleteContentRange: {"deleteContentRange": {}} — empty object on success. - updateTextStyle: {"updateTextStyle": {}} — empty object on success. - insertTable: {"insertTable": {}} — empty object on success. Usage: Check Replies to verify each operation succeeded. Use returned ranges (e.g., from insertText) to chain follow-up operations like formatting. Full reply schema: https://developers.google.com/docs/api/reference/rest/v1/documents/request#Response
  • DocumentUrl (string): The URL to access and edit the document in browser.
  • OriginalStatusCode (number): The original HTTP status code returned by the Google Docs API. Default 0 means the request did not reach upstream (e.g., timeout or exception). Use for debugging.
  • StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (network timeout/connection failure).
  • ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.

5. Example Usage

This section will guide you through creating a simple workflow that automatically generates a new Google Docs document.

The workflow will consist of three nodes: Start -> Google Docs: Create a Document -> Answer.

Step-by-Step Guide

  1. Add the Tool Node:
    • In your workflow canvas, click the + button to add a new node.
    • Select the "Tools" tab in the pop-up panel.
    • Find and select "Google Docs" from the list of available tools.
    • From the list of operations for Google Docs, click on "Create a Document" to add the node to your canvas.
  2. Configure the Node:
    • Click on the newly added "Create a Document" node to open its configuration panel on the right.
    • Credentials: In the credentials field at the top of the panel, click the dropdown menu and select your pre-configured Google Docs credential.
    • Parameters: Locate the "Options" section to fill in the node's parameters.
    • Title: Enter a title for your new document. For example, you could type "Automated Weekly Report". If you leave this field blank, an "Untitled document" will be created.
  3. Run and Validate:
    • Once the required parameters are filled, any error indicators on the workflow canvas should disappear.
    • Click the "Run" button in the top-right corner of the canvas to execute the workflow.
    • After a successful run, you can click the log icon (also in the top-right) to view the detailed inputs and outputs of the node. You should see the DocumentId and DocumentUrl of the newly created document in the output section.

After completing these steps, your workflow is fully configured. When executed, it will create a new document in your Google Drive with the title you specified.

6. FAQs

Q: I'm getting a 403 Forbidden error when the node runs. What's wrong?

A: A 403 error typically indicates a permissions issue with the Google API. Please check the following:

  • Ensure the Google Docs API is enabled in your Google Cloud Platform project.
  • Verify that your OAuth consent screen is properly configured and that your application has the necessary scopes (e.g., https://www.googleapis.com/auth/documents).
  • Make sure the user account associated with the credential has permission to create or access documents.

Q: How can I find the DocumentId for an existing document?

A: You can find the DocumentId directly from the document's URL in your web browser. The URL structure is typically https://docs.google.com/document/d/DOCUMENT_ID/edit. The DocumentId is the long string of letters, numbers, and symbols between /d/ and /edit.

Q: What is the correct format for the RequestsJson parameter in the "Update a Document" operation?

A: The RequestsJson parameter expects a JSON string that represents an array of Request objects as defined by the official Google Docs API. Each object specifies a single update to perform. For example, to insert text at the beginning of a document, the JSON string would look like this: [{"insertText":{"location":{"index":1},"text":"Hello, World!"}}]. For a complete list of possible requests, please refer to the official API documentation.

7. Official Documentation

For more advanced use cases and detailed information about the API, please refer to the Google Docs API Official Documentation.

Updated on: Mar 25, 2026
Was This Page Helpful?
Prev Google Ads
Next Google Drive
Discussion

Leave a Reply. Cancel reply

Your email address will not be published. Required fields are marked*

Product-related questions?Contact Our Support Team to Get a Quick Solution>
On this page
  • 1. Overview
  • 2. Prerequisites
  • 3. Credentials
  • 4. Supported Operations
    • Summary
    • Operation Details
  • 5. Example Usage
    • Step-by-Step Guide
  • 6. FAQs
  • 7. Official Documentation
loading...
No Results