Skip to main content

Split Document in Power Automate

PDF4me Split Document action enables dividing Word documents into multiple smaller documents in Power Automate with flexible splitting options and comprehensive configuration control. This powerful document splitting feature supports page-based splitting, section-based division, heading-based separation, and custom page ranges with full control over split criteria, document naming, and output organization, perfect for document management, content distribution, and workflow automation across Microsoft 365.

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 Word document splitting services.

Split Document Power Automate

Key Features

  • Multiple Split Types: Split by pages, sections, headings, or custom ranges
  • Page Range Support: Split based on specific page numbers or ranges
  • Section-Based Splitting: Divide documents by Word sections
  • Heading-Based Division: Split at specific heading styles (Heading 1, 2, etc.)
  • Flexible Configuration: Custom split criteria with SplitConfig parameter
  • Unique Document Names: Each split document gets a unique GUID filename
  • Format Preservation: Maintains original document formatting and structure
  • Culture Support: Locale-specific document processing

Parameters

Complete list of parameters for the Split Document action. Configure these parameters to control document splitting behavior.

Important: Parameters marked with an asterisk (***) are required. Advanced parameters provide fine-grained control over splitting criteria and document processing.

ParameterTypeDescriptionExample
File Content***Base64Source Word File Content
• Map Word file from previous action output
• Supports Word files from SharePoint, Dropbox, OneDrive, email attachments
• Can be dynamically retrieved from flow variables
• All type of file content can get from the Dropbox Get File actions
• Direct base64 can be given in the file content also
• Must be valid Word document (.docx, .doc formats)
• Document is split based on specified criteria
[File Content from Get File]
File Name***StringWord Document Name
• Specify Word file name with extension (.docx, .doc)
• Used for reference and processing
• Must include proper file extension
• Supports dynamic naming from flow variables
• Used for document identification during splitting
document.docx
Split TypeStringType of Document Splitting
allpages - Split into individual pages (default)
array - Split based on page ranges (e.g., "1-3,4,5-7")
numberofpages - Split based on page ranges (same as "array")
section - Split by document sections
headings - Split by heading styles (e.g., "Heading 1")
• Controls how the document is divided
• Each split document gets a unique GUID filename
• Preserves original document formatting and structure
"allpages"
Split ConfigStringConfiguration for Splitting
Page Ranges: "1-3,4,5-7" (pages 1-3, page 4, pages 5-7)
Single Pages: "1,3,5" (pages 1, 3, and 5)
Heading Styles: "Heading 1" or "Heading 2"
• Required when Split Type is "array", "numberofpages", or "headings"
• Defines specific splitting criteria
• Page numbers are 1-based (user-friendly)
• Validates page ranges against document page count
• Heading-based splitting is case-insensitive
"1-3,4,5-7"
Culture NameStringDocument Culture/Locale
• Culture code for document processing (e.g., "en-US", "de-DE", "fr-FR")
• Default: "en-US"
• Affects document language and formatting
• Use valid culture codes for international documents
• Used for metadata and localization handling
en-US

Output

The PDF4me Split Document action returns comprehensive output data for seamless Power Automate flow integration:

Table View

Response data in a structured table format:

ParameterTypeDescription
documentsArrayArray of split document objects
documents[].documentBase64Individual split document content (base64-encoded)
documents[].fileNameStringGenerated filename for the split document
SuccessBooleantrue if operation successful, false if failed
Error MessageStringError description (null if successful)
ErrorsArrayList of detailed error information (empty array if successful)

Common Error Messages

Understanding and troubleshooting errors helps ensure smooth document splitting workflows:

Error MessageCauseSolution
"Request is empty"Request object is nullProvide valid request object
"Document is empty"Document object is nullProvide valid Word document
"Error splitting document"General exception during document splittingCheck document format and parameters. Review exception details in Errors array
"Error loading document from bytes"Invalid or corrupted Word documentVerify the input document is a valid Word file (.docx)
"Error converting document to bytes"Error during document conversionCheck document integrity and format
"Invalid split configuration provided"SplitConfig parameter is invalid for the specified SplitTypeProvide valid split configuration based on SplitType
"No headings found in document"Document does not contain the specified heading styleVerify document has the required heading styles
"Invalid page range specified"Page numbers in SplitConfig exceed document page countEnsure page numbers are within document bounds

Workflow Examples

The PDF4me Split Document action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:

Automated Document Chapter Extraction Workflow

Streamline your document distribution with automated chapter extraction:

Complete Workflow Steps:

  1. Trigger: Large manual uploaded to SharePoint
  2. Get Document: Retrieve Word manual from document library
  3. Split Document: Extract chapters by Heading 1
  4. Set Parameters: Split Type = "headings", Split Config = "Heading 1"
  5. Save Chapters: Store individual chapters in organized folders
  6. Email Teams: Send chapter links to relevant departments
  7. Archive: Store split documents in chapter library

Business Benefits:

  • Extracts 50+ chapters monthly automatically
  • Saves 2 hours per manual (automated vs manual extraction)
  • Ensures 100% accurate chapter separation
  • Enables targeted distribution to specific teams

Industry Use Cases & Applications

Legal Industry Use Cases

  • Contract Management: Split multi-party contracts into individual sections
  • Case Documentation: Extract specific pages from case files
  • Compliance Reports: Distribute relevant sections to different departments
  • Legal Research: Split large legal documents by topic or section

Get Help