Replace Placeholders
AI-generatedSummary
Replace placeholders in an existing Google Document with specified replacement values.
Inputs
- Document (required) — Select the Google Document (by document ID) in which placeholders should be replaced.
- Placeholder Format (required) — Choose the format used for placeholders in the document (e.g., {{variable}}, ${variable}, [variable], {variable}, or <
>). - Placeholders (required) — Provide one or more placeholders to replace, each with the placeholder name (selectable from the document's existing placeholders) and the value to replace it with.
- Options — Configure optional settings such as whether placeholder matching should be case-sensitive (default true).
Output shape
a single JSON object summarizing the operation result
The output includes success status, the document ID and URL, counts of placeholders provided and replacements made, and a message if no placeholders were provided. If no placeholders are given, no replacements occur and replacementsMade is zero.
Examples
Example 1: Replace placeholders in a signed contract document
Select the document to update, specify placeholder format (e.g., '{{variable}}'), provide placeholder-value pairs such as clientName: 'Acme Corp' and contractDate: '2024-06-01', and optionally enable case-sensitive matching.