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
Highlighted
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.
Highlighted
Anonymous
Not applicable

Re: Email to calender

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (2,823)