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

Create a SharePoint list item when an Office 365 event is added or updated - What am I doing wrong

Hello all,

 

I am very new to power automate and I am attempting to use a template to help with automatically updating/populating a SharePoint list with calendar entries from a Outlook calendar.

 

I have attached a could of snips of the errors that I am getting but ultimately not too sure what I need to do to make this happen. I also had a query regarding the way I format the "Destination time zone". Do I use "(UTC+10:00)Sydney, Australia" OR "(UTC+10:00) Eastern Standard Time (Sydney, Australia). I found both formats online and not sure if this is causing any issues. 

 

The formatDateTime trigger is the following:  formatDateTime(triggerBody()?['Date'], 'UTC''Eastern Standard Time''HH:mm')

 

TIA for your advise help.

Error_SharePoint list when event added.JPG

snip of flow.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @NeedHelp88,

 

I had another look at your setup. I am pretty sure you can just type a format in that format string field as a custom value. Do make sure it matches the format the SharePoint list expects for your list item fields.

 

The previous reply from be useful if you want to use expressions instead of actions, but those expressions are not needed for your setup 😅

 

View solution in original post

5 REPLIES 5
Expiscornovus
Super User
Super User

Hi @NeedHelp88,

 

Like the error suggests, the formatdatetime function expects three parameters and not four. And the purpose of this function is to return a datetime stamp in a certain format.

 

Looking at the four parameters you are inputting in the expression are you sure you don't want to be using a converttimezone function instead?

 

The convertTimeZone function, accepts 4 parameters like below (which looks a lot like what you are using in your expression):

 

convertTimeZone('<timestamp>', '<sourceTimeZone>', '<destinationTimeZone>', '<format>'?)

 

 

 

convertTimeZone(triggerBody()?['Date'], 'UTC', 'Eastern Standard Time', 'HH:mm')

 

 

Expiscornovus
Super User
Super User

Hi @NeedHelp88,

 

I had another look at your setup. I am pretty sure you can just type a format in that format string field as a custom value. Do make sure it matches the format the SharePoint list expects for your list item fields.

 

The previous reply from be useful if you want to use expressions instead of actions, but those expressions are not needed for your setup 😅

 

NeedHelp88
Frequent Visitor

Hi @Expiscornovus ,

 

Thank you for your help. I have just taken out the expressions, just used the options available and the flow now working.

 

I am now having another issue that the time that is being input into my MS List is now substantially out.

 

The items are being input on the correct dates but they are not out on time. 

 

An item that I recently tested was put in for 11am and would show as 9pm.

 

Time issues.JPG

I have used the correct UTC for the destination. Any ideas?

 

Thanks 🙂

 

NeedHelp88
Frequent Visitor

Hi @Expiscornovus,

 

I think that I have fixed it. I have just changed the Destination Time Zone to the same as the source. I thought to myself that I didn't want to add the timezone to what I already had, I am just wanting to essentially copy likeness for likeness and it appears to have worked.

 

NeedHelp88_0-1652403362460.png

NeedHelp88_1-1652403452093.pngNeedHelp88_2-1652403516806.png

 

v-xiaochen-msft
Community Support
Community Support

Hi @NeedHelp88 ,

 

Hope you are well.

If the issue has been solved, you could mark the correct reply to close the case.

 

Best Regards,

Wearsky

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,382)