Showing results for 
Search instead for 
Did you mean: 
New Member

Function 'action' not expected at this location (in language expression)

Hi all,


Have been stuck on this for quite a while, found some things about rewriting the flow and restarting testing, didn't work, but other than that nothing much.


I'm trying to build a flow which listens to a file system and whenever a file is created or modified it should create or modify a file in a SharePoint folder. So basically a sync from File system to Sharepoint.


I want to solve it with a condition based on two actions: `Get file content` & `get files equal to name`. Get file content just takes the file content of the file that triggered the flow and `get files equal to name` lists all the files equal to the trigger filename in a certain SharePoint directory. 


I thought the last step would be easy by just checking if the length of the output of `get files equal to name` action would be bigger than zero. (Then update, otherwise create). But it raises a weird error that I cant use the action() function (I also checked body() bodyAction(), etc.) in the language expression... 


What am I missing here??

Thanks for having a look!


Best, Aschwin




If I test it fails on the condition?? :




Accepted Solutions
New Member

Solved it, the action('<action-name>'), should contain underscores instead of spaces....

View solution in original post

New Member

Solved it, the action('<action-name>'), should contain underscores instead of spaces....

Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,638)