I am trying to create a Time Off Request approval that once approved, enters the date into our group calendar. I'm using this video (https://www.youtube.com/watch?v=oi8PFX4CNz4) as a reference, but we don't want an additional calendar to look at. We want the result integrated into our group calendar.
In the Sharepoint list, I have a start date and end date, and both have the time selection set to "on" in case someone wants a half day, etc.
In the event creator, I put the start and end fields in their respective places. I selected "Pacific time" in the required time zone setting.
I received the following error:
Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'item' validation failed in workflow operation 'Create_event_(V4)': The parameter with value '"@triggerOutputs()?['body/StartDate']"' in path 'item/start' with type/format 'String/date-time' is not convertible to type/format 'String/date-no-tz'.'
Not sure what the "no-tz" is for since I do have a timezone showing. Any ideas on how I can get those datetimes into an outlook calendar?
If you could please post some screenshots of your flow, it’d really help to resolve the issue.
Off the top of my head though... Have you tried wrapping the dateTime up in a convertTimeZone function?
I experienced a similar problem recently and this resolved my issue.
After posting this, I did try to figure out how to convert it, but nothing I tried worked. The instructions I found weren't quite getting me there. I couldn't seem to find how to get the specific Start Date and End Date from my list into a function.
One other thing I came across was the time zone issue. I couldn't figure out how to determine the time zone of the person submitting the list entry. We have people in all time zones. If someone in Pacific requests out at noon, I'd like it to show that in the calendar in their time zone (noon) and on my calendar in my time zone (2 pm).
Unfortunately the more I dig, the more this may be moot. I'm trying to add the event to a group calendar, and that appears to be a problem for Flow.
Not a problem. Always happy to help!
I would try wrapping everything up in the convertToUTC and use GMT Standard Time as the time zone.
So convertToUTC(triggerOutputs()?[body/StartDate],'GMT Standard Time')
The time zone has to be GMT due to issues with the connector. If you need to adjust from GMT to fit your requirements, wrap the entire expression above in an addHours function.
I would recommend adding a column to your list for time zone. That will be the easiest way to obtain the value for use in your flow. As for adding to a group calendar, that is not possible at this time, though I believe the team have said that it's on the radar.
I hope this helps a little bit. Once I have some free time, I can do some tests on my end. If you wouldn't mind, could you post screenshots of the whole flow? I'd like to try to replicate it best as possible.
I´m kind of straggle with the same problem..
Converted all the dates to UTC but after I run the flow this error appears.
Unable to process template language expressions in action 'Create_event_(V4)' inputs at line '1' and column '24720': 'The template language function 'convertToUtc' expects a timestamp as the first parameter, a source time zone as the second parameter, and an optional format string as the third parameter. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#ConvertToUtc for usage details.'.
Thank you for your help
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.