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.


19 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

  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.

    • 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

  3. matthew howell

    November 11, 2020

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

  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.

    • 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.

  5. Myriam

    January 8, 2021

    Thank you very much for this tutorial and these very clear explanations. I finally managed to get this rendering !!
    Do you know if it is possible to enable likes and comments on these articles?

  6. Damon

    February 2, 2021

    Hi Joao,

    I am getting the error below. Can you assist me with fixing this? The feed I’m connecting to is https://techcommunity.microsoft.com/plugins/custom/microsoft/o365/custom-blog-rss?tid=-2538899071346541984&board=MicrosoftTeamsBlog&label=&messages=&size=10

    {“odata.error”:{“code”:”-1, Microsoft.SharePoint.Client.InvalidClientQueryException”,”message”:{“lang”:”en-US”,”value”:”An entry without a type name was found, but no expected type was specified. To allow entries without type information, the expected type must also be specified when the model is specified.”}}}

    Thank You,
    Damon

    • Damon

      February 2, 2021

      I was able to fix this by adding a double underscore for “__metadata” and it fixed the issue.

      • João Ferreira

        February 3, 2021

        Hi Damon,

        Thanks for letting me know about the fix.

        Have a nice day 🙂

  7. Myriam

    February 5, 2021

    Hello, my first comment is awaiting moderation, so I post a second time.
    Thank you very much for this tutorial and these very clear explanations. I finally managed to get this rendering !!
    Do you know if it is possible to enable likes and comments on these articles?

    • João Ferreira

      February 5, 2021

      Hi Myriam,

      My apologies for taking so long to check your comments, I’m trying to keep up with them but its not been easy.
      About your question, it is not possible to get likes and comments in News Links.

      Have a nice day 🙂

      • Myriam

        February 8, 2021

        Thanks for your answer !

  8. Olumide Adewumi

    April 11, 2022

    Thank you so much for putting up this beautiful post and solution.

    However, on my test page, the news comes out as duplicate. How can I fix it.

    Thank you.

    • João Ferreira

      April 27, 2022

      Hello,

      Can you please check if the flow is running twice for the duplicated news?

      Have a nice day 🙂


I've been working with Microsoft Technologies over the last ten years, mainly focused on creating collaboration and productivity solutions that drive the adoption of Microsoft Modern Workplace.

%d bloggers like this: