Question

Alright, I've just started with Microsoft Flow and Sharepoint Online, so please bear with me.

Anyway, the problem is that even though I seem to create an item in the sharepoint calendar (using the Sharepoint Create Item action), and test runs show that it was "added", the event itself isn't in the calendar. All the information for the event is provided in the Flow itself, although I don't think that this might be the issue.

My guess is that I'm just using the wrong action, but I'm not too sure which one I'm supposed to use instead, as googling my specific problem (and a couple of general ones in the same line) hasn't given me any tangible results.

So, in short, what Microsoft Flow action should I use, instead of the one I've already used?

Screenshots could be added if necessary, although there is some sensitive information visible in the Flow, so that would have to be blacked out/blurred.

Thank you all in advance!

Était-ce utile?

La solution

I've found that Modern SharePoint Events Lists don't work intuitively with Flow, but with HTTP Requests it is still possible.

When Flow creates an SP.Data.EventsListItem, it doesn't provide a value for the property fAllDayEvent. This seemed to prevent the Event Item from showing up in Modern SharePoint event pages and event webparts. You can view all the properties of a list item by browsing to: https://<site_url>/_api/web/lists/GetByTitle('<Event_List_Name>')/items(<ID_of_the_item_just_created_by_Flow>)

-

In order to add this property with Flow, I first create the item using the built-in "Create Item" action from flow.

Then, to add the fAllDayEvent property, I use the "Send an HTTP request to SharePoint" action to update fAllDayEvent to be false (instead of null).

enter image description here

Now, when Flow creates new EventListItems, they show up on the Modern SharePoint events page and webparts.

You can learn more about the SharePoint List API and modifying list items here: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest

Autres conseils

Although I don't have hands-on experience with this scenario, my guess would be that this is caused by a missing or 'faulty' property of the list item. Try and fetch a list item (with flow) and check the properties and its values. Do the same for the item you have created and check if there are any differences.

In case this helps anyone. Kept on getting "A type named SP.Data.EventsListItem could not be resolved by the model. When a model is available, each type name must resolve to a valid type."

Found out my issue by checking:

https://[tenant].sharepoint.com/sites/[sitename]/_api/web/lists/getbytitle('Events')?$select=ListItemEntityTypeFullName

I was using SP.Data.EventsListItem and should have been SP.Data.EventsItem.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top