Display YouTube content from any public channel in a Power App using RSS.
Unfortunately there isn't a YouTube connector for canvas apps. We can get around this limitation by using an RSS feed to display videos from a YouTube channel in your Power App.
First copy the YouTube channel ID. You can get this by visiting the channel in YouTube then getting the ID from the URL. It is the string of characters that appears at the end of the channel's URL.
For example the channel ID for Central Otago NZ's channel is:
https://www.youtube.com/channel/UCldWYNtCKY2sf6Dkq1NIxVw
Add RSS Connector
In PowerApps add the RSS connector by clicking on Data > Add Data then searching for RSS.
Display YouTube videos in Power Apps Gallery
Insert a vertical gallery then insert following into the Items property of the gallery. Substitute your channel ID into the URL parameter that is passed to the RSS.ListFeedItems method.
RSS.ListFeedItems("https://www.youtube.com/feeds/videos.xml?channel_id=UCldWYNtCKY2sf6Dkq1NIxVw")
Add the following controls to your gallery:
- Video from the Media items
- Two labels
In the video control add the following to the Media property:
ThisItem.primaryLink
In the labels add the following to the label that will be display the video title
ThisItem.title
And in the subheading there are a number of properties you could display such as the video URL. I opted to display the published date.
It is possible to Launch the YouTube video in a new tab on YouTube's website or Navigate to another screen where the video could be displayed in a larger player.