Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to send email notification for upcoming event using Power Automate

Posted on September 27, 2020April 14, 2021 by Tom

“How to set up a notification 7 days prior to upcoming event using Power Automate?”

“Do you know of a way to set up reminders for each instance on the calendar?”

You might consider using Power Automate action ‘Delay until’ to send a notification for an upcoming event. But it’s not the right approach. Running a flow on each event you’ll end up with a ton of flows running for days, until day 30. Each flow will end 30 days after it started, no more waiting. Let’s try another approach.

Use a scheduled trigger

Instead of running 1 ‘waiting’ flow per item, you can build only one Scheduled flow, running daily and sending emails. It isn’t even a complex flow, as in the simplest form it needs just 3 actions, including the Scheduled trigger. So the 1st step: create a new Scheduled flow with daily recurrence.

Filter upcoming event(s)

The next step in the flow is to filter only the relevant events. Since the flow is running once a day, you need to filter events at any times during that day, from 00:00 to 23:59. That means you need two dates for the filter, today+X days and today+X+1 days. All relevant upcoming events in X days will be between these dates.

Get the dates

To get the dates, you’ll need to combine 3 expressions, utcNow() to get today’s date, addDays() for the +X days part and formatDateTime() to get the time part from 00:00 to 23:59. Let’s take an example of today+7 and today+8 days and store them into variables.

formatDateTime(addDays(utcNow(),7),'yyyy-MM-dd')
formatDateTime(addDays(utcNow(),8),'yyyy-MM-dd')

All events between these 2 dates will fit the ‘upcoming event in 7 days’ filter. If you’d like, you can learn more about the expression in this article.

Now, when we got the dates, it’s time to use them in a filter. First in a SharePoint calendar list, then in Outlook calendar.

Filter in SharePoint calendar

You use Power Automate action ‘Get items’ to get the selected events from the calendar list. Like in any other filter, you must use column internal name in the filter. If we continue with the example above for notification 7 days prior to event, the filter should be:

(Start_x0020_Date gt '@{variables('Today+7')}') and (Start_x0020_Date le '@{variables('Today+8')}')

That means get items where ‘(Start Date > today+7 days) and (Start Date <= today+8 days)’.

If the filter doesn’t work for you, you can check this debugging article.

Filter in Outlook calendar

If your events are in Outlook calendar, it’s a bit easier to filter them as Power Automate has an action just for that ‘Get calendar view of events’. You just use the calculated dates in variables for the Start Time and End Time inputs.

Send the email notification

Last step in the flow is the ‘Send an email’ action. Use the data from the ‘Get items’ or ‘Get calendar view of events’ actions and send the emails. Maybe even from other than your email address.

Summary

I’d say there are 2 important points from this article. First, if you have some time related process, it’s always better to have a single scheduled flow to process all items. It can be flow for reminder, notification, escalation, archiving or something else. One daily flow always beats many paused item flows.

Second, you should understand that when you’re working with dates, they often include also time. It’s not possible to use [equals] operator when hours, minutes and seconds are involved. You have to work with a range. Get the beginning and the end of a range and filter all in between.


🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

7 thoughts on “How to send email notification for upcoming event using Power Automate”

  1. Chau Le says:
    June 9, 2022 at 3:16 am

    Thank you for the article. I don’t see my calendar as an option for get item. Any ideas?

    Reply
    1. Tom says:
      June 12, 2022 at 10:10 pm

      Hello Chau Le,
      the ‘Get items’ options is for calendars in SharePoint. If you’re working with events in your calendar then use the Outlook action ‘Get calendar view of events’.

      Reply
  2. Richie says:
    July 5, 2022 at 11:39 pm

    I am attempting to get this working in my environment but keep getting the following error. I feel sure I am overlooking something simple. Any direction would be appreciated!

    The expression “Start_x0020_Date gt ‘formatDateTime(addDays(utcNow(),7),’yyyy-MM-dd’)’) and (Start_x0020_Date le ‘formatDateTime(addDays(utcNow(),8),’yyyy-MM-dd’)'” is not valid. Creating query failed.
    clientRequestId: 781242f1-3655-4619-aab7-18155715a89e
    serviceRequestId: 781242f1-3655-4619-aab7-18155715a89e

    Reply
    1. Tom says:
      July 12, 2022 at 4:45 pm

      Hello Richie,
      did you enter the whole formatDateTime(…) part as an expression? It must be an expression inside single quotes.

      Reply
      1. Richie says:
        July 14, 2022 at 7:17 am

        Here is what I am using..

        (Start_x0020_Date gt ‘@{variables(‘Today+7′)}’) and (Start_x0020_Date le ‘@{variables(‘Today+8′)}’)

        Reply
        1. Tom says:
          July 26, 2022 at 9:50 pm

          Hello Richie,
          I’d check the quotes, if you use the right quote symbol everywhere in the Filter Query. If you copy/paste from other sources you might take it with a wrong character for the single quote. It shows me that in the Filter Query you shared there’re 3 different quote characters which is more than I’d expect. Try to replace all of them in the expressions editor.

          Reply
  3. Richie says:
    July 5, 2022 at 11:58 pm

    Correction from previous post…. I left off the open/closed (), but even after adding that to the query I am receiving an invalid expression error.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundle—everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes