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.
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!
Okay so I Solved it!
For anyone who had the same issue, this was the flow I used.
The Initialize Variable is used to convert the Start time entered into Sharepoint into String Format.
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.
Formulas used:
Compose Start Date:
Create Event Start Time:
Create Event End Time:
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:
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:
Overall, I'd like to know how to correct the date and time and create a successful calendar event please.
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.
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