cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MikeM44
New Member

Create Flow that updates SharePoint item

I've created a flow with Power Automate where each time a new event is added to my Outlook calendar, it adds it to a SharePoint list.  The problem I'm running into is I can't figure out how to update the list if the event is modified or deleted from my calendar.  If someone could point me to a article, video, or provide some detailed information on how to accomplish this it would be greatly appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions

@Mike44 This is difficult to explain, so I put together a blog entry on how I use it for my business. The first part doesn't really apply to you (it's more about triggering a flow with an API webhook) but this link will take you to the part of the example that should show you how to update a specific list item: https://chasestreet.dev/2021/04/01/updating-an-existing-item-in-the-teams-list-app/#get-the-name-of-...

View solution in original post

15 REPLIES 15
chasestreetdev
Helper II
Helper II

In the SharePoint list, create a new column for Event ID. When you create the list item, give it the ID of the event from your Outlook calendar. When an event is modified or deleted (there's a trigger for that), just look up the item in the list where the Event ID matches that event, then modify the list item as needed.

I appreciate your help.  I've done what you suggested, but after adding a column for Event ID and assigning the ID of the calendar to that field I keep getting the following error.

 

The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/EventID' is required to be of type 'Number/double'. The runtime value '"AAMkAGUyNWMxYzU4LWNiOTktNDk3Yi1iMjVlLTY0ZDk2NzAzMDM4ZQBGAAAAAADiBJl9UX85T68yIiRccG1IBwB5T3F5KCRtR4V8FxCJjOGbAAAAAAENAAB5T3F5KCRtR4V8FxCJjOGbAAHWIwxBAAA="' to be converted doesn't have the expected format 'Number/double'.

 

Mike44_0-1617189500140.png

The Event ID type is set to number.  I don't see and option for setting to number/double.  The flow runs fine without EventID.

Mike44_2-1617189707791.png

 

 

 

chasestreetdev
Helper II
Helper II

What happens if you change the Event ID column to be a single line of text instead of a number?

I could swear that I had tried that and it failed, but this time it ran.  With regards to creating the flow to to update, I'm exactly sure of the steps that are needed.  This is what I've tried, but nothing seems to happen.  Sorry, but I can't get it all in one screen shot, so there are two.

 

Mike44_1-1617201016784.png

Mike44_2-1617201073064.png

 

 

 

 

When an event is modified/deleted use the "get items" operation to query for any item where the Event ID matches the event that was modified. The result of "get items" will be an array of list item IDs, so use the "apply to each" control to update/delete each list item as necessary (even though you'll probably only have one item in the array).

I appreciate your patience, but I just don't understand the process or what to add where.  This is all new to me.  This is what I tried:

Mike44_1-1617205476646.png

Mike44_2-1617205741454.png

 

 

 

 

@Mike44 This is difficult to explain, so I put together a blog entry on how I use it for my business. The first part doesn't really apply to you (it's more about triggering a flow with an API webhook) but this link will take you to the part of the example that should show you how to update a specific list item: https://chasestreet.dev/2021/04/01/updating-an-existing-item-in-the-teams-list-app/#get-the-name-of-...

View solution in original post

I appreciate you hanging in there with me.  I read the post, which was well written and very easy to follow.  Below is now what my flow now looks like.  When I test the flow, it says it ran successfully, however the updates are not applied to the list.  Am I missing a step?

Mike44_0-1617317194962.png

Mike44_1-1617317265901.png

 

 

 

@Mike44 It looks like you're just putting the original list information back into the item. I don't see any of the new calendar data being input into the update. All your dynamic content with the updated data should have the little blue calendar icon next to it, because that's where you get the new data from.

I was just thinking the same, thanks for confirming.  We're getting there.  If I modify a calendar event (e.g., change date or time), it gets updated in the list, however, if I delete an event all data in the row is deleted except the Event ID and the ID.  Seems like the row should be deleted.  As the trigger is a 'when event is added, updated, or deleted' it should add new events, which does not happen.  Seems like another control or condition needs to be added somewhere in the path (i.e., if new calendar event, create item; else if updated event, get item, apply to each, update item; else if deleted event, get item, apply to each, delete item).  If I'm correct, I not sure how to set that up.

Mike44
Helper I
Helper I

I finally figured it all out.  Thanks for all of your help in getting this accomplished.  As soon as I can figure out how to post the complete flow in one screen shot, I'll post the results.

Mike44
Helper I
Helper I

Answer1.JPG2.JPG

I would like to give you credit for the solution.  How can I do this?  Don't see 'Accept Solution'.

@Mike44 Your flow looks great! If you're new to this, you've picked up a lot really quickly. Thanks for the kind words.

@Mike44 I've tried this and it almost works perfectly. When I add an event it's all good and shows up on SharePoint. When I change the date or timing of an event I find it shows as several duplicates on my SharePoint calendar and then it also deletes the other events which no longer show up on the SharePoint end but still appear on the outlook end. 

 

Example I add 3 events labelled Monday, Tuesday and Wednesday, all shows up fine on SharePoint. I now update Monday, on SharePoint end it shows up to 5 times on calendar and then the other events get deleted. 

 

Have you had this issue? There must be something I'm missing but I have replicated your above flow. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,516)