Send Paige documents to OneDrive with Power Automate
Build the Power Automate flow that watches Paige's SFTP export folder, reads each document's field values, and creates the PDF in a OneDrive for Business folder with a name built from the document's own contents.
Before you begin
- A OneDrive for Business account and the folder the documents should land in
- A Power Automate license that includes premium connectors (the SFTP - SSH connector is premium; OneDrive for Business is standard)
- An SFTP server Paige can reach, with a folder for this scan job
- A Paige scan job with document types and fields set up
At the end of this guide, every document Paige finishes appears in a OneDrive for Business folder within a few minutes, as a searchable PDF named from its own contents — INV-20441 – Acme Office Supply.pdf instead of a scanner's serial number.
The flow is five steps: SFTP trigger → keep only the data file → Parse JSON → get the PDF → OneDrive Create file. Paige uploads the PDF before the data file, so the PDF is always there when the flow fires.
Step 1 — Point Paige at your SFTP server
In Paige, open Settings (the gear at the bottom of the left menu — administrators only), pick the scan job, and choose Export.
Click the FTP card. Enter the FTP Address, Port
22, Username, Password, and in FTP Folder Path a folder for this scan job, such as/paige/invoices.Click Test Connection. What you should see:
FTP connection successful!Connect —Connected to FTP Server!and a green Connected label on the card.Turn on Enable Auto Export. Under Auto Export Settings, switch on Only documents having a document type, set Auto Field Entry Complete to Yes (the file name needs the values), and set Human Reviewed to Reviewed if a person checks documents in Paige first. Click Save.
Open port 22 on your firewall to Paige's address ranges — Outbound IP ranges for firewall allow-lists.
Step 2 — Build the flow
Sign in to Power Automate as the OneDrive account that owns the destination folder (the OneDrive connector can only write to the account that made the connection), and create an Automated cloud flow.
Trigger — SFTP - SSH: When a file is added or modified. Create the connection with Host server address, User name, Password, and Port number
22. In Folder, pick the scan job's folder. Leave Include file content on.
Condition: File name ends with
.json. Put steps 3–5 in the If yes branch; without it the flow runs four times per document.
Parse JSON. Content: the trigger's File content. Schema: Use sample payload to generate schema and paste a real
.jsonfrom the folder.
SFTP - SSH: Get file content using path. File path: the folder plus the parsed
pdf_file, for example/paige/invoices/@{body('Parse_JSON')?['metadata']?['pdf_file']}.
OneDrive for Business: Create file.
Folder Path: the destination folder (pick it with the folder icon).
File Name: built from Paige fields, ending in
.pdf:@{body('Parse_JSON')?['fields']?['Invoice Number']} - @{body('Parse_JSON')?['fields']?['Vendor Name']}.pdfOneDrive replaces characters it disallows with underscores, so a stray
/won't fail the step — but two documents with the same name will overwrite. Append the export timestamp frommetadata.export_timestampif that can happen.File Content: the output of step 4.
Save. What you should see: the flow checker reports no errors.
Want the data too? Add a second Create file with the trigger's own File content and File name to drop the .json next to the PDF. Most people don't.
Step 3 — Test it
Process one document through the scan job in Paige (review it if you required review) and wait for the export.
Open the flow's 28-day run history. What you should see: one successful run within a few minutes.
Open the OneDrive folder. What you should see: the PDF with the name you built, text selectable when opened.
When it doesn't work
| Symptom | Where to look |
|---|---|
| The flow never runs | Wrong folder in the trigger, or files landed in a subfolder. Files over 50 MB are skipped — use the (properties only) trigger plus Get file content for very long documents. |
| Runs four times per document | The .json condition is missing or misplaced. |
| Create file fails with access denied | The OneDrive connection isn't the folder's owner, or a tenant policy blocks the connector (download prevention, unmanaged-device controls). |
| The name is wrong or empty | The Parse JSON schema lacks that field. Regenerate it from a .json of the right document type. |
| Nothing arrives from Paige | Auto-export criteria aren't met, or the document was processed before you enabled auto export. Export it once from the Documents page with the Export button and tick FTP. |
If the Paige side is the problem, contact Ademero support with the scan job name and the message from Test Connection.
