cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StevieC
Helper III
Helper III

Approval with time out issue

I have a flow that askes approval from a group of people I then record all their responses.  The issue is that I want to put a timeout on the approval and record all those that didnt reply.  For example:

 

John: Approved - i like this

Sarah: Approved - happy to go ahead

Ian: Rejected - This is bad

Sally: Failed to respond

Bob: Failed to respond

 

To achieve this, I use a Apply to each loop on each email address, with a Start and Wait for an Approval.  I was hoping this would allow me to send a separate approval to each person with a time out - that way i can record the response, but also have an individual time out for each person.

 

The issue is that the Start and wait only appears to go to the first person in the For each and then it waits for them to respond before sending to the next person!  Ive tried the Approval with out the wait, but that didnt wait (as expected!).  Ive also tried a custom Approval but still no joy.

 

Any Idea how i can achieve my requirements?

1 ACCEPTED SOLUTION

Accepted Solutions
muralidharan
Resolver II
Resolver II

Hi @StevieC , 

Have you tried like this ?

 

muralidharan_1-1620190399578.png

Hope this will give some idea.

Please let me know, if you need further clarification.

 

Thanks,

Murali.

View solution in original post

8 REPLIES 8
muralidharan
Resolver II
Resolver II

Hi @StevieC , 

Have you tried like this ?

 

muralidharan_1-1620190399578.png

Hope this will give some idea.

Please let me know, if you need further clarification.

 

Thanks,

Murali.

Hi Murali

 

That's great and functions as required.  The only issue i have now, is that if someone doesn't reply (response times out), i dont have a response to get their name from - this means that compose 3 in your diagram cannot use the response display name to say which failed.  Can i get this from the original approval using the id in a function?

 

Cheers

Hi @StevieC ,

Yes that's possible to get the approval related values. 

Store all the Approvals into an array variable, once it is getting Timeout, use Filter Array to get the Approval details.

 

muralidharan_0-1620215994643.png

 

muralidharan_1-1620216029352.png

 

Hope this helps you.

 

Thanks,

Murali.

Thanks Murali

 

I cant get the filter to work - im not sure what 'output' is - im trying to filter by the Apply to each value of the array of approval IDs but this doesnt work?

Hi @StevieC 

Please refer the below screenshot.

@equals(item()['name'], outputs('Compose_3'))

 

muralidharan_0-1620221013830.png

 

Please let me know, if you need any help. 

 

Thanks,

Murali

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Great - almost there!! Im struggling to write the function to get the display name out of the results:

 

[
{
"approvers": [
{
"id": "72a6b3fd-5997-4e12-8968-71924bxxxxxx",
"displayName": "Smith, Jon",
"email": "Jon.Smith@domain.co.uk",
"tenantId": "5546e75e-3be1-4813-b0ff-2665xxxxxxx",
"userPrincipalName": "Jon.Smith@domain.co.uk"
}
],
"respondLink": "https:/.....",
"adaptiveCard": ".....",
"name": "de6xxxx-6b77-4d46-a2d9-8xxxxx6a18",
"title": "AGB document approval required",
"details": "Please review",
"requestDate": "2021-05-05T13:52:39Z",
"expirationDate": "9999-12-31T23:59:59Z"
}
]

 

something like:

first(outputs('Filter_array')?['body/items'])?first('approvers')['displayName']
 
Thanks for all your help 🙂

Hi @StevieC ,

Give a try something like this . 

first(body('Filter_array'))?['approvers'][0]['displayName']

 

Thanks,

Murali.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

Superstar!!! That worked perfectly - thanks for all your help - hope it wasnt too painful! 🙂

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,895)