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 69,639 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans