Power Apps: Print Directly to a Printer with an API, from Shane Young
How to print directly from Power Apps to a physical printer using a cloud print API called from Power Automate, since Power Apps has no native printing capability.
TL;DR: Power Apps can’t print to a physical printer. Call a Power Automate flow from the app (
'Print Label'.Run(...)), let the flow read or build the PDF, and post it as base64 to a cloud print API such as PrintNode with the premium HTTP action. A small client on a PC next to the printer picks up the job and prints it.
Power Apps has no built-in way to send a document to a physical printer, and there is no Print() function for that. Shane Young demonstrates a practical workaround: generate the document, then let a Power Automate flow hand it off to a cloud print API that talks to the actual printer.
💡 Challenge
Power Apps runs in a browser sandbox or in the mobile player. Both are deliberately blocked from talking to hardware, including printers. That’s true on a phone, a tablet and a desktop browser. A warehouse label, a visitor badge or a work order that should come out of a specific printer therefore can’t be printed from the app itself, and asking the user to download and print the file breaks the process.
✅ Solution
Move the print job out of the app:
🔸 The app calls a Power Automate flow and passes what to print (for example the ID of a record or the path of a PDF).
🔸 The flow gets the PDF as base64 and posts it to a cloud print API with the HTTP action.
🔸 The print service’s client software runs on a Windows, Mac or Linux PC that has the printer installed. It polls the cloud service and sends the job to the printer. No inbound firewall rule or VPN is needed.
The example below uses PrintNode, the service shown in the video. Other cloud print services work the same way with their own endpoint.
🔧 How It’s Done
1. Set up the print service.
🔸 Create a PrintNode account, install the PrintNode client on the PC with the printer and note the printer ID the client registers.
🔸 Create an API key in the PrintNode account. Keep it out of the flow definition: put it in a text environment variable of the solution (example below), or in Azure Key Vault and read it with the Dataverse action Perform an unbound action → RetrieveEnvironmentVariableSecretValue.
2. Build the flow.
🔸 Create the flow inside a solution, so it can use the environment variable. Trigger: Power Apps (V2) with a text input, for example FilePath.
🔸 Get the PDF, for example with SharePoint Get file content using path. The base64 content is in body('Get_file_content_using_path')?['$content'].
🔸 Add the HTTP action:
- Method:
POST - URI:
https://api.printnode.com/printjobs - Headers:
Content-Type=application/jsonandAuthorization=@{concat('Basic ', base64(concat(parameters('PrintNode API Key (contoso_PrintNodeApiKey)'), ':')))} - Body:
1
2
3
4
5
6
7
{
"printerId": 12345678,
"title": "Label @{triggerBody()?['text']}",
"contentType": "pdf_base64",
"content": "@{body('Get_file_content_using_path')?['$content']}",
"source": "Power Automate"
}
🔸 PrintNode uses HTTP Basic authentication with the API key as user name and an empty password. That’s why the expression appends a colon to the key before it encodes it.
🔸 Turn on Secure inputs and Secure outputs in the HTTP action’s settings so the key doesn’t show up in the run history.
🔸 Optional: add Respond to a Power App or flow and return the print job ID from the HTTP response body.
3. Call the flow from the app.
🔸 In Power Apps Studio add the flow in the Power Automate pane, then call it from a button:
1
'Print Label'.Run(Gallery1.Selected.FilePath)
🔸 The call always uses the flow’s own name followed by .Run(), with one argument per trigger input in the order of the inputs.
🎉 Result
The user taps a button in the app, and a few moments later the label or document comes out of the printer at the desk, in the warehouse or at the front desk. Nobody downloads, opens or prints a file by hand.
🌟 Key Advantages
🔸 No user steps: printing happens in the background, triggered from the app.
🔸 Any printer the client can see: local USB printers and network printers on the client PC work the same way.
🔸 Works from mobile: the phone only calls the flow. It never needs a printer driver.
🔸 No firewall changes: the client polls the cloud service, nothing has to reach into your network.
⚠️ Good to Know
🔸 Licensing: the HTTP action is a premium connector. Every user who runs the app needs Power Apps Premium (flows in the context of the app are covered) or Power Automate Premium.
🔸 Costs: PrintNode is a paid third-party service. New accounts get the first month free, and plans are billed by print requests per month (one API call counts as one print, independent of the page count). Check the current prices at printnode.com/pricing.
🔸 The client PC must be on: if the PC with the PrintNode client is off, jobs wait until it comes back.
🔸 Simpler alternative: if a person is in the loop anyway, generate the PDF, send it by email or open it with Launch(), and let the user print it.
🎥 Video Tutorial
🛠️ FAQ
1. Can Power Apps print directly to a physical printer?
Not natively. Power Apps runs in a browser or mobile app sandbox with no access to local or network printers. The workaround is to call a Power Automate flow that sends the document to a cloud print API, which delivers the job to a registered printer.
2. Which license do I need?
The HTTP action that calls the print API is a premium connector, so every user who runs the flow needs a premium license: Power Apps Premium covers flows that run in the context of the app, otherwise Power Automate Premium. The print service itself is a separate, paid third-party subscription.
3. What document types can this pattern print?
Anything the print API accepts. PrintNode accepts PDF and raw printer data, either as a URL (pdf_uri, raw_uri) or as base64 content (pdf_base64, raw_base64). Generate labels, forms or reports as a PDF first (for example with the free approaches in #PowerPlatformTip 92), then send that file to the print API.
🔗 Related Tips
🔸 #PowerPlatformTip 92: ‘Free PDF Tools in PowerAutomate’ - generate the PDFs you send to this print flow, without premium connectors.
🔸 PowerApps PDF Viewer SharePoint Document Library without Flow - the read-side counterpart, viewing PDFs directly inside the app.
🔸 #PowerPlatformTip 58: ‘HTTP Actions’ - the basics of the HTTP action used for the print API call.
You can see this video here on my blog because I have rated this video with 5 stars in my YouTube video library. This video was automatically posted using PowerAutomate.
This tip is by Marcel Lehmann, Microsoft MVP (Business Applications) and founder of the Power Platform Academy – live Power Platform workshops, free or CHF 49. Join the workshop waitlist to get notified about new dates. For companies that want this implemented for them, see KMUpower – Power Platform consulting & automation for SMEs (DACH).