Actions5
Update Existing Document
AI-generatedSummary
Update content in an existing Google Docs document by converting provided Markdown into Google Docs format and inserting it according to the specified mode.
Inputs
- Document (required) — The Google Docs document to update, selectable by name, URL, or ID.
- Markdown Input (required) — The Markdown content to convert and insert into the document.
- Update Mode (required) — How to insert the Markdown content: append to the end, overwrite the entire document, insert after a specified section heading, or insert at a specific character index.
- Section Heading — When using 'Insert After Section Heading' mode, the case-insensitive heading text to locate for insertion.
- Start Index — When using 'Insert at Index' mode, the 1-based character position where content will be inserted.
- Update Fields — Additional options including specifying a document tab to write to (existing tab, creating a new tab with a title, or default first tab).
Output shape
a single JSON object indicating success, updated document ID, URL, update mode, insertion index, optional tab ID, and message.
Returns a JSON object confirming update success along with metadata; throws errors with details if the update fails (e.g., missing document, invalid section heading, or empty Markdown input). The insertion index varies by update mode and is reported in the output.