Create Document
google_docs.create
ActionFiles & storageconnection required
Calls the Docs API to create a document and insert text, then Drive to file it in a folder when one is given.
Create a Google Doc, optionally with body text.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Google Docs
- Secret shape
- {"client_id", "client_secret", "refresh_token"}
- Config it needs
- token_uri
- Resolved by
- config.connection_id, else node.connection_id
Configuration
3 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
title Document title. Supports {{ }} expressions. | string | Yes | — | — | — |
body_text Optional initial body text. | string | No | — | — | — |
folder_id Optional Drive folder to file the new document in — it must be a folder this workflow created, because the Google Docs connection only has per-file Drive access and cannot see folders made by hand in Drive. Without it the document is left in the root of My Drive. | string | No | — | — | — |
Output
One shape.
document
| Field | Type | Example |
|---|---|---|
ok | boolean | true |
document_id | string | — |
url Editor URL of the new document. | string | — |
{
"document_id": "",
"ok": true,
"url": ""
}Related Google Docs nodes
See Create Document run in a workflow.
In a technical demo we add the Google Docs connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.