web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help Building Flow to ...
Power Automate
Unanswered

Help Building Flow to push email based on Calendar event

(0) ShareShare
ReportReport
Posted on by

Hi there,

Could someone please assit me with building a flow process for the following requirement:

 

Task: Server Maintenance Notification

Outcome: Email end user(s) to inform them of a scheduled maintenance 1 week and 1 day before the event.

 

Drivers: Office 365 Calendar set up with Events for each update window.

Event contains Client Names, Date, Time and message body.

 

Looking for a way for Flow to pull the information from the calendar and generate a email. 

 

Thank you

 

Categories:
I have the same question (0)
  • Verified answer
    v-yuazh-msft Profile Picture
    on at

    Hi @Anonymous,

     

    You could refer to screenshot below to create the flow:

    Capture.PNG

     

    If you want to email end user(s) to inform them of a scheduled maintenance 1 week before the event, you could enter the expression in the Delay Until as below:

    addDays(triggerBody()?['Start'],-7)

    If you want to email end user(s) to inform them of a scheduled maintenance 1 day before the event, you could enter the expression in the Delay Until as below:

    addDays(triggerBody()?['Start'],-1)

    Please take a try on your side and let mw know if your problem could be solved.

     

    Best regards,

    Alice

     

  • GabrielStJohn Profile Picture
    on at

    Hello, @Anonymous!

    Have you had an opportunity to apply @v-yuazh-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!


    Thank you for being an active member of the Flow Community!

    -Gabriel
    Flow Community Manager

  • Community Power Platform Member Profile Picture
    on at

    Sorry not just yet, I will try to have a go today.

  • Community Power Platform Member Profile Picture
    on at

    @v-yuazh-msft@GabrielStJohn

    I seem to get an error with this:
    1.PNG

     

    I set the Days to -1, clicked on Test, created a new calendar for Saturday and waited for the test to compelte.

  • v-yuazh-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Please modify the expression in the "Delay Until" action as below:

    addDays(formatDateTime(triggerBody()?['Start'],'yyyy-MM-ddTHH:mm:ssZ'),-1)

    The flow would run successfully to run the delay until as below:

    Capture.PNG  

     

     

    Please take a try on your side and let mw know if your problem could be solved.

     

     

    Best regards,

    Alice

     

     

  • Community Power Platform Member Profile Picture
    on at

    Thank you @v-yuazh-msft the expression is now working, are you able to help with the message body?
    The email came out in the following format:
    2.PNG

    All I need in the body is 'Test' (under <p class = ... >)
    Is it also possbile to format the start and end time into a user friendly output?

  • v-yuazh-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Could you please share a screenshot of your flow and run details of the flow when the flow run failed?

    Could you please share more details about your scenes?

     

    I have made a test on my side,the Do until action should works if you use the expression that I provided:

    addDays(formatDateTime(triggerBody()?['Start'],'yyyy-MM-ddTHH:mm:ssZ'),-1)

     

     

     

    Best regards,

    Alice

  • Community Power Platform Member Profile Picture
    on at

    @v-yuazh-msft

     

    Please see the flow below:

    3.PNG

    The Expression is now working fine.

    4.PNG

     

    I then received a test email, but the body was in raw HTML rather than formatted in a readable format.

    2.PNG

     

    Can you help clean up the body?
    It does not look good if I send a client an email in HTML 🙂

  • Community Power Platform Member Profile Picture
    on at

    @v-yuazh-msft
    I think I have fixed the email

    In the advance options I set 'Is HTML' to Yes and this fixed the formatting
    Just the time is in full, not just HH:MM

  • v-yuazh-msft Profile Picture
    on at
    formatDateTime(triggerBody()?['End'],'HH:mm')

    Hi @Anonymous,

     

    Do you want to get the Start time and End time with a hour and Minute type(HH:mm) in the email?

     

    If you want to  get the Start time and End time with a hour and Minute type(HH:mm) in the email,

     

    You could refer to screenshot below to format the Start time and End time:

    Capture.PNG

     

    The expression of start time as below:

     

    formatDateTime(triggerBody()?['Start'],'HH:mm')

     

    The expression of end time as below:

    formatDateTime(triggerBody()?['End'],'HH:mm')

     

    Please take a try on your side and let me know if your problem could be solved.

     

     

    Best regards,

    Alice

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard