Append text to Google Doc
append_textAppend text to the end of a Google Doc without indexes. Returns insertion length and index range for formatting.
Instructions
Append text to the end of a Google Doc’s body. No indexes are needed, so prefer this over insert_text whenever content should go at the end. By default the text starts in a new paragraph (a paragraph break is added first if the last paragraph is not empty); set startNewParagraph=false to continue the last paragraph instead. Use "\n" inside text to create further paragraphs. Returns insertedLength and the index range of the appended text (textStartIndex/textEndIndex), which can be passed to format_text or set_paragraph_style. Carriage returns become "\n" and control characters Google Docs cannot store are removed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to append. "\n" starts a new paragraph. | |
| documentId | Yes | The Google Docs document ID (the part between /d/ and /edit in the document URL). A full Google Docs URL is also accepted. | |
| startNewParagraph | No | Start the text in a new paragraph when the last paragraph is not empty (default true). Set false to continue the last paragraph. |