• Tools
Tools
  • Tools
loading...
No Results
  • ActiveCampaign
  • AirDroid Business
    • Index
    • Batch Resolve Device and Group IDs by Name
    • Batch Resolve Device IDs by Name
    • Batch Resolve Group IDs by Name
    • Batch Get Devices by Device or Group IDs
    • Clear app data and cache
    • Create a group
    • Delete groups
    • Delete Provisioning Templates
    • Disable lost mode
    • Error codes
    • Enable lost mode
    • Field reference
    • Get average screen time
    • Get account activities
    • Get a Configuration
    • Get a device by name
    • Get a device app by name
    • Get a group
    • Get a group id by group name
    • Get a Provisioning Template
    • Get an activity log
    • Get all devices
    • Get all device apps
    • Get all devices with filter
    • Get Config File Deployment Status
    • 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
    • Generate Device Owner Enrollment QR for Template
    • List Groups
    • List Policy and Kiosk Configurations
    • List Provisioning Templates
    • Lock a device
    • Move devices to a group
    • Open app to foreground
    • Power off a device
    • Reboot device
    • Remote operation
    • Search Groups
    • 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
  • Adalo
  • Appstore
  • Asana
  • AWS Lambda
  • AWS-S3
  • BambooHR
  • Bitbucket
  • Brevo
  • Clockify
  • Coda
  • ConvertKit
  • DingTalk
  • Discord
  • Discourse
  • Dropbox
  • Elasticsearch
  • Elastic Security
  • FeiShu
  • Firecrawl
  • Freshdesk
  • Freshservice
  • Freshworks CRM
  • Gerrit
  • Github
  • Gitlab
  • Google Ads
  • Google Analytics
  • Google Calendar
  • Google Developer
  • Google Docs
  • Google Drive
  • Google Gmail
  • Google Sheets
  • Grafana
  • Hacker News
  • HaloPSA
  • Harvest
  • Help Scout
  • Hubspot
  • Intercom
  • Jenkins
  • Jira
  • Kafka
  • Lemlist
  • Linear
  • Magento
  • MailChimp
  • Mautic
  • Metabase
  • Microsoft Excel
  • Microsoft OneDrive
  • Microsoft Outlook
  • Microsoft Sharepoint
  • Microsoft Teams
  • Microsoft To Do
  • monday.com
  • MySQL
  • Nextcloud
  • Notion
  • Odoo
  • Okta
  • OpenAI
  • Ortto
  • Paddle
  • PayPal
  • Pipedrive
  • PostgreSQL
  • PostHog
  • Qdrant
  • QuickBooks
  • Redis
  • Segment
  • SendGrid
  • ServiceNow
  • Shopify
  • Slack
  • Splunk
  • Spotify
  • Strapi
  • Stripe
  • System Tools
    • Code
    • CSV
    • Crypto
    • Data Shaping
    • Date & Time
    • Delay
    • Documents
    • QRCode
    • Search&Crawl
    • Text
    • Xml
  • Teambition
  • Telegram
  • Todoist
  • Trello
  • Twilio
  • Webflow
  • Wekan
  • Wikipedia
  • WooCommerce
  • WordPress
  • X
  • YouTube
  • Zammad
  • Zendesk
  • Zoho CRM
  • Zoom
  • Zulip
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: either all operations succeed or all fail.

Common operations include insertText (add paragraphs or headers), deleteContentRange (remove content), updateTextStyle (format text), insertTable (add structured data), and insertPageBreak (separate sections). Use Get a Document to find the correct document index. location.index is 1 at the start of the document body, and text supports \n line breaks.

[
  {"insertText": {"location": {"index": 1}, "text": "Hello World\n"}},
  {"deleteContentRange": {"range": {"startIndex": 1, "endIndex": 10}}},
  {"updateTextStyle": {"range": {"startIndex": 1, "endIndex": 10}, "textStyle": {"bold": true}, "fields": "bold"}},
  {"insertTable": {"rows": 3, "columns": 3, "location": {"index": 1}}},
  {"insertPageBreak": {"location": {"index": 1}}}
]

To insert text and then make it bold, send both operations in the same request:

[
  {"insertText": {"location": {"index": 1}, "text": "Title\n"}},
  {"updateTextStyle": {"range": {"startIndex": 1, "endIndex": 6}, "textStyle": {"bold": true}, "fields": "bold"}}
]

For the complete operation list, see the Google Docs API Request reference.

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 has a key matching its request type.
[
  {"insertText": {"contentRange": {"startIndex": 1, "endIndex": 12}}},
  {"deleteContentRange": {}},
  {"updateTextStyle": {}},
  {"insertTable": {}}
]

An insertText reply returns the inserted range, which you can use in a follow-up request to apply formatting. Empty objects for the other operations indicate success. Check Replies to verify every operation; see the Google Docs API Response reference for the complete schema.

  • 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 Requests parameter in the "Update a Document" operation?

A: The Requests parameter expects 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, provide [{"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: Jul 14, 2026
Was This Page Helpful?
Prev Google Developer
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