Skip to content

Google Docs: Create from Template

Plugin ID: eca_google_docs_create_from_template

Available since: 1.0.0

Creates a Google Docs document by copying a template and replacing placeholder variables with dynamic data.

Fields

Authentication Type — config key: auth_type

Choose between API Client (OAuth2) or Service Account authentication.

Type: select · Required: yes · Default: api_client

Allowed values: api_client, service_account

Authentication Source — config key: auth_from

Choose whether to select authentication directly or use a token for dynamic selection.

Type: select · Required: yes · Default: direct

Allowed values: direct, token

API Client — config key: api_client_id

Search and select an API Client for OAuth2 authentication.

Type: textfield · Required: no · Default: empty string

Service Account — config key: service_account_id

Search and select a Service Account for server-to-server authentication.

Type: textfield · Required: no · Default: empty string

Client ID from Token — config key: auth_client_from_token

Token that resolves to a client ID (e.g., [user:field_google_client_id]). The token should contain just the client ID, not the auth type prefix.
This field supports tokens.

Type: textfield · Required: no · Default: empty string

Template Document ID — config key: template_id

The ID of the Google Docs template document to copy. Note: This requires Google Drive API access in addition to Google Docs API.
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

New Document Title — config key: title

The title for the new document created from the template.
This field supports tokens.

Type: textfield · Required: yes · Default: empty string

Template Variables — config key: placeholders

Key-value pairs for template placeholder replacement. One per line in format: placeholder_name: replacement_value
Example:
client_name: [node:field_client_name]
project_date: [node:field_start_date]

These will replace {{placeholder_name}} in the template.
This field supports tokens.

Type: textarea · Required: no · Default: empty string

Document Token Name — config key: document_token_name

Optional token name to store document details. Accessible as [token_name:document_id], [token_name:document_url], [token_name:title], [token_name:replacement_count].
This field supports tokens.

Type: textfield · Required: no · Default: empty string