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 / Take an email and take...
Power Automate
Unanswered

Take an email and take a date range and put into calendar to create an event.

(1) ShareShare
ReportReport
Posted on by 2

I am trying to extract information from an email from an HR program, use the dates it send , then input those date into a calendar event for the date range.

 

This is a sample of the output I typically get from the body preview.

 

""bodyPreview": "Your Time Off was Approved\r\n________________________________\r\n\r\nHey Noah,\r\n\r\nYour time off request for 2 days of Flexible Paid Time Off has been approved by Chris.\r\n\r\n________________________________\r\n\r\nFri, Jul 12 - Mon, Jul 15\r\n_______________",

 

I would just like to extract the Fri, Jul 12 - Mon, Jul 15, convert it to a usable date format, and list it as a beginning and end range.

 

I figure I can put a condition that if there is no second date it will put the first date for the beginning and the end.

Screenshot 2024-07-10 160251.png
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,932 Moderator on at

    Hi @NoahASP 

     

    that one looks like it was approved. Do you have to deal with unapproved ones too? Or do you first search to get Approved and then process it, versus when its not approved you just ignore it?

     

    Also, it would help if you created the flow that receives the emails, so you could add an HTML to Text action so we can see what the would look like versus the above. 


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • NoahASP Profile Picture
    2 on at

    I added an HTML to Text action and also a condition to look for approval; the declined timeoffs don't have the approval in their text at all. I put the output of the HTML to Text below:

     

    "Your Time Off was Approved ________________________________ Hey Noah, Your time off request for 3 days of Flexible Paid Time Off has been approved by Chris Handy. ________________________________ Mon, Jul 22 - Wed, Jul 24 _______________"

    Screenshot 2024-07-12 090618.png

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard