Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Hi Cliff, I'm getting this error. But all my connections are good and I am the owner of the Sharepoint site
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Unable to process template language expressions in action 'Set_First_Approver_email' inputs at line '0' and column '0': 'The template language expression 'body('Parse_Approvers')['ApprovalGroup/Value'][0]['FirstApprover']['Email']' cannot be evaluated because property '0' cannot be selected. Property selection is not supported on values of type 'String'. Please see for usage details.'.
What am I missing?
Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Dear Philip,
Sorry for the late reply.
You can use the Send an HTTP request to SharePoint action with Rest API instead of Parse JSON to get the JSON format body and initialize the wanted variable values.
You can use the Uri _api/web/lists/getbytitle('Approvers')/items?$select=FirstApprover/EMail,SecondApprover/EMail&$expand=FirstApprover,SecondApprover to get teh body below and then type outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']?['results']?[0]['FirstApprover']?['Email'] to get the value.
Result:
I suggest you give it a try and see the result in your environment.
Thanks for your effort and time.
Sincerely,
Cliff | Microsoft Community Moderator
Dear Philip,
Thanks for providing the detailed screenshots.
I'll need some time to do a test at our side and I'll update here as soon as possible.
Sincerely,
Cliff | Microsoft Community Moderator
Thank you Cliff
Please see screenshots below. This is in a test library and test list till I get it working.
Full Flow
Part 1
Part 2
Text in 'Parse Approvers'
{
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@@odata.etag": {
"type": "string"
}
}
}
}
}
}
Text in 'body(...)' 'Set First Approver email'
body('Parse_Approvers')['ApprovalGroup/Value'][0]['FirstApprover']['Email']
Part 3
Text in 'body(...)' 'Process Second Approvers'
body('Parse_Approvers')?['ApprovalGroup/Value'][0]['SecondApprovers']
List
Library
Dear Philip,
From the error message, it seems that the formula you type can't get the correct values from a JSON format body after running the flow in your environment.
If it is convenient, could you upload the full screenshots of the flow you have created for our reference so that we can check if the formula is right to get the values from the body in the flow?
If you are using a SharePoint Online list, please also upload the list screenshot for our reference as well.
Note: Remove any private information before uploading the screenshots.
Thanks for your effort and time.
Sincerely,
Cliff | Microsoft Community Moderator