create_doc
Create Google Docs with optional initial content and markdown formatting. Specify user email and title to generate documents programmatically.
Instructions
Creates a new Google Doc and optionally inserts initial content.
After creation, the document body starts at index 1. A new empty doc has total length 2 (one section break at index 0, one newline at index 1).
To build a rich document after creation, use batch_update_doc with insert_text operations using end_of_segment=true to append content sequentially without calculating indices. Then call inspect_doc_structure to get exact positions before applying formatting in a separate batch call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | User's Google email address | |
| title | Yes | Title of the new document | |
| content | No | Optional initial content to insert. | |
| format_as_markdown | No | If True, parses `content` as markdown and inserts it with native Docs formatting (headings, bold, italic, bullet/numbered/ checkbox lists). Supports `# H1`-`### H3`, `**bold**`, `*italic*`, `- bullets`, `1. numbered`, and `- [ ] checkbox` (also `- [x]`). Default False (insert as plain text). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |