How to create an RSS reader using SharePoint news

RSS feeds are a great way to keep updated with everything being posted in the sites you are following. SharePoint has a native integration for this feature but the layout is not that good, and it lacks the support for all the modern features the platform has been receiving.

In this article I’ll explain step by step how you can reuse the out of the box SharePoint news web part to create your own RSS reader web part.

RSS reader for SharePoint

This solution makes use of the SharePoint news web part, Power Automate and a SharePoint feature called News Link that allows you to publish external pages as SharePoint news.

To create your own RSS reader on SharePoint start by doing the following:

  1. Open Power Automate and sign in with your account
  2. On the vertical menu click on Create and then on Automated flow
    New Power Automate Flow
  3. Provide a name to the flow g. SharePoint News
  4. Select the trigger When a feed item is published
  5. Click on Create
    Create a new flow
  6. Paste the link to the RSS feed
    Feed URL
  7. Click on + New step
  8. Search for HTML to text, this removes any html tags from the text
    HTML to text
  9. Click in the content text box and select Feed Summary
  10. Click on + New step
  11. Search for Send an HTTP request to SharePoint
  12. Fill the form with the following details:
    • Site address – The site collection where you want to post the news
    • Method – POST
    • Uri – /_api/sitepages/pages/reposts
    • Headers
      content-type: application/json; odata=verbose; charset=utf-8
      accept: application/json
    • Body
      {“BannerImageUrl”:”Your Image Banner URL”,”Description”:”@{body(‘Html_to_text’)}”,”IsBannerImageUrlExternal”:true,”OriginalSourceUrl”:”@{triggerOutputs()?[‘body/primaryLink’]}”,”ShouldSaveAsDraft”:false,”Title”:”@{triggerOutputs()?[‘body/title’]}”,”__metadata”:{“type”:”SP.Publishing.RepostPage”}}

    In the body replace the Banner Image Url by the link to your own image, this must be done since the RSS feed connector does not bring the image from the feed

    SharePoint res api respost

  13. Click on Save

The flow is now running and every time something new is published a news link will be created on your SharePoint site. To see the new post on SharePoint making use of the news web part do the following:

  1. Open the SharePoint site where you want to display the RSS reader
  2. Edit the page and click on the + icon to add a new web part
  3. Search for News and add it
  4. Open the settings and Select the site where the feed is being published
  5. Adjust the web part settings to your needs and Republish the page
    RSS reader for SharePoint

It might take a few days to see anything on the page, but you will end up with a good-looking RSS reader web part that integrates with the SharePoint Home site and the SharePoint mobile App.

If you want to see this in action have a look to the solution, I’ve implemented using this method demoed in the video below.


10 Responses to “How to create an RSS reader using SharePoint news”

  1. Cajetan

    November 1, 2020

    Thanks for publishing could you clarify from where does the Body keyword come from, it would be great if you would have shown how you filled the body content in the Step of Send an Http request to Sharepoint

    Reply
  2. Paul

    November 11, 2020

    Love this as a solution João!
    But my Flow failed in the “Send HTTP request….” step.

    {“BannerImageUrl”:”https://**************************.com/sites/TeamsTraining/SiteAssets/Microsoft_Teams-Logo.png”,”Description”:”@{triggerOutputs()?[‘body’]}”,”IsBannerImageUrlExternal”:true,”OriginalSourceUrl”:”@{triggerOutputs()?[‘body/primaryLink’]}”,”ShouldSaveAsDraft”:false,”Title”:”@{triggerOutputs()?[‘body/title’]}”,”__metadata”:{“type”:”SP.Publishing.RepostPage”}}

    Error:
    {“odata.error”:{“code”:”-1, Microsoft.SharePoint.Client.InvalidClientQueryException”,”message”:{“lang”:”en-US”,”value”:”Invalid JSON. The property name ” is not valid. The name of a property cannot be empty.”}}}
    clientRequestId: f8009217-fd5f-448a-ab5c-b165a06f1ecf
    serviceRequestId: 8a518c9f-40d0-a000-d046-48848b9e0807

    Please help.

    Reply
    • João Ferreira

      November 16, 2020

      Hi Paul,

      Can you please let me know what is the RSS url you are using so I can try to reproduce the issue locally?

      My best,

      João Ferreira

      Reply
  3. matthew howell

    November 11, 2020

    Really creative use of out of the box components. Well done!

    Reply
  4. matthew howell

    November 12, 2020

    I set this up but I’m getting a 400 status error:
    “Invalid JSON. A token was not recognized in the JSON content”

    For this test I’m using the world news feed from CNN – http://rss.cnn.com/rss/edition.rss and posting to a test SP site.

    Reply
    • matthew howell

      November 13, 2020

      Fixed a few syntax errors, including removing the “IsBannerImageUrlExternal” property (because of an error that says it doesn’t exist in the repost page type), and now the flow succeeds and creates a url in the SP site that links to the external post BUT- IT DOESN’T CREATE A NEWS LINK.

      Reply

Leave a Reply


Web developer focused on SharePoint branding, blogger, tech enthusiast. Travelling and sports are my addictions, knowledge and success are my daily motivations.