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

Base64 from Outlook email attatchment

Hi,

 

I'm stuck trying to get a email attatchment image to base 64.

 

I'm attempting to set a variable with the Attachments Contents ['contentBytes'] dynamic content, which I'm intending to use base(64) to give me the output I need. But I get this error:

 

Unable to process template language expressions in action 'Set_variable_3' inputs at line '1' and column '29003': 'The template language function 'base64ToString' expects its parameter to be a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#base64ToString for usage details.'.

 

In case this is anythning to do with it: when I look at the output from the tigger strangely it says that has attachement is false, however there is an attachments as you can see.

 

Mozilla_Firefox.png

Any help appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Base64 from Outlook email attatchment

 

Hi @mrpowergage ,

 

Sorry for my late reply!

I have tested it on my side, but there is nothing abnormal, Flow can run normally, the following is my Flow configuration. Include Attachment is set to Yes, Has Attachment is set to No.

135.PNG

It is worth noting that if you add a picture to the email body, the result of Has Attachment will be false, because the picture in the email body is not recognized as an attachment. But it can still be obtained by Flow, as long as you set the Include Attachment to Yes.

If it is an image added using Attach File, the result of Has Attachment will be true.

 

The above premise is that the Email body or the attachment contains pictures, then the Set variable action can be executed normally. Please ensure that such conditions are met.

Please try to recreate a similar Flow and try again.

 

Best Regards,

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.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Base64 from Outlook email attatchment

 

Hi @mrpowergage ,

 

Please try setting Include Attachment to Yes.

Please also provide a screenshot of the Flow configuration so that we can provide you with a suitable solution.

 

Best Regards,

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.
mrpowergage
Level: Powered On

Re: Base64 from Outlook email attatchment

Thanks @v-bacao-msft 

 


Please try setting Include Attachment to Yes.


makes no difference.

 

Here is the top of the flow. I get the error on set variable 3.

 

Edit_your_flow___Power_Automate-2-2.png

 

Edit_your_flow___Power_Automate-3.png

The Value in Set Variable 3 is: @{items('Apply_to_each_3')?['contentBytes']}

 

Thanks for your help.

Highlighted
mrpowergage
Level: Powered On

Re: Base64 from Outlook email attatchment

Hi @v-bacao-msft any update on this? thanks

Community Support Team
Community Support Team

Re: Base64 from Outlook email attatchment

 

Hi @mrpowergage ,

 

Sorry for my late reply!

I have tested it on my side, but there is nothing abnormal, Flow can run normally, the following is my Flow configuration. Include Attachment is set to Yes, Has Attachment is set to No.

135.PNG

It is worth noting that if you add a picture to the email body, the result of Has Attachment will be false, because the picture in the email body is not recognized as an attachment. But it can still be obtained by Flow, as long as you set the Include Attachment to Yes.

If it is an image added using Attach File, the result of Has Attachment will be true.

 

The above premise is that the Email body or the attachment contains pictures, then the Set variable action can be executed normally. Please ensure that such conditions are met.

Please try to recreate a similar Flow and try again.

 

Best Regards,

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.

View solution in original post

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,413)