Create and edit Google Docs documents programmatically with text formatting and structure
Google Docs allows you to create and modify documents programmatically. You can create new documents with custom titles, insert text at specific positions, format content with bullets and styles, and structure documents with sections. This integration is perfect for document automation, report generation, and content creation workflows. Note that document sharing requires the Google Drive integration.
Required:
action
- The operation to perform on documentsCreate a new blank Google Docs document
Parameters:
title
(required) - Title for the new documentExample:
Response:
Insert text at a specific position in the document
Parameters:
document-id
(required) - The ID of the document to modifytext
(required) - Text content to insertindex
(required) - Position where text should be inserted (1 for beginning)Example:
Response:
Create a document with multiple sections and formatting
Parameters:
document-id
(required) - The ID of the document to modifysections
(required) - List of sections with their content and positionsformat-type
(optional) - Formatting to apply (e.g., bullets, numbering)Example:
Response:
Format text as bulleted lists
Parameters:
document-id
(required) - The ID of the document to modifystart-index
(required) - Starting position of text to formatend-index
(required) - Ending position of text to formatbullet-style
(optional) - Bullet style (default: BULLET_DISC_CIRCLE)Example:
Response:
Perform multiple document modifications in a single request
Parameters:
document-id
(required) - The ID of the document to modifyrequests
(required) - List of modification requests to applyExample:
Response:
When modifying documents, the index position must be less than the end index of the referenced segment. Index positions start at 1 for the beginning of the document. Document sharing functionality requires the Google Drive integration - use the Google Drive slash command to share documents by file name. Bullet preset options include BULLET_DISC_CIRCLE for standard bullet formatting.