web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Attachments are not co...
Power Automate
Unanswered

Attachments are not converting to base64

(0) ShareShare
ReportReport
Posted on by 84

 Hi,

 

I have created the flow which retrives the attachments from Dynamics CRM email and then create folder and add attachments in SharePoint.

 

I am converting the attachment to base64 as in below screenshort.

sharepoint 1.png

 

base64ToBinary(items('Apply_to_each_2')?['body'])

when i run flow attachments get created and it works properly.

 

but I noticed that the value of File Content is changing automatically as per below.

sharepoint2.png

due to which I am gettig error when I open document in sharepoint.

error2.pngerror1.png

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @vaishalivyas1,

     

    Could you share the full screenshots of your Flow configuration?

    I have tested it on my side. If the content of the file is not in the standard pdf format, then the same error will occur.

    I noticed that you filled in the content of the Body, is this the content of the email body, or the Body when you get the Attachment?

    This Body seems to contain the attachment File content, but not the File content.

    I am wondering if you are not using the contents of the correct attachment file to fill the File Content. The screenshot shows that the file is a pdf file. If the file content does not match, it cannot be opened normally.

    Please provide more details and we may provide a proper workaround for you.

     

    Best Regards,

    Barry

  • Tom_Slosse Profile Picture
    1,430 on at

    Hey @vaishalivyas1

     

     

    Just like @v-bacao-msft said you need to put the File Content of the attachment in the File Content property of the Create File action otherwise your file that will be created has no content.

     

    Kind regards

     

     

    Tom

  • vaishali_37 Profile Picture
    84 on at

    Body when I get the Attachment.
    Steps I perform:
    1. I retrieve all the attachment related to that Mail.
    2. We check Document Location in MS CRM if present we create attachment file in sharepoint else we create document location in MS CRM and then attachment file in Sharepoint.
     
    at1.pngat2.png
    at5.pngat4.png
     
     
  • Tom_Slosse Profile Picture
    1,430 on at

    Hey @vaishalivyas1

     

     

    If I see this correct those actions you defined of Dynamics are just renamed actions but arent actually actions to get the attachment out of Dynamics right.

     

    Maybe you should look for actions that are specially made to get attachments.

     

    Kind regards

     

     

    Tom

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 173 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 95 Super User 2026 Season 1

Last 30 days Overall leaderboard