I've recently started using MS Flows to automate various processes, but I'm stumped on this latest concept.
We get automated emails from a specific email address at work, from which my team manually creates a calendar appointment.
We copy the email body into the calendar body. Easy with Flow.
The subject, reminder, reoccurence and attendees are always the same. Again, nice and easy.
Where we're struggling is with the Start Time and Date, End Time and Date and Location. We need these fields populated from the body of the email.
Does anyone know how to pull text from the email body and populate the calendar fields? The text is always there, but is obviously different with each email.
Hi @ FryFubar,
Could you please share a bit more details about the email that you would receive?
Could you please share more details about the start time and end time in the email?
Maybe you could use the connector “Data Operations” and workflow definition language to extract “certain fields” from the body of the email.
Please provide more information about your requirement so I could try to help you.
I have made a test on my side, the email’s body as below:
Hi, a new appointment event should be created.
end time: 2018-03-18T16:00:00
location: meeting room 4-003
If I want to get the value of start time “2018-03-18T14:00:00” and end time “2018-03-18T16:00:00”from the body of the email, and use the start time and end time to create an event, I could create a flow as below:
4. Add a compose 3, the expression of the compose 3 as below:
5.Add a compose 4, rename the Compose 4 to “start time”, the expression of the “start time” as below:
6.Add a compose 5, rename the Compose 5 to “end time”, the expression of the “end time” as below:
7.Add a compose 6, rename the Compose 6 to “location”, the expression of the “location” as below:
8.Add an action “Create event(V2)”of office 365 outlook, fill in the subject and choose the Calendar id of the event, choose the “Output” dynamic content of the “start time” action in the “Start time” field, choose the “Output” dynamic content of the “end time” action in the “End time” field, choose the “Output” dynamic content of the “location” action in the “Location” field, fill in the reminder, reoccurence and attendees.
When a new email arrives, the flow would run successfully as below:
The event would be created in the outlook calendar as below:
Alice, thank you so much for this suggestion. I will put some time aside tonight to try this out. I'll let you know if this works for me, but thanks for taking the time to go to this level of detail! Outstanding 👍
Using your example, I've copied the trigger and actions, but obviously it doesn't work as my content is different. Please could you help me decypher your expressions to better fit the sample email below? I've italisied any sensitive content:
Dear Leased Circuit Customer,
We have been notified of planned maintenance affecting your leased line service, the details of which are included below.
Affected installation address:
Associated Order ID: OrderNumber
Maintenance window start: Tue 3rd April 2018 00:01 BST Maintenance window end: Wed 4th April 2018 06:00 BST
Expected impact duration: 1 hour and 15 minutes
Reason given for maintenance:
Supplier Upgrade Maintenance
Your service will be at risk of additional or extended outages for the duration of the maintenance window.
If you have any queries regarding this maintenance, please contact our Network Operations Centre using the details below.
We apologise for any inconvenience this may cause.