# 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.

Product: paige · Audience: system-administrator · Time: 45 minutes · Last verified: 2026-09-05

Canonical: https://help.ademero.com/paige/integrations/send-paige-documents-to-onedrive-with-power-automate

**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

1. In Paige, open **Settings** (the gear at the bottom of the left menu — administrators only), pick the scan job, and choose **Export**.
2. 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`.
3. Click **Test Connection**. **What you should see:** `FTP connection successful!` Connect — `Connected to FTP Server!` and a green **Connected** label on the card.
4. 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](/paige/document-processing/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**.

1. **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.

2. **Condition:** *File name* **ends with** `.json`. Put steps 3–5 in the **If yes** branch; without it the flow runs four times per document.

3. **Parse JSON.** Content: the trigger's *File content*. Schema: **Use sample payload to generate schema** and paste a real `.json` from the folder.

4. **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']}`.

5. **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']}.pdf
     ```
   
     OneDrive 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 from `metadata.export_timestamp` if that can happen.
   - **File Content:** the output of step 4.

6. **Save.** **What you should see:** the flow checker reports no errors.

> **NOTE:** 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

1. Process one document through the scan job in Paige (review it if you required review) and wait for the export.
2. Open the flow's **28-day run history**. **What you should see:** one successful run within a few minutes.
3. 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**.

## What's next

- [Connect Paige to OneDrive](https://help.ademero.com/paige/integrations/connect-paige-to-onedrive)
- [Connect Paige to any app with Zapier, Make, or Power Automate](https://help.ademero.com/paige/integrations/connect-paige-to-any-app-with-zapier-make-or-power-automate)
