Skip to main content

Notifications

Small and medium business | Business Central, N...
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 71,565 Super User 2024 Season 2 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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans