Google Docs
Create Google Doc From Template
Create a Google Doc by copying a template and replacing its placeholders.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| identifieraccount · required | account | required | — |
| templateIdstring · required | string | required | The document to copy. Pick one, or paste a Google Docs link or document ID. |
| titlestring · optional | string | optional | Name for the new document. Leave blank for Google's "Copy of …". |
| folderIdstring · optional | string | optional | Where to put the new document. Default: the template's folder. |
| placeholdersobject · optional | object | optional | Placeholder to value, as JSON: {"name": "Dana", "company": "Acme"}. A bare key is matched as {{name}}. |
| matchCaseboolean · optional | boolean | optional | Match placeholder case exactly. Default: |
| ifTitleExistsstring · optional | string | optional | Reuse keeps a retried run from leaving a second copy behind. One of: Default: |
Response schema
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Open in Google Docs"
},
"title": {
"type": "string"
},
"created": {
"type": "boolean",
"description": "False when an existing document was reused"
},
"folderId": {
"type": "string"
},
"documentId": {
"type": "string"
},
"replacements": {
"type": "object",
"description": "How many times each placeholder was replaced — a zero means that placeholder was not in the template"
}
}
}