Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 5soN6HugXuisdQ9HHjNZ0g
Power Automate - Building Flows
Answered

Creating Events on Calendar

Like (0) ShareShare
ReportReport
Posted on 8 Jul 2022 15:24:39 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! 

  • webbj Profile Picture
    28 on 14 Sep 2022 at 14:39:18
    Re: Creating Events on Calendar

    I'm glad to hear that you've got it working!

  • webbj Profile Picture
    28 on 14 Sep 2022 at 14:38:56
    Re: Creating Events on Calendar

    sorry no, thats not happened to me.

  • TrafficCounter Profile Picture
    32 on 13 Sep 2022 at 00:56:08
    Re: Creating Events on Calendar

    Scratch that, I think I finally cracked the code! I basically added 2 seconds to the end date which doesn't change the day on the calendar so it only shows a single day of vacation.


    Thank you for your help 😁

     

    addseconds(formatDateTime(outputs('end'),'yyyy-MM-ddTHH:mm:ss'),2)

     

    TrafficCounter_0-1663030479011.png

     

  • TrafficCounter Profile Picture
    32 on 13 Sep 2022 at 00:26:46
    Re: Creating Events on Calendar

    Thank you for your response, although I didn't follow your suggestion, I did manage to find a solution! Your response made me realize I had done something silly. Instead of having the 'Get Item' function, I had the 'Get Items', which for my purpose was useless since I only want the last item to be added to the calendar. What I ended up doing is adding a compose function for Start and End times and in the Create Event function I added this "

    formatDateTime(outputs('start'),'yyyy-MM-ddTHH:mm:ss')" which works! However, now I'm facing my last obstacle, which is when people add a single day of vacation say for example "Start Date = Sep 16" & "End Date = Sep 16", the flow considers this a mistake as it acknowledge it as "one day". Has that happened to you?
  • webbj Profile Picture
    28 on 12 Sep 2022 at 13:19:03
    Re: Creating Events on Calendar

    So having read through what you've written I'm guessing you've gotten it to detect the holiday type correctly and it is just getting it to add an event to the calendar that is the issue.

     

    So on mine - I used the Start Date captured upon form submission, are you able to use the start/create date that's associated with the item on the SP list? Then use only the calculation for the end time. 

     

    Also I noticed that your expressions are using minus numbers addHours(formatDateTime(triggeroutputs()?['body/End'],'yyyy-MM-ddTHH:mm:ss'),-8) try removing the minus sign addHours(formatDateTime(triggeroutputs()?['body/End'],'yyyy-MM-ddTHH:mm:ss'),8)

    webbj_0-1662988369281.png

     

    Are you getting an event created in the calendar even if it is the wrong date?

     

  • TrafficCounter Profile Picture
    32 on 06 Sep 2022 at 18:33:45
    Re: Creating Events on Calendar

    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

  • webbj Profile Picture
    28 on 06 Sep 2022 at 11:08:34
    Re: Creating Events on Calendar

    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 05 Sep 2022 at 18:07:09
    Re: Creating Events on Calendar

    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 30 Aug 2022 at 09:02:44
    Re: Creating Events on Calendar

    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 26 Aug 2022 at 15:26:49
    Re: Creating Events on Calendar

    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

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 55

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 39 Super User 2025 Season 1

#3
VictorIvanidze Profile Picture

VictorIvanidze 26

Overall leaderboard