cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
omi18
Post Partisan
Post Partisan

email reminder

Hello,

 

I'm trying to build a flow to send an email reminder to the manager and  Head. I'm using SQL Server as a database. 

Logic: 1) Send an email to the requestor's direct manager after 3 days of request. keep sending every 3 days until the request status changes to a different stage.

          2) Once the manager approves the request, the status changes to the "pending final approval". Send a reminder email to the Head if he does not approve within 3 days of manager approval. 

 

I'm using Powerapps for creating an approval request. 

 

Any suggestions? 

 

Thanks,

Omi

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Super User
Super User

Hi @omi18 

 

It has a lot of steps. I hope you get the overall approach.

  • Get all SQL records where final approval not completed
  • Check Level 1 approval is completed or not
  • Calculate the Number of days
  • Calculate Mod Which determines to send email 3,6,9,12....
  • If Level1 is completed but not Level 2 then
    • Send 2nd level reminder email

 

Overall steps.

StalinPonnusamy_0-1644548502691.png

 

Steps Expanded

StalinPonnusamy_1-1644548536455.png

StalinPonnusamy_2-1644548614172.png

 

StalinPonnusamy_3-1644549054170.png

 

StalinPonnusamy_4-1644549083074.png

 

Formula used

equals(items('Apply_to_each')?['Level1ApprovedOn'], null)

div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(formatDateTime(items('Apply_to_each')?['SubmittedOn'],'yyyy-MM-dd'))),864000000000)


mod(variables('Number Of Days'),3)

 

I know it has a lot of steps. Reach me if any questions.


Thanks,
Stalin - Learn To Illuminate

View solution in original post

6 REPLIES 6
Nogueira1306
Super User
Super User

The only thing that I dont understand is why the 3 days..

For that I would suggest that every day you run a flow and add a day to every item that has not been aproved.

After that, you must see if it is  multiple of 3. 

If yes, send the request and based on the response, approve.

 

If not, dont send.

 

I would use teams approvals for that

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

StalinPonnusamy
Super User
Super User

Hi @omi18 

 

We should use Power Automate for this requirement.

 

Type: Scheduled Cloud Flow

Frequency: Runs Every day

 

Note: Power Automate can wait a maximum of 30 days after that flow will cancel automattically.

 

I had a similar requirement and I used to verify the source if any other way approved completed as well. 

 

 

Let me know, if any help on this to build.


Thanks,
Stalin - Learn To Illuminate

 

 

 

@Nogueira1306 ,

 

3 days, because we think everyday reminder email will be too much for the managers and Head of the Dept. 

Hi @StalinPonnusamy ,

 

Yes, I did try to build a flow, Maybe I'm missing something. Current process flow does not include power automate flow to the request of the approval process. everything is done using power apps.

 

Thanks.

Omi

StalinPonnusamy
Super User
Super User

Hi @omi18 

 

It has a lot of steps. I hope you get the overall approach.

  • Get all SQL records where final approval not completed
  • Check Level 1 approval is completed or not
  • Calculate the Number of days
  • Calculate Mod Which determines to send email 3,6,9,12....
  • If Level1 is completed but not Level 2 then
    • Send 2nd level reminder email

 

Overall steps.

StalinPonnusamy_0-1644548502691.png

 

Steps Expanded

StalinPonnusamy_1-1644548536455.png

StalinPonnusamy_2-1644548614172.png

 

StalinPonnusamy_3-1644549054170.png

 

StalinPonnusamy_4-1644549083074.png

 

Formula used

equals(items('Apply_to_each')?['Level1ApprovedOn'], null)

div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(formatDateTime(items('Apply_to_each')?['SubmittedOn'],'yyyy-MM-dd'))),864000000000)


mod(variables('Number Of Days'),3)

 

I know it has a lot of steps. Reach me if any questions.


Thanks,
Stalin - Learn To Illuminate

omi18
Post Partisan
Post Partisan

Hi @StalinPonnusamy ,

 

Thanks for the solution it works as expected. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,355)