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

image from mail-attachment to base64 for plumsail docx

I am filling a docx template with pictures using the plumsail action.

I have a few attachments in my mail what .jpg photos are. 
How do i get these attachments in BASE64 so i can use them in the template?

When i use the formula:

base64(items('Attachments_maill')?['ContentBytes'])

I dont get a correct base64 formula. It is not starting with 'data:image/png;base64,' and i dont get it filled in the template. 
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: image from mail-attachment to base64 for plumsail docx

Hi @Oos 

 

When you put it into a variable of type string, it will do that. If you want to put that in a variable you should use the binary() function. Wrap the attachment content in the binary() function and add the expression in the variable. 

 

Hope this Helps!

5 REPLIES 5
Super User
Super User

Re: image from mail-attachment to base64 for plumsail docx

Hi @Oos 

 

Can you please share more details on this? If you are getting attachments from mail, the Attachment content is already base64 encoded and you do not have to encode it any further. 

 

Can you please share a screensot of the flow so that we might be able to assist you better?

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Oos
Level: Powered On

Re: image from mail-attachment to base64 for plumsail docx

Knipsel11.PNG

Im using the Attachment content - Dynamic content. And if i put this in a variable i get this:
Knipsel22.PNG

This input is definitily not base64

Super User
Super User

Re: image from mail-attachment to base64 for plumsail docx

Hi @Oos 

 

When you put it into a variable of type string, it will do that. If you want to put that in a variable you should use the binary() function. Wrap the attachment content in the binary() function and add the expression in the variable. 

 

Hope this Helps!

Oos
Level: Powered On

Re: image from mail-attachment to base64 for plumsail docx

Thanks. The binary function works perfect

Highlighted
Super User
Super User

Re: image from mail-attachment to base64 for plumsail docx

@Oos 

 

Glad that it worked! Happy Flowing Smiley Happy

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 194 members 4,270 guests
Please welcome our newest community members: