web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating Events on Cal...
Power Automate
Unanswered

Creating Events on Calendar

(0) ShareShare
ReportReport
Posted on by 28

Hi All, 

 

Using the Create Event(V4) entry I can create calendar events. I'm having an issue to create the event in such a way to show all days i.e. the event should be between (all day) 11/07/2022 - 15/07/2022 however the calendar will only show the event on 4 out of the 5 days 11/07/2022 - 14/07/2022 Mon-Thurs and not Mon-Fri.

 

What am I doing wrong? 

 

Any help would be much appreciated! 

Categories:
I have the same question (0)
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @webbj 

    Hi there.  This sounds like a timezone thing.  Most data is stored in UTC (GMT), so depending on your local timezone, you may see some funkiness if we don't accurately transform the times either on the way in, or the way out.

    The Create event step has a spot for timezone so make sure that's filled in.  

    Also, check the past run history and look to see how the data is coming across.  If you see a "Z" at the end of the datetime string, that's an indicator that the time is in UTC.

     

    Keep us posted.  Good luck!

    -Ed

  • webbj Profile Picture
    28 on at

    Hi Ed, 

     

    Thanks for your response.. I can't see the Z at the end of the datetime, I had already specified GMT UK time zone in the create event step. The complete output in beneath, this is however the start and end times 

     

    "start": "2022-07-11T00:00:00.0000000",
    "end": "2022-07-15T00:00:00.0000000",
    "startWithTimeZone": "2022-07-11T00:00:00+01:00",
    "endWithTimeZone": "2022-07-15T00:00:00+01:00",

     

    {
    "subject": "Joe Bloggs ",
    "start": "2022-07-11T00:00:00.0000000",
    "end": "2022-07-15T00:00:00.0000000",
    "startWithTimeZone": "2022-07-11T00:00:00+01:00",
    "endWithTimeZone": "2022-07-15T00:00:00+01:00",
    "body": "",
    "isHtml": true,
    "responseType": "organizer",
    "responseTime": "0001-01-01T00:00:00+00:00",
    "id": "AAMkAGEyNDJmNTE5LTFkNTktNDRiNy05NWUxLTM4ZTk4MTRlNDI3MQBGAAAAAAB4p62NEtL7TYhMsV3AzrguBwCiYXYsOS6pv8y2T9nnzAADy9M34AACiYXYs2ghOS6pv8y2T9nnzAADy9w2vAAA=",
    "createdDateTime": "2022-07-08T13:00:18.4823786+00:00",
    "lastModifiedDateTime": "2022-07-08T13:00:18.5136234+00:00",
    "organizer": "joe.bloggs@random.com",
    "timeZone": "GMT Standard Time",
    "seriesMasterId": null,
    "iCalUId": "040000008200E00074C5B7101A82E00800000000DEB7A2ACCA92D801000000000000000010000000CF4652DDB79FE2479E4E6B3F86F33067",
    "categories": [],
    "webLink": "https://outlook.office365.com/owa/?itemid=AAMkAGEyNDJmNTE5LTFkNTktNDRiNy05NWUxLTM4ZTk4MTRlNDI3MQBGAAAAAAB4p62NEtL7TYhMsV3AzrguBwCiYXYs2ghOS6pv8y2T9nnzAADy9M34AACiYXYsOS6pv8y2T9nnzAADy9w2vAAA%3D&exvsurl=1&path=/calendar/item",
    "requiredAttendees": "",
    "optionalAttendees": "",
    "resourceAttendees": "",
    "location": "",
    "importance": "low",
    "isAllDay": true,
    "recurrence": "none",
    "recurrenceEnd": null,
    "numberOfOccurences": null,
    "reminderMinutesBeforeStart": 15,
    "isReminderOn": true,
    "showAs": "free",
    "responseRequested": true,
    "sensitivity": "normal"
    }

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    So, I think we're on the right path with timezones.

    Even though everything I find verifies that GMT and UTC are the same, note the section below the start and end time:

     

    "startWithTimeZone": "2022-07-11T00:00:00+01:00",
    "endWithTimeZone": "2022-07-15T00:00:00+01:00",

     

    So, when it factors in the timezone the start time would be 01:00 on 11/7/22, and it would end at 01:00 on 15/7/22.  

     

    What is being communicated, though, is midnight to midnight.  So that's probably why you're missing that last day.  It's a theory, so we can poke at it until something better is illuminated.

     

    Where are the start/end times coming from?

    Did you try leaving the timezone part out?

    Did you choose this one for the timezone:

    edgonzales_0-1657383441797.png

    Keep us posted.

    -Ed

     

     

  • webbj Profile Picture
    28 on at

    I think you are right in saying that it's missing the last day as its going from midnight to midnight! Apologies for the delay in getting back to you work has been really busy these past few days!

     

    Where are the start/end times coming from? The start/end times are coming from a form I created in Microsoft forms 

     

    Did you try leaving the timezone part out? I'm not sure how I would leave out / remove the timezone part - I'm guessing it is automatically capturing it as part of the form? 

     

    webbj_0-1657785307463.png

     

    Did you choose this one for the timezone: That's correct the timezone in your image is the same as the one in my flow.

    webbj_2-1657785389294.png

     

    Many thanks!

     

  • Verified answer
    webbj Profile Picture
    28 on at

    So after some digging the solution I came up with.. not exactly pretty but. 

     

    Create a Data Operation Compose action then used the expression beneath to add time to the date captured from the Form.

     

    addHours(outputs('Get_time_off_request_response_details')?['body/r8ee592cc078b447e9fe666192003ca6b'],11)

     

    the output of which was then used in the create calendar event with allday flag ticked. 

  • TrafficCounter Profile Picture
    32 on at

    Hello webbj,

     

    I'm experiencing a similar issue. I was wondering if you could share a snapshot of your flow so I can see what is different from mine.

     

    I tried using that similar expression you mentioned, as someone else suggested to me, but I'm still having an issue.

     

    TrafficCounter_0-1661527516208.png

     

  • webbj Profile Picture
    28 on at

    Hi TrafficCounter

     

    Here are the screenshots of the flow - hopefully they are useful!

    You can't see it here but my calendar event config is set to be an all day event.

     

    webbj_0-1661849804168.png

     

    webbj_1-1661849879094.png

     

    I'd take a screenshot of more of the flow but currently working on a tiny screen 😅 but i think this is the important bit! Let me know how you get on 🙂

     

     

  • TrafficCounter Profile Picture
    32 on at

    Hey! Thanks for your response. Sorry it took me sometime to get back to you. What I thought it would have been a simple flow, has become a nightmare for me! 

     

    To begin with, when I add a compose action in my flow, it instantly becomes an "Apply for each" function. To add to that, when I put the Start Date to my Create Event, it also becomes an "Apply for each" function, which for the one time that my flow worked whenever a new entry was added, it would re-print all previous entries!

     

    To be honest, I'm a little bit lost with this one. If there is any suggestions that you might have to offer, I will take them! 🙂

     

    Thanks again for your time!

  • webbj Profile Picture
    28 on at

    Ha yeah, I felt the same way when I tried doing this!

     

    Can you take a screenshot or gif of your flow so I can see what you're doing? 

  • TrafficCounter Profile Picture
    32 on at

    I can definitely do that, and thanks again for any help you might be able to provide!

     

    So I have created a Sharepoint list where people add their dates and type of leave so we can have an "out of office" tracker

     

    TrafficCounter_2-1662488686282.png

     

    Now, I wanted to make the next logical step, given that we have a shared vacation calendar in Outlook, and so when someone puts in a new entry the flow would detect if it's vacation and if it is then it would create an event showing their vacation time on our outlook calendar.

     

    TrafficCounter_3-1662488887807.pngTrafficCounter_4-1662488921274.png

     

    The expression for Start & End times are:

    addHours(formatDateTime(triggeroutputs()?['body/Start'],'yyyy-MM-ddTHH:mm:ss'),-8)
    addHours(formatDateTime(triggeroutputs()?['body/End'],'yyyy-MM-ddTHH:mm:ss'),-8)
     
    I assume that there is no output for the the start/end time to add the date now, but I also used to have that in my previous version (the one I had originally shared on this post, please see below)
     

    TrafficCounter_5-1662489073057.png

     

    I have also tried selecting the Start Time and End time straight from the SHarepoint list but for some reason it puts the create event under an "apply for each" loop so it does prints out all previous things on the list apart from the new entry.

     

    In the Create Event, I have selected "Yes" to the All day event question

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard