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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create an event when S...
Power Automate
Answered

Create an event when Sharepoint List is updated

(0) ShareShare
ReportReport
Posted on by 22

Hello, 

 

I have been trying to create a flow where an update on a sharepoint list item creates an event on outlook calendar.

 

I've read and browsed through so many different posts for similar situations but I cannot seem to find a solution. 

 

I have attached how my flow currently goes and the error message i receive when i run it.

 

These are the expressions used:

1. @{outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/SinceVersionId']}
2. not(empty(triggerBody()?['Date']))
3. 
formatDateTime(triggerOutputs()?['body/ConfirmedDateTime/FormattedStartDate'],'yyyy-MM-dd hh:mm tt')

 

 

Could someone kindly help me with this. 

Screenshot 2024-01-07 163623.png
Picture134.png
Screenshot 2024-01-07 163521.png
Categories:
I have the same question (0)
  • S-Venkadesh Profile Picture
    1,184 Super User 2026 Season 1 on at

    Hi @Ameera ,
    The error is arising from the expression, which is syntactically correct:
    formatDateTime(triggerOutputs()?['body/ConfirmedDateTime/FormattedStartDate'], 'yyyy-MM-dd hh:mm tt')

    However, the issue is that triggerOutputs()?['body/ConfirmedDateTime/FormattedStartDate'] is null at the runtime but it should have a value.
    Please check and ensure that the source of this data is providing a non-null value.

    I hope this information is helpful. If it is, please consider giving a thumbs up.

     

    Best regards,

    Venkadesh Sundaramurthy


  • Ameera Profile Picture
    22 on at

    Hi @S-Venkadesh,

     

    Thank You for your response.

     

    The problem is that the condition that I've set basically checks if there is a value in the column or not. 

    Therefore, according to the flow, there is data shown on the column in the list but according to the compose function, there isn't. 

     

    I don't understand why both functions show different results. 

     

    Let me explain what exactly the flow is for.

    So, I've already created a working flow that is triggered through a response for a Microsoft form. The flow would collect the data and add them into a list on SharePoint. 

     

    Here's where the problem is, once we receive the response, our team will analyse the information, approve or reject it and set a confirmed date for the event that was requested via the form. So, we would basically update the SharePoint list item.

    I want this update to trigger a flow that creates a calendar event. This is what I've tried to achieve in the above shown flow. 

    The flow keeps failing when trying to extract the confirmed date and add it onto the calendar. I don't know if this is because of the expression I have used or if I've made a mistake while creating the full flow. 


    I'm fairly new to Microsoft power automate so parts of the flow were completely created based on other users experiences. I've tried to link certain parts of different flows to create this one.
    Do kindly let me know if there is an easier method to achieve my end goal or if you notice that there is a problem in the existing flow.

    Thank You so much for your time. 

  • Ameera Profile Picture
    22 on at

    Okay so I have managed to extract a date from the SharePoint list through the compose action. The flow fails because it does not recognize the output from the compose action as a date. 

     

    Error message: Unable to process template language expressions in action 'End_Date' inputs at line '0' and column '0': 'In function 'addHours', the value provided for date time string 'Januar24 Tue3117a24 10:30' was not valid. The datetime string must match ISO 8601 format.'.


    Now there's a new error message which I believe is clear and just needs a date conversion. I've read through multiple threads, but I have been struggling to figure out how exactly I can change my function for Powerautomate to recognize it as a date. 

     

    This is the formula I used for the End date:

    addHours(utcNow(outputs('Start_Date')),1,'yyyy-MM-dd HH:mm')

     

    Ameera_1-1705479740525.png

     

    The flow continues to create an outlook calendar event from the composed outputs. These are the formulas i used. Could someone kindly let me know if they are correct or not?

     

    Start Time: 

    formatDateTime(utcNow(outputs('Start_Date')), 'MMMM dddd HH:mm', 'en-en') 

    End Time: 
    formatDateTime(utcNow(outputs('End_Date')), 'MMMM dddd HH:mm', 'en-en') 
     

    Ameera_2-1705480142027.png

     

    Overall, I'd like to know how to correct the date and time and create a successful calendar event please. 

  • Verified answer
    Ameera Profile Picture
    22 on at

    Okay so I Solved it! 

    For anyone who had the same issue, this was the flow I used.

     

    Ameera_0-1706166510627.pngAmeera_1-1706166594478.png 

    The Initialize Variable is used to convert the Start time entered into Sharepoint into String Format.

    if(empty(triggerOutputs()?['body/ConfirmedDateTime']), '', formatDateTime(triggerOutputs()?['body/ConfirmedDateTime'], 'yyyy-MM-dd HH:mm'))

    I have also entered an expression that checks if the specified column on Sharepoint is empty then this part can be skipped. This is because the flow would fail as the column can sometimes be left empty unless a date is confirmed and entered by the team. 

    Therefore, if it is not empty then the date will be converted into string format.

    Ameera_2-1706166637441.png

    Ameera_3-1706166668141.pngAmeera_4-1706166699188.png

    Formulas used: 

    Compose Start Date: 

    formatDateTime(utcNow(variables('Start Time')), 'yyyy MM dd HH:mm', 'en-en') 
    Compose End Date: 
    addHours(utcNow(outputs('Start_Date')),1,'yyyy-MM-dd HH:mm')

    Create Event Start Time: 

    formatDateTime(utcNow(outputs('Start_Date')), 'yyyy-MM-dd HH:mm', 'en-en') 

    Create Event End Time:

    formatDateTime(utcNow(outputs('End_Date')), 'yyyy-MM-dd HH:mm', 'en-en') 
     
    Hope this helps anyone in need of it. 😁
  • NCMBethC Profile Picture
    64 on at

    Hi Ameera, I'm hoping you can help me! 🙂

     

    I have a similar situation but enough of a difference that I need some help fixing my flow.  I have a SharePoint list that has a StartDate and EndDate, both configured as Date Only in the column settings.  The purpose of this list is a time off calendar so in simplistic steps, all I want is to have users create a new SharePoint item and have the flow create an Outlook calendar event that goes to the manager.  Time doesn't really matter because we're doing these as Free time, all day events for managers and don't want the time actually blocked on their calendars.

     

    I have two Compose actions, one for the StartDate and one for the EndDate and when I test the flow, it fails at Compose immediately.  I feel like I'm almost there but need some help with this piece.  Attached are screen shots of my flow.  The get manager action is just in there so that the invite goes to the right person.  And the Compose 2 is set up just like the first Compose but with EndDate instead.

     

    I appreciate your help in advance!

     

     

    Image 3.png
    Image 2.png
    Image 1.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 785

#2
Valantis Profile Picture

Valantis 669

#3
Haque Profile Picture

Haque 563

Last 30 days Overall leaderboard