Adobe PDF Office-to-PDF-A Conversion Pipeline
When a Word, Excel, or PowerPoint file is uploaded to a records library, the flow converts it to PDF (or PDF/A for archival) with Adobe PDF Services, co-files or replaces the converted version with metadata, and posts a conversion summary to Teams. Standardizes records on an archival-grade format.
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
This flow watches a SharePoint records library and, whenever a new Office file (Word / Excel / PowerPoint) is uploaded, converts it to PDF with Adobe PDF Services, co-files the PDF into a Converted folder with archival metadata, optionally deletes the original (replace mode), and posts a conversion summary to a Microsoft Teams channel.
Why it matters: Mixed Office formats are poor for long-term records. A single, durable PDF copy per record gives compliance teams a consistent archive and a Teams audit trail of every conversion.
PDF/A note: Adobe PDF Services' REST API does not emit PDF/A — its createpdf operation produces standard PDF only. This flow therefore produces standard PDF and records the intended conformance level (flowlibs_ConformanceTarget, default pdfa-2b) as metadata on the converted file. To produce true PDF/A at go-live, route the standard PDF through a PDF/A-capable service (a dedicated PDF/A REST tool, an on-prem converter, or AEM Forms).
Use Case
Records / compliance teams want every Office document dropped into a controlled library normalized to a single PDF format automatically, with the original optionally retired and the team notified — no manual export-to-PDF step.
Flow Architecture
When An Office File Is Created
SharePoint — GetOnNewFileItems (poll 5 min, splitOn)Fires per new file in the records library.
Initialize variables
Initialize Variable (x15)Bind env vars and derive source name, extension, output name, MIME type; seed the job status.
Check If Supported Office File
Condition (Or of 6 equals)Only process docx/doc/xlsx/xls/pptx/ppt; non-Office files hit the else branch. Also guards against the PDF this flow writes back.
Get Source File Content
SharePoint — GetFileContentRead the uploaded file's bytes ($content, base64).
Adobe token + asset + upload
HTTP — POST /token, POST /assets, PUT (upload)Exchange client id/secret for an OAuth token, reserve an upload asset, and PUT the Office bytes.
Start CreatePDF Job + Poll Until Complete
HTTP — POST /operation/createpdf + Until loopStart the Office->PDF job and poll the location every 5s until done/failed.
Download Converted PDF + Co-file
HTTP GET (presigned) + SharePoint CreateFileDownload the converted PDF and co-file it into the Converted folder.
Update Converted PDF Metadata
SharePoint — ODataStylePatchFileItemStamp SourceFileName / ConversionEngine / ConformanceTarget / ConvertedOnUtc.
Check If Replace Original
Condition + SharePoint — DeleteItemIn replace mode (flowlibs_ReplaceOriginal=true), delete the source Office file.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com | Site hosting the records library (reused). |
| flowlibs_RecordsLibraryName | String | FlowLibs - Records Library | Library display name (trigger target) (new). |
| flowlibs_RecordsLibraryGuid | String | <configure> | Library list GUID (Update file properties + Delete file) — set the real GUID at go-live (new). |
| flowlibs_ConvertedFolderPath | String | /FlowLibs Records Library/Converted | Server-relative folder for the converted PDF (new). |
| flowlibs_AdobeClientId | String | <configure> | Adobe PDF Services client id / API key (reused). |
| flowlibs_AdobeClientSecret | String | <configure> | Adobe PDF Services client secret (reused). |
| flowlibs_AdobePdfServicesBase | String | https://pdf-services.adobe.io | Adobe PDF Services REST base URL (reused). |
| flowlibs_ConformanceTarget | String | pdfa-2b | Intended archival conformance recorded as metadata (see PDF/A note) (new). |
| flowlibs_ReplaceOriginal | String |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| HTTP | http | POST /token POST /assets PUT (upload) POST /operation/createpdf GET (status/download) |
| SharePoint | shared_sharepointonline | GetOnNewFileItems GetFileContent CreateFile ODataStylePatchFileItem DeleteItem |
| Microsoft Teams | shared_teams | PostMessageToConversation |
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.
- True PDF/A
- After Download Converted PDF, add a second conversion step against a PDF/A-capable service (dedicated PDF/A REST API, on-prem converter, or AEM Forms) and file that output instead; flowlibs_ConformanceTarget tells it which level to target.
- Replace vs co-file
- Flip flowlibs_ReplaceOriginal to true to retire the source Office file after a successful conversion.
- Metadata columns
- Create the records library with SourceFileName, ConversionEngine, ConformanceTarget, ConvertedOnUtc columns so Update Converted PDF Metadata lands; adjust the item object to match your column names.
- Image inputs
- Adobe createpdf also accepts common image types — widen the extension list in Check If Supported Office File and the MIME map in Initialize Media Type.
- Backfill
- Add a scheduled (Recurrence) sibling flow that lists existing Office files and runs the same conversion subflow over the backlog.
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.01Output PDF name
Derive the output PDF file name from the source name.
EXPR.02Source extension
Extract the lowercased source file extension.
EXPR.03Adobe token body
OAuth server-to-server token request body.
EXPR.04Poll URL
Status-poll URL from the CreatePDF job response.
EXPR.05Loop exit
Stop polling when the Adobe job is done or failed.
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.