I have successfully created a few flows but am seeking ways to consolidate and improve them. My flows are for the routing of invoices for approval to, at most, 2 approvers. Once approved, the flow will generate a pdf that captures specific data from both the original invoice routed as well as data from the approvers. All is working well and as expected.
I went in search of a way to customize the "reminder" emails that were sent to approvers when they didn't respond within the initial response period and a way to only send these reminder emails on weekdays.
For the first part, I added a parallel branch to my initial approval workflow to handle the reminders. This allowed me to format the email so the approver could see that this was a reminder email and not another new invoice to review. I tried to use the Send an email with options action, but couldn't figure out how to capture the responses, so I used a second Start and wait for an approval action. (My approvers appreciate the ability to click an option in the requesting email to approve or reject instead of having to navigate to a SharePoint library.)
For the second part, I added a variable to determine the DayofWeek from the current date/time and then used that result to fulfill a condition to only send the "Reminder" approval if it is being sent on a Monday - Friday. Things seem to be working okay, except that the parallel branch only sends out the first "reminder" approval email. For testing purposes I've set all the timeouts to be 1M, but those would change to a longer period once working. The process is:
- Flow sends out the first approval email (branch 1).
- Branch 2 begins with a delay (currently 1M but will be longer).
- Branch 2 looks to see if a response (from branch 1) has been received and it is a weekday; if no response and a weekday then Reminder approval email is sent.
- Branch 2 should loop until response (either from original request or from the reminder request) is received.
This is what is actually happening:
- Original approval email is received - I do not respond.
- Branch 2 delay works as currently configured.
- Branch 2 approval email is received - I do not respond.
- Branch 2 loop - no additional approval emails are being sent or are received (flow thinks the Do until has been completed).
So in the end I am only receiving the original request and 1 reminder. My goal is to receive the original request and as many reminders (within the total flow timeout limitations) it takes till I get a response. Below are screen shots of the current flow. I have played around with the order of the Do until, Conditions, Approval and other Actions as well as played around with changing the Counts and Timeouts for the Do unit and Approval and even played with the Run after configurations. I fee like I'm close but can't see how to correct.
Sorry for the long post, and thank you for any assistance you may be able to provide.
Do until limits are Count - 60; Timeout PT1M (will be longer once this works)
Start and wait for an approval Timeout (PT1M) - will be longer once this works.
Condition-S1R-ResponseCheck set to run after Start and wait for approval is successful or has timed out.
Note: This flow runs as expected if I remove the first Condition action in the Do until action. Thanks!