In this Microsoft Flow tutorial, We will discuss the solution of an error as: “The execution of template action ‘Switch’ failed: The result of the evaluation of ‘scope’ action expression ‘@triggerBody()?[‘ApprovalStatus’] is not valid. It is of type ‘Object’ but is expected to be a value of type ‘String, Integer“.
Recently, I was working in Microsoft Flow. As per my requirement, I have one SharePoint Document Library which has a Site Column as “Approval Status“. This site column is a choice column.
Check Out Microsoft Flow and PowerApps Video Training Course (Lifetime Access)
By using flow, I have to call all the choice values from that “Approval Status” Site column. For that, I have added one “Switch” case. This switch helps to call all the choice values from the site column.
In that Switch case, I have entered the column name as “Approval Status” in the “On” field. While I have run the flow, then the below error came as:
“The execution of template action ‘Switch’ failed: The result of the evaluation of ‘scope’ action expression ‘@triggerBody()?[‘ApprovalStatus’] is not valid. It is of type ‘Object’ but is expected to be a value of type ‘String, Integer“

The solution of “The execution of template action ‘Switch’ failed: The result of the evaluation of ‘scope’ action expression ‘@triggerBody()?[‘ApprovalStatus’] is not valid.”:
The only one solution of this above error is:
In Switch case, Instead of “Approval Status“, You need to enter “Approval Status Value” in the “On” field from the Dynamic content in the Microsoft Flow.
You can follow the below screenshot that how you can enter the On value of switch case by using Dynamic content.
Once you will add this “Approval Status Value” and again will run the flow, then the Microsoft flow will run successfully.

You may like following Microsoft Flow tutorials:
- Microsoft Flow Example: When an item is created in SharePoint List, Send approval and create an item
- Microsoft Flow Example: When a message is posted on a group, Create a SharePoint list item
- Microsoft Flow Example: Automatically create a profile for a new candidate
- Microsoft Flow Example: Copy Files from SharePoint to PC
- Microsoft Flow Example: Copy new files from your PC to SharePoint Online Document Library
- Microsoft Flow Example: Email notification after approval from a SharePoint list
- Microsoft Flow Example: Send a customized email when a new SharePoint list item is added
- PowerApps upload file to SharePoint Online document library using Microsoft Flow
- The ETag of this item does not match the one used for setting content approval status error in Microsoft Flow
- How to get manager email or name in Microsoft Flow (Power Automate)
Hope this Microsoft Flow tutorial, helps to resolve Microsoft flow error “The execution of template action ‘Switch’ failed: The result of the evaluation of ‘scope’ action expression ‘@triggerBody()?[‘ApprovalStatus’] is not valid. It is of type ‘Object’ but is expected to be a value of type ‘String, Integer“.
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”
Thank you! This resolved my issue.
Thank you – I spent hours looking into this issue and you provided the solution.