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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Save Base64 file to sh...
Power Apps
Answered

Save Base64 file to sharepoint

(0) ShareShare
ReportReport
Posted on by 32
Is there a way to backup activitymimeattachment to sharepoint? Activity images like email attachements are stored in activitymimeattachment as base64 but I would like to convert each file from its base64 and save it to sharepoint. I've tried base64ToBinary() function in Power automate but it did not work. So if any of you can help or have some ideas.
Categories:
I have the same question (0)
  • Verified answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    i fixed with the following steps:

    1. Trigger the Flow: Use a trigger such as "When a record is created/updated in Dataverse" to detect new or modified attachments in the activitymimeattachment tables Alternatively, use a manual trigger to process existing attachments.
     
    2. Retrieve the Attachments: Use the Dataverse "Get a row by ID" action to fetch the attachment record from the activitymimeattachment table. Ensure the following fields are included: filename (name of the attachment) body (base64 content) mimetype (MIME type of the attachment, e.g., application/pdf, image/jpeg).
     
    3. Decode the Base64 Content: Add a Compose action in Power Automate. Use the following expression to decode the base64 content: base64ToBinary(triggerOutputs()?['body/body']) - Replace triggerOutputs()?['body/body'] with the correct reference to the body field containing the base64 data.
     
    4. Create the File in SharePoint: - Use the "Create file" action in the SharePoint connector - Specify the folder path where the file should be saved. Set the File Name to the value of filename. Set the File Content to the output of the Compose action (decoded binary).

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard