Create Playlist list item
How to create a Playlist list item which links to a Stream on SharePoint video file on a SharePoint Online site using a Power Automate flow.
URI
Headers
Body
Screenshot with example
Sample data
ID – 5 (of the video file, in this case 2022-10-30 12-52-14_Trim.mp4)
FolderPath – Shared Documents/
FullPath – Shared Documents/2022-10-30 12-52-14_Trim.mp4
PlayListPath – /sites/PowerUsers/Lists/Stream Playlist
SiteUrl – https://contoso.sharepoint.com/sites/Stream
Title – My First Playlist Video
Thumbnail – https://linktoimage
UniqueId – b1af92a0-1316-45de-abad-08425c1da6ac
Copy/paste example
Resources
AddValidateUpdateItemUsingPath method
That’s it, Happy testing!
Hello Dennis, I have tried to recreate your solution in our environment. Unfortunately, the solution does not work for me. I get the following error message:
An entry without a type name was found, but no expected type is specified. In order for entries without type information to be accepted, the expected type must also be specified when specifying the model.
This is my input to the variables:
ID – 5
FolderPath – OrgaProzesse/
FullPath – OrgaProzesse/XXX.mp4
PlayListPath – https://XXXX.sharepoint.com/sites/Stream/Lists/Wiedergabeliste%20%20Test
SiteUrl – https://XXXX.sharepoint.com/sites/Stream
Title – XXX.mp4
Thumbnail – https://XXXX (I am retrieving an image from a blob storage).
UniqueId – XXXX-XXXX-XXXX-XXXX-XXXX
Hi Timo,
Just to double check. Did you use the same verbose Headers in the Headers section of the Send an HTTP request to SharePoint action?
Hi Dennis, thanks for the quick reply! Yes, I copied your “copy/paste example” and I have just double-checked it.
In the example I used a relative URL for the @a1 (aka the PlaylistPath variable): /sites/PowerUsers/Lists/Stream Playlist
In your setup I see you used an absolute URL, which starts with https and also includes the sharepoint.com domain. Can you try a relative URL instead?
I also see you used the same ID of the video. It is very unlikely that your ID is also the same as my video. Can you double check used the correct ID?
Hi Dennis,
the ID was indeed 5 as in your example 😀 I have double checked.
One problem could actually have been the URL. Unfortunately I had overlooked that. I have now used “/sites/Stream-Test/Lists/Playlist%20%20Test”. Unfortunately, after 25 minutes the flow was still running with an error after 6 attempts. I got the error code 502 “BadGateway”. The error message reads ” Invalid filename.the specified filename cannot be used. A file or directory with this name may already exist, or your permissions may not be sufficient to access the file.”. I used the file name “Text.mp4”, the list is empty and I created the library and list. So I don’t think it’s the permissions.
Hi Timo,
A %20 is a replacement for a space character. I see your list name has two %20? Does this mean your list name is ‘Playlist Test’?
You can check this name in the address bar of your browser by navigating to your Playlist.
Hi Dennis, yes exactly, my list is called ‘Playlist Test’.
Hi Timo,
When your list name is ‘Playlist Test’ I would expect the encoded URL to be:
‘/sites/Stream-Test/Lists/Playlist%20Test’
and not:
‘/sites/Stream-Test/Lists/Playlist%20%20Test’
Hi Dennis, I actually got the URL directly from SharePoint. I think I had inserted two spaces here.
Hi Timo,
This comment section is a bit limited from a troubleshooting point of view. Do you mind posting a thread on the Power Users community instead?
https://powerusers.microsoft.com/t5/Forums/ct-p/FL_Comm_Forums
Over there it should be possible to add a bit more details like screenshots of your current setup. Additionally, other people can also help out at the same time, which could lead to a quicker solution (so a win-win situation :D)
Hi Dennis, thanks for the suggestion. I will write a post about this in the next few days.
Many thanks for your help!
Hi Timo, make sure you also post the link to that thread in the comments over here.
This way I can follow-up on it or other readers can find a solution as well if they are experiencing the same issue.