I have a set up a scheduled flow that compiles list of items requiring approval 1x/week, sends the approval requests out (via Create Approval), and then based on outcome the status in the SharePoint list gets updated. This works really well when approver responds to approvals in the same order they receive it but when testing scenarios I noticed that if I respond to the request #2 before request #1, the flow breaks down with the error message below. Is there anyway to get this to work without jumping into the premium connectors (e.g., Dataverse)?
I'm pretty new to power automate so just having a hard time trying to figure this out. Please help.
Here's part of my flow for reference - I have renamed a few actions so the screenshot isn't 100% going match below:
For each: outputs('Get_items')?['body/value']
Create an approval
Title: Approval for [Transaction Type] - Item [items('For_each')?['ID']]
Assigned To: sample email
Append to array variable: ApprovalIDs
{
"ApprovalID": outputs('Create_an_approval')?['body/name'],
"ItemID": items('For_each')?['ID']
}
Apply to each: variables('ApprovalIDs')
Wait for an approval
Approval ID: items('Apply_to_each')?['ApprovalID']
Update item
ID: items('Apply_to_each')?['ItemID']
Test Approval Value: if(
empty(outputs('Wait_for_an_approval')?['body/outcome']),
'',
if(
equals(outputs('Wait_for_an_approval')?['body/outcome'], 'Approve'),
'Approved',
'Rejected'
)
)
ERROR:
BadRequest - The request failed. Error code: 'ApprovalSubscriptionNotAllowed'. Error Message: 'Approval cannot be waited on because it is already 'Completed'.'.