Others

How to Get Power Pages Form Attachments with Power Automate

Tauseeq MagsiTauseeq Magsi Oct 23, 2026 868 views

Question details

Users need to process attachments submitted via Power Pages forms using Power Automate, but the file data is being returned as base64-encoded text instead of a usable file.

How to Get Power Pages Form Attachments with Power Automate
Product
Power Automate
Device & OS
not provided
Scenario
Building an automated workflow to handle, email, or save file uploads from a Dataverse-connected Power Pages form.
Observed behavior
Attachments are returned as base64-encoded content, causing subsequent workflow actions (like sending an email attachment) to produce corrupted or unreadable files.
Before you start

Ensure you have access to the Power Automate flow connected to your Power Pages site and possess basic knowledge of using expressions in the Power Automate interface.

Solution 1Recommended

Decode Base64 Attachment Data into Binary Content

Use the built-in Power Automate expression to convert the base64 string into a usable binary file format before passing it to other actions.

When files are uploaded through Power Pages and stored in Dataverse, they are often encoded in base64 to ensure safe transmission. Power Automate reads this raw string. To use the file in actions like 'Create file' or 'Send an email (V2)', you must convert the base64 string back into standard binary.

1
Retrieve the form submission data

Open your Power Automate flow and locate the trigger or action that captures the Dataverse record from your Power Pages form submission.

2
Identify the attachment content

Find the dynamic content field that represents the file attachment body, which currently holds the base64-encoded string.

3
Apply the base64ToBinary expression

In the action where you want to use the file (such as the 'Attachments Content' field in an email action), click on the field, switch to the 'Expression' tab, and enter the formula: base64ToBinary(triggerOutputs()?['body/documentbody']) (make sure to replace the parameter with your specific dynamic content).

4
Save and test the workflow

Save your Power Automate flow and submit a test attachment through your Power Pages form. Verify that the generated file or email attachment opens correctly without corruption.

Decode Base64 Attachment Data into Binary Content
Specify the Correct File Extension: When creating the file or email attachment, ensure you also dynamically map the correct file name and extension (e.g., .pdf, .docx). An incorrect extension will prevent the file from opening even if the binary decoding is successful.
Free Microsoft Office alternative

Open and Edit Your Downloaded Attachments with WPS Office

Once you have successfully routed your form attachments via Power Automate, you need a reliable suite to view and edit them. WPS Office is a lightweight, full-featured alternative to Microsoft Office that easily handles Word, Excel, PowerPoint, and PDF files.

  1. 1. Install WPS Office: Download and install WPS Office for free from the official website to manage your document attachments.
  2. 2. Open your attachments: Locate the downloaded attachment from your Power Automate workflow and double-click to open it directly in WPS Office.
  3. 3. Edit and save: Make any necessary changes using the highly compatible editing tools, then save the document in your preferred format.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx).Built-in PDF reader and editor for seamlessly reviewing form attachments.Lightweight installation with a familiar, easy-to-use interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why do Power Pages form attachments appear as text strings?

When attachments are saved in Dataverse via Power Pages, the file content is often stored and transmitted as a base64-encoded string. This is a standard encoding method used to translate binary data into text for safe transfer across networks.

What happens if I don't decode the base64 string in Power Automate?

If you pass the raw base64 string directly into a 'Create file' or 'Send email' action without converting it to binary, the system will save the raw text into the file. The resulting document will be corrupted or unreadable when you try to open it.

Can I use the same decoding method for multiple attachments?

Yes. However, if your form allows multiple file uploads, you will need to use an 'Apply to each' loop in Power Automate to iterate through the array of attachments, applying the base64ToBinary expression to the file content of each item individually.