Microsoft Flow: The execution of template action ‘Switch’ failed: The result of the evaluation of ‘scope’ action expression ‘@triggerBody()?[‘ApprovalStatus’] is not valid.

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 execution of template action Switch failed
The execution of template action Switch failed

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.

The execution template action Switch failed
The execution template action Switch failed

You may like following Microsoft Flow tutorials:

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“.

  • >