Is there a way to backup activitymimeattachment to sharepoint? Activity images like email attachements are stored in activitymimeattachment asbase64 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.
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).
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.