cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Email to calender

Hello All,

 

Brand new here. Need help. 

 

I get the following notification as an email. I wanted to write a flow that extracts information from this email and creates a calender entry in outlook for 30 mins. 

 

email details:

------------------------------------

subject: Proposal Submission for ABC Inc. 

 

Body: 

Hi, 

The Proposal Submission is due on: 

Date: December 18, 2018

Time: 3:00 PM

Thx

------------------------------------

Can someone please help ? I tried split etc, but while everything works to get the data, I am unable to create a new event. 

 

Thanks in advance!! 

 

 

 

 

2 REPLIES 2
Community Support
Community Support

Re: Email to calender

Hi @Anonymous,

 

Do you want to extract the information from the email body then create an event on Outlook Calendar?

Please take the following configuration for a reference.

By the way, please make sure your email body always contains the info with the same format.

Add the trigger When a new email arrives.

Add the action Html to text.

Add Compose action and enter the following code to get the starting position of the date:

add(indexOf(body('Html_to_text'),'Date:'),5)

Add Compose2, input the following code to get the starting position of Time:

indexOf(body('Html_to_text'),'Time:')

Add Compose3 with the following code to get the extract date info:

substring(body('Html_to_text'),outputs('Compose'),sub(outputs('Compose_2'),outputs('Compose')))

Add Compose4 with the following code to return the extract time info:

substring(body('Html_to_text'),add(outputs('Compose_2'),5),sub(indexOf(body('Html_to_text'),'Thx'),add(outputs('Compose_2'),5)))

Add Compose5 with code to combine date and time:

concat(outputs('Compose_3'),outputs('Compose_4'))

Add Compose6 with following code to format it to an valid time string:

formatDateTime(outputs('Compose_5'),'yyyy-MM-dd HH:MM')

 Add action Create event. Select Email subject for the Subject filed, the output of Compose6 for the Start time field, input the following code for the End time field:

addMinutes(outputs('Compose_6'),30)

 A screenshot for your reference.

1.PNG2.PNG

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Email to calender

thnks a lot!!!!! This helps!!!!! It works well now

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,428)