cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mip09
Helper II
Helper II

Is it possible to create a trigger that let's me create an event on outlook calendar based on an email information?

I was asked to do a flow that let's me create an event on outlook based on the info inside the email. The info is about the deadline of an construction, its name, date and hour. It also has attachments that should be on the event calendar as well. I have tried a lot of actions however since this is my first time with Power Automate it is giving me a lot of errors on the execution of it. Could you please help me?

27 REPLIES 27
mip09
Helper II
Helper II

I splited every section as you said. However, this happened:

 

ero.PNGero2.PNG

 

What should I do? 

Date times added into the start time and end time fields need to be the ISO8601 format (yyyy-MM-ddThh:mm:ss e.g. 2020-11-07T13:37:09 ).

 

Your Start time has "Deadline: 24-11-23 to 30-11-23". 

Your End time has "Schedule: 10H00M - 04H00M".

Issues: 

  • The word Deadline and Schedule need to be removed.
  • Your start time needs to only be a single date and time like 2023-11-24T10:00:00. You need to do more expressions onto your compose actions until you get it into such a format. I assume from your multiple composes you've familiarized yourself with the split, first and last actions. Shouldn't take more to get it into this format.
  • Likewise from your end time needs to end up with a similar format. Your end time should look like 2023-11-30T04:00:00? You have 1 event that will span the entire duration.
mip09
Helper II
Helper II

Hello. 🙂

 

Thank you for the reply! It was very helpful. 

 

  • Do you know a way to remove "deadline" and "schedule" out of the equation?
  • After doing a research I understood that the start and end date should be in separate points, however, the email body is always like that and I only know how to do simple split actions. I don't know how I am able to do it with this type of message.
  • Yes, my end time should end like that. I would prefer "dd-MM-yyyy", however I only see "yyyy-MM-dd" each time so I am assuming that there is no way to do it the way I prefer, right?

Hey @mip09 

Your Start time has "Deadline: 24-11-23 to 30-11-23". 

Your End time has "Schedule: 10H00M - 04H00M".

So if you just do split actions again, it'll get rid of the Deadline and Schedule words too. For example the following will get rid of deadline:

last(split(output('Compose [change this according to the name of your actions]'),'Deadline'))

 

split this again with the delimiter of 'to' to get a start date and end date.

first(split(last(split(output('Compose [change this according to the name of your actions]'),'Deadline')),'to'))

last(split(last(split(output('Compose [change this according to the name of your actions]'),'Deadline')),'to'))

 

Do the same to the Schedule actions. Once you lock down the 2 expressions, just put them side by side to get the right format of date and time to put into the outlook connector.

The date format you prefer (dd-MM-yyyy) and the date required by the outlook connectors (yyyy-MM-dd) is different. There are a few expressions like parsedatetime, formatdatetime that you can use to manipulate the dates to be readable. When you input into connectors such as outlook's create event, follow the required format of yyyy-MM-dd. When you input into places where people will be looking (I assume this is a company standard way of writing dates) then format the date into a dd-MM-yyyy format.  

 

mip09
Helper II
Helper II

Thank you so much! This got me into the last stage of the flow which I was not capable of reach until now. However, the inputs it is taking are not correct. The strings are taking the correct first date and first hour of the email, however, the end date and hour are not being recognized. Is there something I am doing wrong on the string for it not being able to recognize? I will show you prints of the expression and what the final result looks like:

 

final result.PNG

 

Expression of the last day of the event: 

last(split(first(split(body('HTML_to_text'),'Deadline:')),'to'))
 
Expression of the end hour of the event: 
last(split(first(split(body('HTML_to_text'),'Schedule:')),'-')) 
 
Instead of coming out as: 30-11-23 04H00 [last day and hour] it is coming out as the last sentence of the previous line in the HTML_TO_TEXT ("light instalation" and "23"). 

Last day of the event:

first(split(last(split(last(split(body('HTML_to_text'),'Deadline:')),'to')),'Schedule'))

 

You had put last(split(first(split(body('HTML_to_text'),'Deadline:')),'to')). The first is where you had the problem. First means when you split by Deadline you'd get :

"Work Permit Nº: 896/2023/DFT Referring to: Light instalation" and "24-11-23 to 30-11-23 Schedule: 10H00M - 04H00M"

By doing First, you'd get "Work Permit Nº: 896/2023/DFT Referring to: Light instalation" instead of "24-11-23 to 30-11-23 Schedule: 10H00M - 04H00M"

 

Also, your create event won't work in the current format you had anyway. 24-11-23 10H00M isn't a valid input for the action. You need to change it to a format of 2023-11-24T10:00:00. You can try an expression like

parsedatetime(replace(replace(outputs('Compose USE YOUR COMPOSE output here'),'H',':'),'M',''),'en-US','dd-MM-yy HH:mm')
mip09
Helper II
Helper II

Hey! You've been super helpful. Thank you so much for your patience. 

 

I can now identify the right final time and hour for the event. 

 

However, I cannot create the string to put it in the right date/time format. Do you know after what string should I try to implement it? Should I combine 2 of the expressions on that string so it can "catch" the right day and time? I am a bit lost in that sense.

 

Here you can see what it identifies now:

 

ERRO 2.PNG

 

This is how my flow is looking like:

 

flow.PNG

 

compose 2 - deadline: identifies the first day of the event

Compose 2: identifies the last day

 

compose 2 - schedule: identifies the first hour of the event

compose split schedule: identifies the last hour of the event

Hey @mip09 

I sent you this in my previous message already. Set a compose to create what you have in the Start time end time of your event now. Use the expression I sent previously, I modified it a little here since there are line breaks in your end date/time which i don't understand how they even got there. Use this expression with your composes to get your time format right. 

parsedatetime(replace(replace(replace(outputs('Compose USE YOUR COMPOSE output here'),'H',':'),'M',''),decodeuricomponent('%0A'),''),'en-US','dd-MM-yy HH:mm')

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages