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 :
Small and medium business | Business Central, N...
Suggested answer

Power Automate sending a file attachment from Dataverse file column to Business Central

(0) ShareShare
ReportReport
Posted on by 622

Maybe there is someone in this forum who is well versed with both Power Automate and Business Central.

 

I'm using a Power Automate flow to send file attachments from a Dataverse File Column to Business Central. The flow works good, but the problem is that when i try to open the file in Business Central, its corrupted, and i can't view it. I believe something is wrong with the base64tobinary function. Any ideas? 

 

Here is part of how I get the file from Dataverse:

/AndyDo_0-1701716486679.png/

The full Compose 1 Inputs: decodeBase64(body('Download_a_file_or_an_image_1')?['$content'])

 

And how I attach this in Business Central:

 

/AndyDo_1-1701716628112.png/

The full Content: base64(body('Download_a_file_or_an_image_1'))

  • Suggested answer
    YUN ZHU Profile Picture
    62,477 Moderator on at
    Power Automate sending a file attachment from Dataverse file column to Business Central
    Hi, can you get this file directly? I also suspect that it is a problem with Decode in PowerAutomate. I have tried to get the file directly before and it can be transferred to BC.
    More details:
    How to automatically upload files from OneDrive to Business Central with Power Automate (No customization)
     
    If you can only pass Base64, you can consider using the function in BC to convert. Add a new field to save Base64 data. When the field is validated, it is automatically converted to the file. This is done in AL.
    For example,
    Dynamics 365 Business Central: How to import/create item picture from encoded text (Base64 String)
     
     
    Hope this helps.
    Thanks.
    ZHU

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard > Small and medium business | Business Central, NAV, RMS

Featured topics

Product updates

Dynamics 365 release plans