Adobe PDF Split and Route
When a multi-document PDF arrives (a batch scan or merged report), the flow splits it by page ranges or bookmarks with Adobe PDF Services, files each part to the right SharePoint folder by a naming rule, and notifies owners. Breaks bulk PDFs into routed, individually-filed documents.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
When a multi-document PDF (a batch scan or merged report) arrives in a SharePoint intake library, this flow splits it into smaller PDFs with Adobe PDF Services, files each part into the correct SharePoint folder using a configurable naming/routing rule, and emails the destination owner.
Why it matters: Batch scans and merged exports must be separated before they are useful. Automated split + content-routing removes manual page-chopping and misfiling. Adobe is called via the built-in HTTP action (token -> assets -> PUT upload -> operation/splitpdf -> poll -> download), so no Adobe connection reference is needed — credentials come from environment variables.
Use Case
Operations, mailroom, and records teams that receive combined PDFs and need each embedded document split out, filed to the right library folder, and the owner notified — without manual handling.
Flow Architecture
When a PDF Arrives In Intake Library
SharePoint — GetOnNewFileItems (5-min recurrence, splitOn)Polls the intake library and fires once per new file added.
Initialize variables
Initialize Variable (x13)Correlation id (@guid()), site URL, routing map, default folder, default owner, Adobe base/id/secret, split page count, source file name, route prefix, split status, part index.
Check File Is PDF
Condition (endsWith .pdf)Processes only PDFs; non-PDF files fall through the empty False branch and are ignored.
Get Source File Content
SharePoint — GetFileContentDownload the incoming PDF bytes (file id from trigger).
Get Adobe Access Token
HTTP — POST /tokenExchange client id/secret for an access token.
Create Adobe Asset
HTTP — POST /assetsReserve an asset -> returns uploadUri + assetID.
Upload Source To Adobe
HTTP — PUT uploadUriUpload the source PDF bytes to Adobe.
Start Split Job
HTTP — POST /operation/splitpdfStart the split (by pages-per-file); returns the status URL in the Location header.
Poll Until Split Done
Until loop (Wait 8s -> Get Status -> Set Status)Wait 8s -> Get Split Job Status -> Set Split Status, until done/failed.
Route Each Split Part
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com | Site hosting the intake library + routed folders. (reused) |
| flowlibs_SplitIntakeLibrary | String | FlowLibs - PDF Intake | Library watched for incoming multi-doc PDFs. |
| flowlibs_SplitPageCount | String | 1 | Max pages per output file (Adobe splitoption.pageCount). |
| flowlibs_SplitRoutingMap | String | {"INV": {"folder": "/Shared Documents/Routed/Invoices", "owner": "ap@your-tenant.onmicrosoft.com"}, "PO": {"folder": "/Shared Documents/Routed/PurchaseOrders", "owner": "purchasing@your-tenant.onmicrosoft.com"}, "HR": {"folder": "/Shared Documents/Routed/HR", "owner": "hr@your-tenant.onmicrosoft.com"}} | Prefix -> {folder, owner} routing rule (JSON). |
| flowlibs_SplitDefaultFolder | String | /Shared Documents/Routed/_Unmatched | Fallback folder for unmatched prefixes. |
| flowlibs_OwnerNotificationEmail | String | alerts@yourcompany.com | Fallback notification recipient. (reused) |
| flowlibs_AdobeClientId | String | <configure> | Adobe API client id (also the x-api-key header). (reused) |
| flowlibs_AdobeClientSecret | String | <configure> | Adobe API client secret. (reused) |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| SharePoint | shared_sharepointonline | GetOnNewFileItems GetFileContent CreateFile |
| HTTP | http | POST /token POST /assets PUT upload POST /operation/splitpdf GET status GET download |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Split mode
- This build splits by pages-per-file (splitoption.pageCount). Switch to page ranges (pageRanges) or a fixed file count (fileCount) by editing the Start Split Job body. (split-by-bookmark is not a native Adobe REST option.)
- Content-based routing
- Add an OCR/extract step (Adobe extractpdf) to derive the routing key from document content instead of the filename prefix.
- Routing & owners
- Edit flowlibs_SplitRoutingMap to add prefixes, folders, and owners; unmatched parts fall back to flowlibs_SplitDefaultFolder + flowlibs_OwnerNotificationEmail.
- Lineage logging
- Add a Dataverse table + CreateRecord inside the loop to record split lineage (source -> parts) with the correlation id.
- Quarantine
- Add a branch to hold parts whose prefix has no routing rule for manual review.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Routing prefix (naming rule)
Derive the routing prefix from the filename.
EXPR.02Destination folder
Look up the routed folder, else fall back.
EXPR.03Destination owner
Look up the routed owner, else fall back.
EXPR.04Part name
Build a unique part filename.
EXPR.05Adobe upload body (binary)
Convert the SharePoint base64 content to binary for the Adobe PUT.
EXPR.06Split page count (numeric)
Coerce the page count env var to an integer.
EXPR.07Split job status URL
Polling Location header from the split job.
EXPR.08Output parts
The list of split output assets to route.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.