cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pxtavern
Helper II
Helper II

The template language expression 'body('Get_file_content_using_path')['body']['$content-type']' cannot be evaluated because property 'body' doesn't exist

I am having issues pulling a image from a SharePoint site into a String variable in my flow. The image 100% exists and is even being used already in another flow as well. 

 

I pull the image through using: Get file content using path. I then initialize a string variable with this input:

 

<img src="data:@{body('Get_file_content_using_path')['body']['$content-type']};base64,@{body('Get_file_content_using_path')['body']['$content']}" alt="My Image"/> 

 

here is a screenshot of the flow at this point as well.

 

Pxtavern_0-1646213642034.png

 

When I try to run the flow I get this error:

Unable to process template language expressions in action 'Initialize_variable_varApproverSignature' inputs at line '0' and column '0': 'The template language expression 'body('Get_file_content_using_path')['body']['$content-type']' cannot be evaluated because property 'body' doesn't exist. Property selection is not supported on content of type 'image/png'. Please see https://aka.ms/logicexpressions for usage details.'.

 

Solutions online say to rebuild the flow which I have and I got the exact same error. Can anyone help? Have no idea what else to try currently. Thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Pxtavern
Helper II
Helper II

hi @CFernandes no luck with that one the flow wouldnt run however this one worked:

<img src="data:@{body('Get_file_content_using_path')['body']['$content-type']};base64,@{body('Get_file_content_using_path')['body']['$content']}" alt="My Image"/>

 

Thank you for your help anyway 🙂 

View solution in original post

8 REPLIES 8
CFernandes
Super User
Super User

Hey @Pxtavern 

 

Mate try this 

 

img src="@{body('Get_file_content_using_path')['$content-type']};base64, @{body('Get_file_content_using_path')['$content']}" alt="Red dot" /0

 

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!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

Pxtavern
Helper II
Helper II

hi @CFernandes no luck with that one the flow wouldnt run however this one worked:

<img src="data:@{body('Get_file_content_using_path')['body']['$content-type']};base64,@{body('Get_file_content_using_path')['body']['$content']}" alt="My Image"/>

 

Thank you for your help anyway 🙂 

Hey @Pxtavern 

 

I am glad that the problem has been resolved. I am using the Modern Power Automate Designer experience and my formula works for me 🙂

 

 

 

 

TechMate
New Member

I'm getting the same error though for me it's occurring when attempting to set the variable after initially creating it. The idea is when a form is submitted it checks for specific values. If the condition is met, the variable changes one way, if the condition is not met, the variable changes another way. 

TechMate_0-1647896651201.png

 

TechMate_1-1647896717940.png

TechMate_2-1647896849632.png

 

I've tried multiple ways to write the code, but it doesn't appear to be working with any method including the ones previously mentioned here. Any suggestions? 

 

Hi @Pxtavern , glad this was fixed. I noticed the new code that worked is exactly the same as the original code that you had problems with.

 

Original Code:    <img src="data:@{body('Get_file_content_using_path')['body']['$content-type']};base64,@{body('Get_file_content_using_path')['body']['$content']}" alt="My Image"/> 

 

Functional Code: <img src="data:@{body('Get_file_content_using_path')['body']['$content-type']};base64,@{body('Get_file_content_using_path')['body']['$content']}" alt="My Image"/>

 

I'm having the exact same issue, and have tried both of these codes, but neither worked. Can you explain what you did differently?

 

Thank you very much!

Hi @Bob_Trinh_IPV 

 

I didn't even realise that they were the same Sorry its been too long since I did this I have no idea what the flow was even for anymore. I don't remember doing anything differently. If I find the flow I will reply here if I can see any differences 

Bob_Trinh_IPV
Frequent Visitor

I understand, it's been months. If you're able to find it again to check I'll gladly appreciate it, but no pressure.

 

Thanks a bunch, hope you enjoy your day!

My flow just started complaining with this error. 

 

I found this question and then found the below blog. 

 

using the following worked for me 

outputs('Get_file_content_using_path')?['body'].$content

 

https://sam-seah.medium.com/send-weekly-email-summary-report-from-sharepoint-list-with-embedded-imag...

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,476)