I am following along with Eric Lott's blog post The Ultimate Guide to Migrating from SharePoint to Dataverse, trying to migrate a SharePoint list to Dataverse. The list has over 500 records and each record has a single attachment (generally a PDF) that I need to migrate over with the data, so I am unable to simply use a dataflow.
My flow runs successfully, but my issue is that the attachments are all named Untitled.txt, rather than the file name, and they display gobbly gook when I try to open them. I assumed that the issue was that I needed to use the Base64 function to convert the attachment content, but I could not get that working. Can anyone help me with this?
I actually figured this one out on my own with some more trial and error. I noticed a lot of other unanswered posts on topics similar to this one in my research, so I am posting my solution in case it helps someone else.
To migrate SharePoint data with attachments to Dataverse, follow guidance from Eric Lott's blog, adding in these additional steps:
1) Initialize a string variable for the file name after the initial trigger action for the flow
2) After the "Get Attachments" action, set the variable for the file name in an "apply to each" to the DisplayName from the "Get Attachments" action
3) In the "Upload a File or Image" to Dataverse action, do not use the Base64 function to set the Content property - just use the dynamic content to retrieve the body from the "Get Attachment Content" action as illustrated in Eric's blog.
4) In the "Content Name" property of the "Upload a File or Image", replace the text "Untitled" with the file name variable that you set.
Was this reply helpful?YesNo
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.