cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vaishalivyas1
Level: Powered On

Attachments are not converting to base64

 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

4 REPLIES 4
Community Support Team
Community Support Team

Re: Attachments are not converting to base64

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

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Attachments are not converting to base64

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





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Highlighted
vaishalivyas1
Level: Powered On

Re: Attachments are not converting to base64


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
 
 
Super User
Super User

Re: Attachments are not converting to base64

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

 





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,979)