web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Attachments from Dataverse row then duplicating to SharePoint list as attachment corrupts the file

(0) ShareShare
ReportReport
Posted on by 734 Super User 2025 Season 2
Hello Community, 

I have an automated flow that triggers when an item is added to the dataverse which copies all the details and duplicates all the info into a sharepoint list item. 

All is working well but the problem is the file is corrupted and cannot be opened in the attachments of the SP list item.  

I will share all the necessary steps that I've used to get the attachment from the dataverse row to the sharepoint list item below: 

1) I used a List Rows action of the Notes table then filtered it using the id of the trigger. 

 
2) I created a loop with the body/value of the list rows action

 
3) in the add attachment action, I pointed it to the sharepoint list, the ID in this action is from a previous action that duplicated the dataverse details to the sharepoint list item. Which is 100% working
 
the file name expression:  items('For_each_-_row_attachments')?['filename']
 
the file content expression: items('For_each_-_row_attachments')?['documentbody']
 
 
it is being attached to the sharepoint list item with the correct file name but you cannot open it 

 
sometimes it says but its a jpg file which should be able to be opened. So I figured it might have something to do with the file content being damaged or corrupted.

I have the same question (0)
  • Verified answer
    chiaraalina Profile Picture
    575 on at
    Attachments from Dataverse row then duplicating to SharePoint list as attachment corrupts the file
    Hi
     
    You might need to convert the Base64 file content into binary before passing it to SharePoint. Have you tried using base64ToBinary()?
     
    base64ToBinary(items('For_each_-_row_attachments')?['documentbody'])
  • KevinGador Profile Picture
    734 Super User 2025 Season 2 on at
    Attachments from Dataverse row then duplicating to SharePoint list as attachment corrupts the file
    thanks it worked :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 714 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 519 Moderator

#3
chiaraalina Profile Picture

chiaraalina 317

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow