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

Community site session details

Session Id : HicA9I+xsqRvaz/cBSUf9D
Power Automate - Building Flows
Answered

Base64 from Outlook email attatchment

Like (0) ShareShare
ReportReport
Posted on 11 Feb 2020 03:12:33 by 232

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.

I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    on 18 Feb 2020 at 02:16:57
    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,

  • mrpowergage Profile Picture
    232 on 13 Feb 2020 at 05:51:32
    Re: Base64 from Outlook email attatchment

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

  • mrpowergage Profile Picture
    232 on 11 Feb 2020 at 08:25:08
    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.

  • v-bacao-msft Profile Picture
    on 11 Feb 2020 at 07:45:13
    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,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 786 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 724 Super User 2025 Season 2

#3
stampcoin Profile Picture

stampcoin 290 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete