cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EdK99
Helper I
Helper I

Create event V4 gives an error when using a date from Get item (SharePoint)

Hello all,

 

I'm building a flow to trigger when a new item is created in a sharepoint list, the flow will take that item's details (Subject, Start date, end date, location) and create a calendar event using these details.

 

in the create event connector I have the calendar ID, Subject, Start time and End time, and time zone. I am getting this error when I try to save the flow:

 

 Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'item' validation failed in workflow operation 'Create_event_(V4)': The parameter with value '"@outputs('Get_item')?['body/field_7']"' in path 'item/start' with type/format 'String/date-time' is not convertible to type/format 'String/date-no-tz'.'.

 

Screenshot_25.png

 

Can anyone help me out with this? the date column in sharepoint list includes time, and the records into the sharepoint list are being entered through a powerapp.

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Community Support
Community Support

Hi @EdK99 

 

You can use formatDateTime to convert the date to the format required by Create Event.

formatDateTime(outputs('Get_item')?['body/field_7'],'yyyy-MM-dd hh:mm:ss')

 

Best Regards,

Levi

View solution in original post

4 REPLIES 4
v-liwei-msft
Community Support
Community Support

Hi @EdK99 

 

Could you please tell me:

Is this field a text column rather than a date column in SharePoint?
Could you please provide the date format in that column.

 

Best Regards,

Levi

Hi @v-liwei-msft , thank you for the swift response

 

it is a date column that includes time and the friendly format option is not enabled.

 

the output that I'm getting from the get item action in power automate is: "2022-12-04T21:00:00Z", so I think this is the format.

v-liwei-msft
Community Support
Community Support

Hi @EdK99 

 

You can use formatDateTime to convert the date to the format required by Create Event.

formatDateTime(outputs('Get_item')?['body/field_7'],'yyyy-MM-dd hh:mm:ss')

 

Best Regards,

Levi

EdK99
Helper I
Helper I

It worked, thanks a lot!!

Helpful resources

Top Solution Authors
Users online (4,305)