Content Hub External Sources
Estimated reading time: 5 minutes
Introduction to External Sources
In the Content Hub you can have multiple external sources. These can be used with a widget template or to automatically create new Articles or Slides.
You can use RSS feeds, JSON feeds or connect to other sources like SharePoint, Facebook, X or Instagram. Additional configuration on our end is required to connect to Facebook, X or Instagram. Contact our support at techsupport@netpresenter.com if you would like to set these up.
Using RSS feeds as an External Source
In your Content Hub go to Settings > External Sources. And create a new External Source.
Select the connection type RSS
Set the URL
Supply the RSS feed URL that you want to use. Most local news sites will have an RSS or XML feed that you can use. For this example, we will use a Dutch news site:
https://feeds.nos.nl/nosnieuwsalgemeen
Mapping Content
You will need to make a mapping of the content, so the Content Hub knows what values it needs to fetch. To get a better view of the XML structure you can use Notepad++ with its XML tools plugin. The example feed looks like this:
Mappings are based on XPath, this feed uses the following mappings:
Item Root Path | //channel/item |
Media Path | //channel/item/enclosure/@url |
Read More Path | //channel/item/link |
Publish Date Path | //channel/item/pubDate |
Expire Date Path | |
Update Date Path | //channel/pubDate |
Unique ID Path | //channel/item/guid |
Field Tags | |
//channel/item/description | Description |
//channel/item/link | URL |
//channel/item/title | Title |
Using SharePoint as an External Source
To make use of this feature you first need to set up a connection between your Content Hub and your SharePoint. Check out the documentation Content Hub Connections on how to do this.
Start by going to Settings > External sources and start creating a new source. Give it a name that reflects the content. For example, “SharePoint” or “SharePoint – Support” if you want to use a subsite.
Select the Connection type Sharepoint.
Select the Connection you want to use.
Next add the URL to the items you want to display.
Creating the URL
- Log in to your SharePoint.
- Open the following page:
https://XXXXXXXX.sharepoint.com/_layouts/15/viewlsts.aspx
For subpages you can use the same type of link, for instance:
https://xxxxxxxx.sharepoint.com/support/_layouts/15/viewlsts.aspx
Open Site Pages and click on the gear icon in the top right of the page. Open Library Settings and click the More Library settings link. The URL in your address bar should look something like this:
https://XXXXXXXX.sharepoint.com/_layouts/15/listedit.aspx?List=%7BXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX%7D
https://XXXXXXXX.sharepoint.com/_layouts/15/listedit.aspx?List={XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX is your site Guid
- Add your Site Guid to the following URL: https://xxxxxxxx.sharepoint.com/_api/Web/Lists(guid’xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx’)/items?$orderby=Created desc&$top=5&$filter=(PromotedState eq 2)&$select=EncodedAbsUrl,*
- You can test this URL by opening the URL in a browser. Make sure you are logged into SharePoint first otherwise this will not work.
- In the content hub set this URL in your External Source.
To get better results you can also make changes to the filters or add your own values in there. You could for instance use a variable called Netpresenter that allows your SharePoint users to decide if an item also needs to be displayed on TV while they create the item in SharePoint.
Choosing the update interval
Set the update interval to 30 minutes. This makes sure the NCH checks for new content regularly.
Mapping Values
Unlike RSS, SharePoint uses JSON Path to define each item. To make this easy a set of default SharePoint values is loaded automatically. You can if needed add your own custom values.
Item Root Path | $.value.* |
Media Path | $.value.*.BannerImageUrl.Url |
Read More Path | $.value.*.EncodedAbsUrl |
Publish Date Path | $.value.*.FirstPublishedDate |
Expire Date Path | $.value.*.ExpireDate |
Update Date Path | $.value.*.updated |
Unique ID Path | $.value.*.[‘odata.editLink’] |
Field Tags | |
$.value.*.CanvasContent1 | Body |
$.value.*.Description | Description |
$.value.*.Modified | Modified |
$.value.*.FirstPublishedDate | Published Date |
$.value.*.Title | Title |
$.value.*.EncodedAbsUrl | URL |
Note that Expire date is a custom field that needs to be created in your Sharepoint. If not set the message will be handled using the default expire time set in your automation.
Click on Save and Run.
Using JSON as an External Source
Sililar to RSS a feed will be provided by the webpage you want to use as a source. And content will have to be mapped using JSON Path. You can have a look at the Sharepoint values to get you started with your feed.
Fetching your first content
When you click the Save and Run button the Content Hub will try to fetch content right away. You can create an Automation or link the External Source to a Widget Template.
Errors during fetch
If anything does go wrong whiile fetching content this will be indicated in the External Source overview.