Skip to main content

Find and Replace Text in Power Automate

PDF4me Find and Replace Text action delivers intelligent text modification in Power Automate with automated search and replacement of text content within PDF documents. This comprehensive text editing service updates content across specific pages or entire documents, enabling document rebranding, error correction, and content maintenance workflows across Microsoft 365 ecosystem.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog →

Authenticating Your API Request​

To access the PDF4me Web API through Power Automate, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Power Automate flows and PDF4me's powerful document processing services.

PDF4me PDF - Find and Replace Text action in Power Automate with File Content mapped from Get file content, File Name set to abc.pdf, and a Replacements item holding Old Text 1 We, New Text 1 Me, and Pages 1 set to 1,2

Map File Content from a prior step, name the file, then fill one Replacements item per text change. Use Add new item for additional replacements in the same call.

Key Features​

  • Text Search & Replace: Find and update specific text strings in PDFs
  • Page-Specific Control: Target specific pages or entire document
  • Batch Updates: Replace all occurrences automatically
  • Content Maintenance: Keep documents current with automated updates
  • Flow Integration: Use in document updating and rebranding workflows

Parameters​

Complete list of parameters for the Find and Replace Text action. Configure these parameters to control text replacement.

The action is shown in Power Automate as PDF - Find and Replace Text. File Content and File Name are set once. Old Text, New Text, and Pages live inside a repeating Replacements section, so the UI numbers them per item (Old Text - 1, New Text - 1, Pages - 1). Click Add new item to apply several replacements in a single call.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
File Content***BinarySource PDF Document
• PDF file content to update
• Supports text-based PDFs
• Compatible with SharePoint, OneDrive sources
• Accepts dynamic content from previous actions
body('Get_file_content')
File Name***StringPDF Filename with Extension
• Specify PDF filename with .pdf extension
• Required for proper file identification
• Supports dynamic naming from flow variables
• Maintains document tracking
contract.pdf
Old Text - N***StringText to Search For
• Inside the repeating Replacements section
• Exact text string to find in PDF
• Case-sensitive search
• Supports dynamic text from flow variables
• All occurrences on the listed pages are found
We
New Text - N***StringReplacement Text
• Inside the repeating Replacements section
• Text to replace found instances with
• Can be an empty string to remove text
• Supports dynamic replacement from flow data
Me
Pages - N***StringTarget Pages for Replacement
• Inside the repeating Replacements section
• Specific pages: 1,2
• Page ranges: 1-10
• All pages: all
• Scopes this replacement to those pages only
1,2

Output​

The PDF4me Find and Replace Text action returns comprehensive output data for seamless Power Automate flow integration:

Table View

Response data in a structured table format:

ParameterTypeDescription
File ContentBinaryUpdated PDF with text replacements applied

Workflow Examples​

The PDF4me Find and Replace Text action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:

Automated Document Rebranding Workflow

Transform your rebranding operations with automated company name replacement across PDF library:

Complete Workflow Steps:

  1. Trigger: Company rebrand initiated with new name approval
  2. Get PDFs: Retrieve all marketing PDFs from SharePoint library
  3. Loop Documents: For each PDF, apply name replacement
  4. Replace Text: Change old company name to new brand name
  5. Update Logo: Optionally replace logo images
  6. Version Control: Save updated PDF with new version number
  7. Archive Old: Move original PDFs to legacy archive
  8. Distribute: Publish rebranded PDFs to marketing channels

Business Benefits:

  • Rebrands 500+ documents automatically within hours
  • Eliminates manual document editing saving 40+ hours
  • Ensures consistent branding across all documents
  • Maintains version history with automated archival

Industry Use Cases & Applications​

Corporate & Business Use Cases

  • Rebranding: Update company names across documents
  • Address Updates: Replace old addresses with new locations
  • Contact Updates: Update phone numbers and email addresses
  • Policy Updates: Replace outdated policy language

Get Help​