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

Flow no longer working - Property selection is not supported on values of type 'String'

I have a Flow that has been working flawlessly up until 2 weeks ago. Now, each time I run the flow I get the following error: 

 

InvalidTemplate. Unable to process template language expressions in action 'Append_to_array_variable' inputs at line '1' and column '2330': '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.'.

 

This particular flow is supposed to send multiple attachments in an email when a new SharePoint list item is created. This WAS working just fine but all of a sudden stopped.

 

In order to get the $content for "ContentBytes", I used the following expression: body('Get_attachment_content').$content and it saved as $content. Detailed steps for this Flow can be found on my blog: Emailing List Attachments in Office 365

 

I have added a screenshot of the Flow itself. Any help on this would be greatly appreciated, I have just about given up on this.

 

GetImage.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Flow no longer working - Property selection is not supported on values of type 'String'

Hi @BigE,

 

Could you please show a bit more about the Attachment files of the new created item?

 

I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below;10.JPG

 

11.JPG

Within "Append to array variable" action, Value field set to following json data:12.JPG

The corresponding value of the ContentBytes key set to following formula:

body('Get_attachment_content')?['$content']

Note: The Attachment files are PDF file and Excel file on my side.

 

The flow works successfully as below:13.JPG

14.JPG

 

 

The error message told that the $content property could not detected using the 'body('Get_attachment_content')?['$content']' within your "Append to array variable" action. I have made a test on my side, if the attachment file is a .txt file, the error would show up as you mentioned.

 

Please check if the Attachment files of the new created item contain .txt file, if the Attachment files contain .txt file, the result the 'body('Get_attachment_content')?['$content']' expression returned doesn't contain the $content property.

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
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

Highlighted
Helper II
Helper II

Re: Flow no longer working - Property selection is not supported on values of type 'String'

@PatrickOToole1 / @mahesh_mohan ,

 

Someone replied back to me on my blog post about this stating they found a work around:

https://social.technet.microsoft.com/wiki/contents/articles/51752.send-list-item-attachments-to-inte...

You have to enclose the body function with a base64 function to encode the txt file ( I added an if statement to see if the attachment ended with .txt to determine if I had to add the encoding or not)

 

I attempted this but did not have much time to devote to it so I moved on. Feel free to try it and let me know if it works.

 

-Eric

View solution in original post

6 REPLIES 6
Highlighted
Community Support
Community Support

Re: Flow no longer working - Property selection is not supported on values of type 'String'

Hi @BigE,

 

Could you please show a bit more about the Attachment files of the new created item?

 

I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below;10.JPG

 

11.JPG

Within "Append to array variable" action, Value field set to following json data:12.JPG

The corresponding value of the ContentBytes key set to following formula:

body('Get_attachment_content')?['$content']

Note: The Attachment files are PDF file and Excel file on my side.

 

The flow works successfully as below:13.JPG

14.JPG

 

 

The error message told that the $content property could not detected using the 'body('Get_attachment_content')?['$content']' within your "Append to array variable" action. I have made a test on my side, if the attachment file is a .txt file, the error would show up as you mentioned.

 

Please check if the Attachment files of the new created item contain .txt file, if the Attachment files contain .txt file, the result the 'body('Get_attachment_content')?['$content']' expression returned doesn't contain the $content property.

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
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

Highlighted
Helper II
Helper II

Re: Flow no longer working - Property selection is not supported on values of type 'String'

So yeah, I tested with an image just now and the Flow ran as expected. It seems to just fail when a .txt file is attached. I wonder what the limitation is in regards to attaching a text file?

Highlighted
Frequent Visitor

Re: Flow no longer working - Property selection is not supported on values of type 'String'

Is there any solution for this issue? Even i am also having the same issue.

Highlighted
Regular Visitor

Re: Flow no longer working - Property selection is not supported on values of type 'String'

Hello! Thanks for the detailed solution.

 

Just to be clear, .txt files are not supported at this time? Is there a documented list of approved filetypes for the Get Attachment Content function?

Highlighted
Helper II
Helper II

Re: Flow no longer working - Property selection is not supported on values of type 'String'

@PatrickOToole1 / @mahesh_mohan ,

 

Someone replied back to me on my blog post about this stating they found a work around:

https://social.technet.microsoft.com/wiki/contents/articles/51752.send-list-item-attachments-to-inte...

You have to enclose the body function with a base64 function to encode the txt file ( I added an if statement to see if the attachment ended with .txt to determine if I had to add the encoding or not)

 

I attempted this but did not have much time to devote to it so I moved on. Feel free to try it and let me know if it works.

 

-Eric

View solution in original post

Highlighted
Frequent Visitor

Re: Flow no longer working - Property selection is not supported on values of type 'String'

This works an absolute treat with .ICS files as well as I found they are formatted as text.

 

Thanks!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (3,811)