All data sources

Google Docs

OAuthdocs

Google Docs connector for reading and editing documents (read & write). CRITICAL USAGE RULES: 1. Provide documentId from the Docs URL (https://docs.google.com/document/d/{documentId}/edit). 2. Use getDocument() for full structural data; getDocumentText() to quickly extract plain text. 3. Use batchUpdate operations for insertText, updateParagraph, and applyFormatting.

Provenance

PublisherGoogle Docs

Freshness & coverage

FreshnessFreshness not declared
GeographicNot declared
TemporalNot declared
AuthenticationCredentials required (OAuth)

Methods (6)

  • createDocument

    write

    Create a new Google Docs document.

    Required paramstitle
    Input schema
    {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "Document title."
        }
      },
      "required": [
        "title"
      ],
      "additionalProperties": true
    }
  • getDocument

    read

    Fetch the full Google Docs structural payload.

    Required paramsdocumentId
    Input schema
    {
      "type": "object",
      "properties": {
        "documentId": {
          "type": "string",
          "description": "Google Docs document ID."
        }
      },
      "required": [
        "documentId"
      ],
      "additionalProperties": true
    }
  • getDocumentText

    read

    Extract plain text from a Google Docs document.

    Required paramsdocumentId
    Input schema
    {
      "type": "object",
      "properties": {
        "documentId": {
          "type": "string",
          "description": "Google Docs document ID."
        }
      },
      "required": [
        "documentId"
      ],
      "additionalProperties": true
    }
  • insertText

    write

    Insert text into a Google Docs document at a 1-based character index. To append at the very start of an empty doc use {index: 1}. Body text starts at index 1 because index 0 is the section break.

    Required paramsdocumentIdtextlocation
    Input schema
    {
      "type": "object",
      "properties": {
        "documentId": {
          "type": "string",
          "description": "Google Docs document ID."
        },
        "text": {
          "type": "string",
          "description": "Text to insert. Use \\n for line breaks."
        },
        "location": {
          "type": "object",
          "description": "Insertion location. Always pass {index: <number>}.",
          "properties": {
            "index": {
              "type": "integer",
              "description": "1-based character index where text is inserted."
            },
            "segmentId": {
              "type": "string",
              "description": "Optional segment id for headers/footers; omit for body."
            }
          },
          "required": [
            "index"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "documentId",
        "text",
        "location"
      ],
      "additionalProperties": true
    }
  • applyFormatting

    unknown

    Apply text style (bold, italic, etc.) to a character range in a Google Doc. Use getDocument first to find paragraph startIndex/endIndex.

    Required paramsdocumentIdrangestylefields
    Input schema
    {
      "type": "object",
      "properties": {
        "documentId": {
          "type": "string",
          "description": "Google Docs document ID."
        },
        "range": {
          "type": "object",
          "description": "Character range to format. endIndex is exclusive.",
          "properties": {
            "startIndex": {
              "type": "integer",
              "description": "1-based start index (inclusive)."
            },
            "endIndex": {
              "type": "integer",
              "description": "End index (exclusive)."
            },
            "segmentId": {
              "type": "string",
              "description": "Optional segment id for headers/footers."
            }
          },
          "required": [
            "startIndex",
            "endIndex"
          ],
          "additionalProperties": true
        },
        "style": {
          "type": "object",
          "description": "TextStyle to apply, e.g. {bold: true} or {italic: true}.",
          "additionalProperties": true
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated list of style fields being set, e.g. \"bold\" or \"bold,italic\". Required by the Google Docs API."
        }
      },
      "required": [
        "documentId",
        "range",
        "style",
        "fields"
      ],
      "additionalProperties": true
    }
  • updateParagraph

    write