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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / body('Get_attachment_c...
Power Automate
Unanswered

body('Get_attachment_content').$content

(0) ShareShare
ReportReport
Posted on by 34

please help me

 

Unable to process template language expressions in action 'Append_to_array_variable' inputs at line '1' and column '34082': 'The template language expression 'body('Get_attachment_content').$content' cannot be evaluated because property '$content' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions for usage details.'.

131244.pngsegdh.png

Categories:
  • ubk Profile Picture
    9 on at

    Since I found this post while looking for a solution for a similar probelm, I thought to add some pointer for the future visitors.

    First of all the screenshot here is ambiguous, there were two (2) attachments, the one with ".doc" extension was fine (confirmedby the green tick), and there must have been another attachment with ".txt" extension or content type as text, which got failed with that error.

    I have received some pointer from this post, which suggested to add a check on file name extension and wrap the content with base64 function for text files.

    So for regular files I have used:

    {
     "content": {
     "$content-type": "@{body('Get_file_content')['$content-type']}",
     "$content": "@{body('Get_file_content')['$content']}"
     },
     "Name": "@{items('Apply_to_each')?['{FilenameWithExtension}']}"
    }

    and for txt:

    {
     "content": {
     "$content-type": "text/plain",,
     "$content": "@{base64(body('Get_file_content'))}"
     },
     "Name": "@{items('Apply_to_each_-_attachments')?['FilenameWithExtension']}"
    }

    I would like to see a post with details on supported file types, since it was not very clear why the text attachments will fail. Also, it would be good to know if there are any other extensions / content types which are not supported. It wouldn't be ideal to create a condition for each such file types 😞

    ubk_0-1675815518371.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard