Replace Text
Find and replace specific text in your Google Docs documents with dynamic content.
Replace Text finds specific text in your Google Docs and replaces it with new content. Perfect for updating templates, personalizing documents, or refreshing data in existing reports without manual editing.
Inputs
Field | Type | Required | Description |
---|---|---|---|
Document URL/ID | Text | Yes | Google Docs document link or ID |
Text Replacements | Mapper | Yes | Map what text to find and what to replace it with |
How It Works
This node searches through your Google Docs document for specific text strings and replaces them with new content. You can set up multiple find-and-replace operations in a single node.
Text Replacement Mapping
Set up replacements using the mapper:
- Text to find: The exact text you want to replace
- Replacement text: What to replace it with (can include data from previous nodes)
Example Mapping:
- Find:
[CAMPAIGN_NAME]
→ Replace:"Holiday Sale 2024"
- Find:
[TOTAL_CLICKS]
→ Replace:"1,250"
- Find:
[REPORT_DATE]
→ Replace:"December 15, 2024"
Configuration Examples
Template Document Updates
Scenario: Update a report template with current campaign data
Document content before:
Configuration:
- Text Replacements:
[CAMPAIGN_NAME]
→ Connect Google Ads campaign name[TOTAL_CLICKS]
→ Connect click count data[TOTAL_COST]
→ Connect cost data[REPORT_DATE]
→ Connect current date
Result: Template populated with real campaign data.
Personalized Document Creation
Scenario: Create personalized client reports from a template
Configuration:
- Text Replacements:
[CLIENT_NAME]
→ “ABC Company”[ACCOUNT_MANAGER]
→ “Sarah Johnson”[PERFORMANCE_SUMMARY]
→ Connect summary from previous node
Result: Generic template becomes personalized client document.
Data Refresh in Existing Reports
Scenario: Update last month’s metrics in an existing document
Configuration:
- Text Replacements:
November: $4,500
→November: $5,200
Q3 Performance
→Q4 Performance
Previous period
→Current period
Result: Document updated with new data without recreating it.
Dynamic Content Insertion
Scenario: Replace placeholders with dynamic workflow data
Configuration:
- Text Replacements:
[TOP_PERFORMING_CAMPAIGN]
→ Connect from analytics node[CONVERSION_RATE]
→ Connect calculated percentage[RECOMMENDATIONS]
→ Connect AI-generated insights
Result: Document populated with real-time workflow data.
Replacement Best Practices
Placeholder Design
- Use distinctive placeholders like
[CAMPAIGN_NAME]
or{{METRIC}}
- Avoid common words that might appear elsewhere in text
- Be specific - use
[Q4_REVENUE]
not just[REVENUE]
- Keep consistent format across all placeholders
Text Matching Rules
- Exact match required -
[CLICKS]
won’t match[clicks]
- Case sensitive - be consistent with capitalization
- Include special characters in your search text if needed
- Test replacements on document copies first
Content Organization
- Group related replacements logically
- Replace large sections with smaller, specific placeholders
- Use multiple nodes for complex replacements if needed
- Document your placeholder system for team clarity
Error Prevention
- Check placeholder spelling in both document and mappings
- Verify data connections from previous nodes
- Test with sample data before running on important documents
- Keep backup copies of template documents
Credit Cost
Free to use - no credits required.
FAQ
How many replacements can I do at once?
How many replacements can I do at once?
You can set up multiple find-and-replace operations in a single node using the mapper. There’s no strict limit, but for very complex replacements (50+ items), consider breaking them into multiple nodes for better organization and troubleshooting.
What happens if the text to find doesn't exist?
What happens if the text to find doesn't exist?
Nothing happens for that specific replacement - the document remains unchanged. Other replacements in the same node will still work if their target text is found. This won’t cause an error, it just skips that replacement.
Can I replace the same text multiple times in one document?
Can I replace the same text multiple times in one document?
Yes, all instances of the target text will be replaced. For example, if [DATE]
appears 5 times in your document, all 5 will be replaced with your new date. If you only want to replace specific instances, use more unique placeholders.
Does this work with formatted text?
Does this work with formatted text?
Yes, but be careful with formatting. The replacement happens at the text level. If you replace **bold text**
with new text
, the new text won’t be bold unless you include the formatting in the replacement. Consider the formatting when designing your placeholders.
How do I replace text with data from previous workflow nodes?
How do I replace text with data from previous workflow nodes?
In the replacement text field, you can connect data from previous nodes just like any other dynamic field. Click in the “Replacement text” area and select data from your previous workflow steps.
What if my replacement text contains the same text I'm searching for?
What if my replacement text contains the same text I'm searching for?
This can create unexpected results. For example, replacing Hello
with Hello World
might cause issues. Use distinctive placeholders like [GREETING]
instead of common words to avoid this problem.
Can I use this to replace entire paragraphs?
Can I use this to replace entire paragraphs?
Yes! You can replace any amount of text, from single words to entire paragraphs or sections. Just make sure your “text to find” exactly matches what’s in the document, including line breaks and spacing.
Is there a way to undo replacements?
Is there a way to undo replacements?
No automatic undo, so always work on copies of important documents first. Consider using Google Docs version history to revert changes if needed, or keep backup copies of your original templates.