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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Approval Workflow for ...
Power Automate
Answered

Approval Workflow for Time Off Calendar

(0) ShareShare
ReportReport
Posted on by 10

Hello,

 

Working on a flow for our department.  I have a form setup for users to fill out a time off request, and the flow takes those answers and sends an approval email to department managers for approval.  Once approved entries get placed into the teams various calendars.

 

I want to take the approval email one step further.  Initially I setup a few steps to pull a list of calendar event for the same date range of the time frame entered on the form and create a table.  Idea being that the managers could approve/reject directly from the email without having to verify there are no current time off entries on the calendar already.  The approval email doesn't format HTML/Tables so it inserts a jumble of table code.  I am using a simple setup in the calendar subject lines only:

 

FirstName LastName - Shift - Team - Hours taken

 

So I'd like to just pull the subject line and insert each subject line for each time off request currently on the calendar.  So basically the approval email would have this at the bottom:

 

List of current approved time off requests during these days:

FirstName LastName - Shift - Team - Hours taken

FirstName LastName - Shift - Team - Hours taken

FirstName LastName - Shift - Team - Hours taken

 

 If there are no entries then, there would be nothing there.  For the current HTML table I'm using an array variable, not sure if there is a better option to pull the subject lines only for each entry?

 

Thanks!

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @defiant79 

     

    If you have an array of this data, you might want to explore create an html table action.

     

    DamoBird365_0-1615899041172.png

     

    It can create a table based on all fields from your array source, but equally you can define your own columns.  This can then be inserted dynamically into your send email action.

     

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

  • defiant79 Profile Picture
    10 on at

    Thats the path I went down first.  Issue is then I'm wanting to insert this in the approval workflow.  That email doesn't format HTML and ends up sending something like this out in the approval email:

     

    List of current approved time off requests during these days:

    <table><thead><tr><th>Name:</th></tr></thead><tbody></tbody></table>

     

    So I'm thinking of just scrapping that whole section, if there is a way to simply pull the subject line of the calendar entry (store it in something) and then insert said subject line for each event found in the date range of this request.

     

    approval flow.PNG

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @defiant79 

     

    Approvals use markdown, so presumably don't support html - i've not checked.

     

    If you want to create a formatted list of items, you can initialize a string variable and then in the apply to each on the array, append string to variable action on the fields you require with a return line.  The output from that will be the 1 or many lines of the requests off.

     

    Hope that makes sense and let me know how you get on.

     

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

  • defiant79 Profile Picture
    10 on at

    Ok, so that is closer than I have been.  For my test of have 2 entries on the calendar already.  It is taking each one and appending to the end of the next one in a run on sentence.  Can I use a line break some place to place each entry on a new line?

     

    Current flow:

    string flow.PNG

     

    I inserted this on the approval email details:

    Approval flow2.PNG

     

    Then this is a screen snip of what was in the approval email:

    email entry.PNG

  • defiant79 Profile Picture
    10 on at

    Nevermind, a simple carriage return in the append to string is all I needed.

     

    Thank You!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 495

#3
Vish WR Profile Picture

Vish WR 429

Last 30 days Overall leaderboard