I have a SharePoint column of type String that takes in either "Approved," "Signed Off," or "Closed." I created a flow that will generate emails when any of these three values are inputted in a SharePoint item. I keep getting these errors:
1. ExpressionEvaluationFailed. The execution of template action 'Switch' failed: The result '' of the evaluation of 'scope' action expression '@triggerBody()?['Status']' is not valid. The result is expected to be a value of type 'String, Integer'.
2. ActionFailed. An action failed. No dependent actions succeeded.
Any suggestions? Thanks.
Not sure how is your flow configured. Could you show me a screenshot of your flow?
To reproduce this issue on my side, I create a flow looks like below. The Column Status value is of Choice column type. And it has three options, “Pending”, “Closed” and “Other”.
When I create an item to trigger the flow, it works as expected. An email would be sent according to the Status value I have entered in the list.
Hope this could be a reference for you.
The original posted has a column of type "string" - which is likely "single line of text" in SharePoint. Your reproduction of the issue uses a choice column, which is not the same.
Are Single Line of Text fields supported in Flows "Switch" condition?
A single line of text is supported in Flow.
I just test the flow using a single line of text column with same flow configuration.
It is working fine without issues.
Are you having any issues with the single line of text column in SharePoint when creating a flow using the Switch case?
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
If you are a small business ISV/Reseller, share your thoughts with our research team.