Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Saving files to 'Attachment' table is inconsistent

I also posted this issue under the Power Automate community, but this could be a Dataverse issue.

Here is the link to the original post:
Flow saves attachments inconsistently to Dataverse - Power Platform Community (


The issue I'm having is consistently saving .pdf, .jpeg, .docx, .xlsx, .txt files to the Attachment default Dataverse table:



I have a Power Automate flow that, when an email with attachments is received, it goes on to create a record in the Email/ Email Messages Dataverse table, then create a record for each attachment in the Attachment Dataverse table and then I relate to the Email record corresponding to that.


My issue that sometimes the files do not get saved to the attachment table, while sometimes they do even though I am re-sending the same files. Here is the configuration of the "Add a new row" action for the Attachment table:



Here is the error code:

  "error": {
    "code": "0x80040216",
    "message": "The attachment body should be a valid Base 64 string",
    "@Microsoft.PowerApps.CDS.InnerError.Message": "The attachment body should be a valid Base 64 string"
I did try to use the base64() expression to convert the Attachment Content in hopes that it will fix the issue, but it still works inconsistently. 
Any ideas on why Dataverse or my flow is behaving this way?
Thank you!



Super User
Super User

Hi @bstroescu ,

Are you getting this issue for any specific file type?

Frequent Visitor



This issue happens with any file type. What I found was that if the flow gets triggered by the email being received, it will fail.


But, if I re-submit the same flow run manually it will succeed. 


I created a ticket with Microsoft to investigate this issue. I tried using expressions like base64() or base64ToBinary() in the Power Automate flow to store it. That will save the attachment, but the file will not open once downloaded.


I tried increasing the maximum file size on the attachments table, but that didn't help either. 

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (3,929)