Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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

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
    YUN ZHU 64,563 Super User 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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans