Power Automate Print to Local Printer: Cloud Flow Guide
Print SharePoint PDFs on a local printer from a Power Automate cloud flow. Configure the HTTP request, handle PDF content correctly, and avoid desktop UI automation.
By the PrintScaler team · · 10 min read
You can make Power Automate print to a local printer by sending an HTTPS request from a cloud flow to PrintScaler, whose local agent delivers the document to the printer. The cloud flow does not need to open a PDF viewer or control a desktop session. This guide builds a SharePoint-to-printer workflow and explains the content handling, authentication, and failure checks needed to run it reliably.
How Power Automate cloud printing works
A Power Automate cloud flow runs outside your office network. It cannot simply select the USB printer attached to your receptionist’s computer or use a print queue installed on a warehouse PC.
An intermediary has to connect the cloud workflow to that local printer. With PrintScaler, the path is:
SharePoint PDF → Power Automate cloud flow → PrintScaler API → local agent → printer
The agent runs on Windows, macOS, Linux, or Raspberry Pi. It establishes an outbound WebSocket connection, so the agent-based setup does not require port forwarding or an inbound firewall opening.
Your flow submits a PDF and a printer ID. PrintScaler routes the request to the computer associated with that printer.
This approach is useful for:
- Printing approved invoices placed in a SharePoint library.
- Sending completed inspection forms to an operations desk.
- Printing packing slips generated by another business system.
- Producing a paper copy when a document reaches a defined workflow stage.
The important boundary is that Power Automate decides when and where to print. PrintScaler handles delivery to the connected printer.
Cloud API printing versus a desktop flow
Power Automate desktop flows can automate applications on a Windows machine, including workflows that open documents and print them. That can be appropriate when an essential step exists only inside a desktop application.
For an existing PDF, however, an API avoids automating menus, windows, and print dialogs.
| Approach | How printing happens | Main consideration |
|---|---|---|
| Cloud flow with PrintScaler | An HTTP action submits the document to a printer connected through the agent | Requires API access and an available printer host |
| Desktop flow | Automation runs on a Windows machine and interacts with applications or local printing tools | Requires an appropriately configured machine and execution environment |
| Manual printing | A person opens the document and selects Print | Suitable for exceptions, but not automatic processing |
A cloud flow with an agent is not a completely computer-free setup. The agent computer must be running and able to access the printer. It does remove the need to keep a PDF viewer open or drive a desktop application’s print dialog.
Also check Microsoft licensing before implementation. The HTTP action used for an arbitrary API request generally requires premium Power Automate capabilities; confirm the requirements for your flow and tenant rather than assuming Microsoft 365 includes everything needed.
What you need before building the flow
Prepare these items:
- A Power Automate environment with access to the required SharePoint and HTTP actions.
- A SharePoint document library containing printable PDFs.
- A PrintScaler account and API key.
- A supported computer that can already print to the target printer.
- A decision about which business event should authorize printing.
Use a dedicated test folder or library first. An unrestricted file-created trigger can turn an ordinary bulk upload into a large print run.
This tutorial uses a newly uploaded PDF as the trigger. In production, an approval result or explicit “Ready to print” transition may be a better business event.
Step 1: Connect the local printer to PrintScaler
First, print a PDF manually from the computer that will host the agent. Fix driver, paper, and connectivity issues before introducing the cloud flow.
Next:
- Download the PrintScaler agent for that computer.
- Install it and enter the dashboard pairing code to link the computer.
- Find the reported printer in the dashboard.
- Use the dashboard’s test page button.
- Record the printer ID for your flow.
The agent starts automatically after reboots and updates itself. Nevertheless, the computer still needs power, network connectivity, and access to its printer.
For the first version, use one fixed printer ID. Add routing rules only after a single-printer workflow works consistently.
Step 2: Create a SharePoint PDF trigger
Create an automated cloud flow using SharePoint’s When a file is created (properties only) trigger. Select your site and document library.
Add a condition that checks the File name with extension dynamic value and allows only files ending in .pdf. Make the comparison case-insensitive so that .PDF files are not accidentally excluded.
Depending on your library setup, you may also need to exclude folders or restrict processing to a particular folder.
Inside the PDF branch, add SharePoint’s Get file content action:
- Use the same site address.
- Set File Identifier to the trigger’s Identifier value.
Do not substitute the document’s numeric list item ID for the file identifier in this field. They identify different things in the SharePoint connector.
For easier expression editing, name this action Get_file_content before building later steps.
Choose a trigger that matches the business event
A file-created trigger means “print when uploaded,” not “print when approved.” If approval happens later, trigger printing after that approval instead.
Likewise, avoid a broad file-modified trigger unless you deliberately control which modifications should cause printing. Updating a status field after printing can otherwise trigger the same flow again.
The business rule should be understandable in one sentence, such as: “Print the first approved version of every invoice in this library.”
Step 3: Put the PDF into the correct API format
PrintScaler accepts PDFs as a URL using pdf_uri or as base64 content using pdf_base64.
For a protected SharePoint document, base64 is usually the straightforward choice. The SharePoint connector retrieves the file under its configured connection, and the flow sends the resulting PDF bytes to PrintScaler.
Do not put an ordinary SharePoint browser link into pdf_uri and expect it to work. A URL requiring Microsoft sign-in is not automatically accessible to a separate printing service.
Use the PDF payload, not its metadata
Power Automate connector outputs can represent file content differently. Inspect a controlled test run before selecting the expression.
If the output is a content envelope like this:
{
"$content-type": "application/pdf",
"$content": "JVBERi0xLjcK..."
}
The $content property already contains base64. Use this expression:
body('Get_file_content')?['$content']
If the action exposes a binary body rather than that envelope, the applicable conversion is:
base64(body('Get_file_content'))
These are alternatives, not sequential steps. Applying base64() to a string that is already base64 encodes it a second time and produces invalid PDF content for printing.
Do not send the entire metadata object, a filename, or a SharePoint sharing link as the content value.
File size matters here too: base64 increases the payload size. Check the applicable Power Automate action and connector limits when working with large PDFs, and test with realistically sized files before rollout.
Step 4: Add the HTTP print request
Add an HTTP action after the file-content step.
Configure it as follows:
| Field | Value |
|---|---|
| Method | POST |
| URI | https://api.printscaler.com/v1/printjobs |
| Content-Type header | application/json |
| Authorization header | Bearer YOUR_PRINTSCALER_API_KEY |
| X-Idempotency-Key header | A stable identifier for this intended print operation |
The JSON body has this structure:
{
"printerId": 123,
"contentType": "pdf_base64",
"content": "BASE64_PDF_CONTENT",
"title": "Approved invoice"
}
Replace 123 with your actual printer ID. Insert the file-content expression as the content value using the Power Automate expression editor; do not leave the placeholder text in the request.
For the envelope representation described above, the body can look like this in the action definition:
{
"printerId": 123,
"contentType": "pdf_base64",
"content": "@{body('Get_file_content')?['$content']}",
"title": "SharePoint invoice"
}
Start with a fixed title. Once the request works, use dynamic content for a useful document name or business reference. Avoid adding sensitive document details to job titles unnecessarily.
The print job API reference documents the request format. Printer capabilities, including supported paper sizes and trays, are also readable through the API if you later need more specific print settings.
Protect the API key and document content
Keep the API key in the cloud flow, not inside a document, browser script, or public form. Restrict who can view and edit the flow.
Use Power Automate’s secure input and output settings where appropriate to reduce exposure of credentials and PDF content in run history. Apply those protections to the relevant upstream actions as well, not only the final HTTP action.
Step 5: Make retries safe
A timeout does not necessarily mean the print request failed. The API might have accepted the job before Power Automate lost the response.
Set X-Idempotency-Key to the same value whenever the flow retries the same intended print operation. PrintScaler supports idempotency keys so that retrying a request does not print it twice.
For one original print per item in a dedicated SharePoint library, an expression could be:
concat('sp-approved-invoices-', string(triggerBody()?['ID']), '-original')
Here, sp-approved-invoices is your chosen library-specific namespace. Use different namespaces for other sites or libraries because numeric item IDs are not globally unique.
This example assumes that your trigger exposes the item ID as ID. Check your trigger output or insert its ID dynamic value when constructing the expression.
Do not generate a fresh random key inside each retry. That makes every retry look like a new operation.
For an intentional reprint, create a separate reprint event with a different stable identifier. If printing each approved document version is the requirement, include a stable version or approval-event identifier instead of using the item ID alone.
Idempotency protects submission retries; your workflow still needs clear rules about what counts as a new authorized print. For a deeper treatment, see the guide to preventing duplicate print jobs.
Step 6: Separate submission from completion
A successful HTTP action means the API request succeeded. It does not, by itself, prove that a sheet has physically emerged from the printer.
PrintScaler tracks states including new, sent_to_client, queued, in_progress, done, error, cancelled, and expired.
Design your own workflow statuses accordingly:
- Ready: the document has authorization to print.
- Submitted: the API accepted the request.
- Completed: your monitoring process observed the expected completion state.
- Needs attention: an error, expiry, or business-defined delay requires review.
These are suggested application statuses, not additional PrintScaler API states.
For initial testing, inspect job history in the dashboard. For production automation, use print job state webhooks or API-based monitoring. Webhooks are HMAC-SHA256 signed and retried; any receiving workflow or intermediary should validate signatures and safely handle repeated deliveries.
If you record submission results back in SharePoint, capture the actual identifiers returned by the API rather than assuming an undocumented response-field name.
Handle an offline printer computer deliberately
PrintScaler queues jobs while the computer is offline and sends them when it reconnects, subject to configurable job expiry.
That helps with brief interruptions, but delayed printing can be wrong for time-sensitive documents. A replacement packing slip printed after a shipment has already departed may create confusion.
Decide in advance:
- How long a document remains useful.
- When staff should be notified about a delay.
- Whether expired jobs require manual review.
- Who can authorize a replacement print.
Also distinguish an offline computer from a printer problem. A connected agent does not eliminate paper jams, empty trays, or driver issues.
For workflows that route documents between branches, the multi-location printing guide explains how to separate destination selection from submission.
Troubleshooting Power Automate printing
| Symptom | What to check |
|---|---|
| HTTP action returns an authentication error | Confirm the API key and the Bearer prefix, including the separating space |
| Request succeeds but nothing prints | Check job history, agent connectivity, the selected printer, and the local operating-system queue |
| PDF cannot be processed | Check for double base64 encoding, metadata sent as content, or a non-PDF source file |
| SharePoint file retrieval fails | Verify the connector connection, site address, and file Identifier value |
| The same document prints repeatedly | Review modified-file triggers, self-triggering status updates, and idempotency-key construction |
| Output uses the wrong paper or tray | Check printer capabilities, driver defaults, and supported PDF print options |
| An old document prints after reconnection | Review job expiry and your delayed-job handling rules |
Troubleshoot one layer at a time: local test print, dashboard test page, PDF retrieval, HTTP submission, then completion monitoring. Changing all five layers at once makes the failure harder to isolate.
Test the workflow before enabling it broadly
Run a small acceptance test using non-sensitive PDFs:
- Upload a one-page PDF and confirm it reaches the intended printer.
- Upload a non-PDF and confirm the flow ignores it.
- Retry the same print operation with the same idempotency key and check that it does not create a duplicate print.
- Disconnect the agent computer, submit a test document, and inspect the queued behavior.
- Reconnect the computer and verify the expected outcome.
- Confirm that failures are visible to the person responsible for the printer.
Check costs separately for Microsoft automation and printing. PrintScaler charges per print request, not per page. Its Free plan includes 100 prints per month and one connected computer; check the current plans when sizing a production workflow.
Turn a cloud event into a reliable paper workflow
The practical solution is a cloud flow that retrieves a PDF, submits it through an authenticated HTTP request, and tracks the resulting job separately from the business approval. Correct base64 handling, stable idempotency keys, and an explicit offline policy matter more than automating a print dialog.
Create a free PrintScaler account, connect one printer, and test a single SharePoint PDF before expanding the workflow.
Frequently asked questions
Can Power Automate cloud flows print directly to a local printer?
A cloud flow cannot directly use a USB printer or an operating-system print queue on your office computer. It can send an HTTP request to PrintScaler, whose agent connects the cloud request to the local printer.
Do I need Power Automate Desktop to print a PDF?
Not when the PDF is submitted through a printing API. A Power Automate cloud flow can retrieve the PDF and send it to PrintScaler, although the agent-based setup still requires a running computer connected to the printer.
Can I send a SharePoint document link instead of base64?
Only if the URL is accessible to the printing service and returns the PDF content. An ordinary SharePoint link requiring Microsoft authentication will not work automatically; retrieving the file with the SharePoint connector and using pdf_base64 is usually simpler.
Does the HTTP action require a premium Power Automate license?
The HTTP action used to call an arbitrary external API generally requires premium Power Automate capabilities. Verify the licensing requirements for your tenant and flow, including how the flow is triggered and used.
What happens if the printer computer is offline?
PrintScaler queues jobs while the computer is offline and delivers them after reconnection, subject to configurable expiry. Choose an expiry policy that prevents outdated documents from printing after they are no longer useful.
How do I stop a Power Automate retry from printing twice?
Send a stable X-Idempotency-Key with the print request and reuse it for retries of the same intended operation. Give an intentional reprint its own identifier, and avoid triggers that repeatedly authorize printing for unrelated document updates.