[Solved] AttachmentContentNotValidBase64String Error in Power Automate

Recently, while working on an approval workflow for our Power Platform Course, I had to attach supporting documents, images, PDFs, Excel files, and other documents to the Start and wait for an approval text action in Power Automate. Everything worked smoothly until I reached the step where the flow needed to send attachments.

However, none of the attachments were accepted, regardless of the file type. Whether I used PDF, JPG, PNG, or even TXT files, Power Automate threw the same error:

AttachmentContentNotValidBase64String
AttachmentContentNotValidBase64String error in Power Automate approval

At first, I thought the problem might be related to the file format, but after testing multiple attachment types, it became clear that the real issue was not the file; it was how the attachment content was being passed into the approval process.

In this tutorial, I will explain why this error occurs across all attachments and how you can fix it with a simple Base64 conversion using the exact working expression.

[Error] AttachmentContentNotValidBase64String in Power Automate

This error occurs because the approval action in Power Automate expects a valid Base64-encoded string, but the attachment content being passed is in binary format, not Base64.

When working with attachments, actions like Get attachment content or Get file content return raw binary data, not Base64. If this binary output is sent directly to the approval action, Power Automate cannot process it.

That’s when the error occurs:

AttachmentContentNotValidBase64String

The error happens only when the attachment content is not properly encoded. Whether the attachment is a PDF, image, Excel file, or text document, the approval action will fail if the content is not Base64.

Most of the time, this issue occurs when the attachment object is built like this:

{
"name": "@{items('For_each')?['DisplayName']}",
"content": "@{body('Get_attachment_content')}"
}
AttachmentContentNotValidBase64String Error in Power Automate

Since this passes binary data, the approval step rejects it immediately.

How to Fix: AttachmentContentNotValidBase64String

To fix this issue, you must ensure that the file content is always Base64 encoded before sending it to the approval action.

{
  "name": "@{items('For_each')?['DisplayName']}",
  "content": "@{base64(body('Get_attachment_content'))}"
}
Fix AttachmentContentNotValidBase64String in Power Automate Approval

This converts binary into a valid Base64 and makes the approval action accept the attachment.

Now, when you run the flow, it will work without any errors. I hope you find this article helpful. If you run into any issues, feel free to comment below.

Also, you may like the following tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Live Webinar

Quiz App Using SharePoint Framework (SPFx)

Learn to built a complete Quiz Management solution that enables admins to create and manage quizzes, categories, questions, and settings with an easy automated setup process in SharePoint. It also includes an interactive quiz experience for users and a powerful dashboard to track participation, analyze results, and view detailed performance reports with charts and answer insights.

📅 2nd June 2026 – 10:00 AM EST | 7:30 PM IST

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App