Googledocs

Learn how to use Googledocs with Composio

Overview

Enum

GOOGLEDOCS

Description

Google Docs is a cloud-based word processor with real-time collaboration, version history, and integration with other Google Workspace apps

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/userinfo.email
token
stringRequired

Actions

Tool to create a copy of an existing google document. use this to duplicate a document, for example, when using an existing document as a template. the copied document will have a default title (e.g., 'copy of [original title]') if no new title is provided, and will be placed in the user's root google drive folder.

Action Parameters

document_id
stringRequired
title
string

Action Response

data
object
error
string
successful
boolean
Tool to create a new footnote in a google document. use this when you need to add a footnote at a specific location or at the end of the document body.

Action Parameters

documentId
stringRequired
endOfSegmentLocation
object
location
object

Action Response

data
object
error
string
successful
boolean
Tool to create a new header in a google document. use this tool when you need to add a header to a document, optionally specifying the section it applies to.

Action Parameters

createHeader
objectRequired
documentId
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to create a new named range in a google document. use this to assign a name to a specific part of the document for easier reference or programmatic manipulation.

Action Parameters

documentId
stringRequired
name
stringRequired
rangeEndIndex
integerRequired
rangeSegmentId
string
rangeStartIndex
integerRequired

Action Response

data
object
error
string
successful
boolean
Tool to add bullets to paragraphs within a specified range in a google document. use when you need to format a list or a set of paragraphs as bullet points.

Action Parameters

createParagraphBullets
objectRequired
document_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to delete a range of content from a google document. use when you need to remove a specific portion of text or other structural elements within a document.

Action Parameters

document_id
stringRequired
range
objectRequired

Action Response

data
object
error
string
successful
boolean
Deletes the header from the specified section or the default header if no section is specified. use this tool to remove a header from a google document.

Action Parameters

document_id
stringRequired
header_id
stringRequired
tab_id
string

Action Response

data
object
error
string
successful
boolean
Tool to delete a named range from a google document. use when you need to remove a previously defined named range by its id or name.

Action Parameters

deleteNamedRange
objectRequired
document_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to remove bullets from paragraphs within a specified range in a google document. use when you need to clear bullet formatting from a section of a document.

Action Parameters

document_id
stringRequired
range
objectRequired
tab_id
string

Action Response

data
object
error
string
successful
boolean
Tool to delete an entire table from a google document. use when you have the document id and the specific start and end index of the table element to be removed. the table's range can be found by inspecting the document's content structure.

Action Parameters

document_id
stringRequired
segment_id
string
tab_id
string
table_end_index
integerRequired
table_start_index
integerRequired

Action Response

data
object
error
string
successful
boolean
Tool to delete a column from a table in a google document. use this tool when you need to remove a specific column from an existing table within a document.

Action Parameters

document_id
stringRequired
requests
arrayRequired

Action Response

data
object
error
string
successful
boolean
Tool to delete a row from a table in a google document. use when you need to remove a specific row from an existing table.

Action Parameters

documentId
stringRequired
tableCellLocation
objectRequired

Action Response

data
object
error
string
successful
boolean
Tool to retrieve a list of all charts from a specified google sheets spreadsheet. use when you need to get chart ids and their specifications for embedding or referencing elsewhere, such as in google docs.

Action Parameters

spreadsheet_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to insert an image from a given uri at a specified location in a google document as an inline image. use when you need to add an image to a document programmatically.

Action Parameters

documentId
stringRequired
location
objectRequired
objectSize
object
uri
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to insert a page break into a google document. use when you need to start new content on a fresh page, such as at the end of a chapter or section.

Action Parameters

documentId
stringRequired
insertPageBreak
objectRequired

Action Response

data
object
error
string
successful
boolean
Tool to insert a table into a google document. use when you need to add a new table at a specific location or at the end of a segment (like document body, header, or footer) in a document.

Action Parameters

columns
integerRequired
documentId
stringRequired
index
integer
insertAtEndOfSegment
boolean
rows
integerRequired
segmentId
string
tabId
string

Action Response

data
object
error
string
successful
boolean
Tool to insert a new column into a table in a google document. use this tool when you need to add a column to an existing table at a specific location.

Action Parameters

document_id
stringRequired
requests
arrayRequired

Action Response

data
object
error
string
successful
boolean
Tool to insert a string of text at a specified location within a google document. use when you need to add new text content to an existing document.

Action Parameters

document_id
stringRequired
insertion_index
integerRequired
text_to_insert
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to retrieve a list of charts with their ids and metadata from a google sheets spreadsheet. use to identify charts available for embedding into google docs.

Action Parameters

fields_mask
stringDefaults to sheets(properties(sheetId,title),charts(chartId,spec(title,altText)))
spreadsheet_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to replace all occurrences of a specified text string with another text string throughout a google document. use when you need to perform a global find and replace operation within a document.

Action Parameters

document_id
stringRequired
find_text
stringRequired
match_case
booleanRequired
replace_text
stringRequired
search_by_regex
boolean
tab_ids
array

Action Response

data
object
error
string
successful
boolean
Tool to replace a specific image in a document with a new image from a uri. use when you need to update an existing image within a google doc.

Action Parameters

document_id
stringRequired
replace_image
objectRequired

Action Response

data
object
error
string
successful
boolean
Tool to unmerge previously merged cells in a table. use this when you need to revert merged cells in a google document table back to their individual cell states.

Action Parameters

document_id
stringRequired
tableRange
objectRequired

Action Response

data
object
error
string
successful
boolean
Tool to update the overall document style, such as page size, margins, and default text direction. use when you need to modify the global style settings of a google document.

Action Parameters

document_id
stringRequired
document_style
objectRequired
fields
stringRequired
tab_id
string

Action Response

data
object
error
string
successful
boolean
Tool to update the style of a table row in a google document. use when you need to modify the appearance of specific rows within a table, such as setting minimum row height or marking rows as headers.

Action Parameters

documentId
stringRequired
updateTableRowStyle
objectRequired

Action Response

data
object
error
string
successful
boolean
Creates a new google docs document using the provided title as filename and inserts the initial text at the beginning if non-empty, returning the document's id and metadata (excluding body content).

Action Parameters

text
stringRequired
title
stringRequired

Action Response

data
object
error
string
successful
boolean
Creates a new google docs document, optionally initializing it with a title and content provided as markdown text.

Action Parameters

markdown_text
stringRequired
title
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves an existing google document by its id; will error if the document is not found.

Action Parameters

id
stringRequired

Action Response

data
object
error
string
successful
boolean
Search for google documents using various filters including name, content, date ranges, and more.

Action Parameters

created_after
string
include_trashed
boolean
max_results
integerDefaults to 10
modified_after
string
order_by
stringDefaults to modifiedTime desc
query
string
shared_with_me
boolean
starred_only
boolean

Action Response

data
object
error
string
successful
boolean
Replaces the entire content of an existing google docs document with new markdown text; requires edit permissions for the document.

Action Parameters

document_id
stringRequired
new_markdown_text
stringRequired

Action Response

data
object
document_id
string
error
string
successful
boolean
Applies programmatic edits, such as text insertion, deletion, or formatting, to a specified google doc using the `batchupdate` api method.

Action Parameters

document_id
stringRequired
editDocs
arrayRequired

Action Response

data
object
document_id
string
error
string
successful
boolean