cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bstroescu
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 (microsoft.com)

 

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

bstroescu_0-1648147697815.png

 

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:

bstroescu_1-1648147934051.png

 

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!





 

 

2 REPLIES 2
Prakash4691
Super User
Super User

Hi @bstroescu ,

Are you getting this issue for any specific file type?

bstroescu
Frequent Visitor

@Prakash4691

 

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

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (3,784)