cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
clarapfm
Helper I
Helper I

Flow to Send Weekly Email of Upcoming Events

I'm trying to create a flow to send an automatic email every week, of upcoming events for the following week.

 

For example, an email would be sent out this morning at 9am, detailing all events in the calendar for 9/2-9/6. Next Friday, an email would go out detailing events 9/9-9/13, etc.

 

I think a Scheduled Flow with the following steps will accomplish this:

  • Outlook: Get calendar view of events (V2)
  • Outlook: Send an email (V2)

 

However, I have a few questions about the process:

  1. In Outlook: Get calendar view of events (V2), it asks for a specific Start Time and End Time. Is there a way I can set these to the following Monday and the following Friday, rather than specific dates? If not, is there a Filter Query I could use to select for the upcoming week?
  2. What is the best way to input the "Get calendar view of events" into the body of the email? Is there a better first step to use in the flow, that would accomplish this more easily? The information needed from each calendar entry would be the Date, Time (although many would be all day events), Subject, and Body.

 

Any and all answers would be extremely helpful!

 

Thank you,

Clara

3 REPLIES 3
RezaDorrani
Dual Super User II
Dual Super User II

Hi @clarapfm 

 

Trigger your flow to run every monday at 9 am

 

Capture.PNG

 

 

For get calendar events - Use expressions

StartTime - utcnow()

EndTime - adddays(utcnow(),7)

 

Capture1.PNG

 

 

For sending email use following

 

Capture.PNG

 

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

@RezaDorrani I input everything as you specified, and set the email timing to 4:30 PM (16:30) on Tuesdays, but I haven't received the email yet. Any idea what could be incorrect?

 

 

One additional question: I noticed that in Flows, when you ask it to input Start Time, it comes out in this format: 2019-09-10T14:40:00.0000000

 

I am wondering if there is a way to put it into this format instead (more user-friendly): 9/10/19 at 2:40 PM

I finally got the process to work (I didn't realize that time inputs default to GMT, and I am in EST). I still have formatting questions though (a screenshot of the email I received is provided below for reference).

 

1) Start Time and End Time - I asked about this in my last post. I would ideally like to format these as 09/04/2019 3:00 PM (for example). In general, I'd like these to be a little more user-friendly.

 

2) I added a section called "Details" to the table where I inputted the body of the event. This is essential to the Flow I am trying to set up, as we will be including details in the body of the event that are too long to include in the event's title. However, as you can see, the email I received showed the Body in HTML format. I'm hoping to only input the text from the Body.

 

 

Screen Shot 2019-09-04 at 9.21.37 AM.png

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (7,122)