cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jpot125
Frequent Visitor

When a new Item is created in a Sharepoint List create an Outlook event.

I have a SharePoint list where a user can enter a start date/time  and and end date/time. If I try to use those values to create an event the following error is thrown:

The values are in this format when the flow starts:

2021-03-08T23:00:00Z  - start
2021-03-09T01:00:00Z  - end

 

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/Start_x0020_Time']"' in path 'item/start' with type/format 'String/date-time' is not convertible to type/format 'String/date-no-tz'.'.

 

I found advice that these should be converted to utc but this does not work.

convertToUtc(triggerOutputs()?['body/Start_x0020_Time'],'Eastern Standard Time')

convertToUtc(triggerOutputs()?['body/End_x0020_Time'],'Eastern Standard Time')

 

Here’s the error:

Unable to process template language expressions in action 'Create_event_(V4)' inputs at line '1' and column '28775': 'The template language function 'convertToUtc' expects its second parameter to be a time zone matching the time zone indicated by the timestamp. The provided value '(UTC-05:00) Eastern Time (US & Canada)' is not valid or does not match the timestamp '2021-03-15T23:00:00.0000000Z'. Please see https://aka.ms/logicexpressions#ConvertToUtc for usage details.'.

 

So I tried this

formatDateTime(triggerOutputs()?['body/End_x0020_Time'],'yyyy-MM-ddThh:mm:ss')

But then the time zones are wrong.

How do I get this to work?

EventFlow.PNG

1 REPLY 1
nandan
Regular Visitor

The time ending with Z is in UTC I would say, so should you not be using convertfromutc? I also have found the below useful sometime.

 

image.png

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Users online (88,480)