createDocumentFromTemplate
Create a new Google Doc from an existing template, optionally replacing placeholder text with key-value pairs and choosing an output folder.
Instructions
Creates a new document by copying an existing template and optionally replacing placeholder text. Provide key-value pairs in the replacements parameter to substitute template variables.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"templateId": "<templateId>",
"newTitle": "<newTitle>"
},
"name": "createDocumentFromTemplate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newTitle | Yes | Title for the new document. | |
| templateId | Yes | ID of the template document to copy from. | |
| replacements | No | Key-value pairs for text replacements in the template (e.g., {"{{NAME}}": "John Doe", "{{DATE}}": "2024-01-01"}). | |
| parentFolderId | No | ID of folder where document should be created. If not provided, creates in Drive root. |