IMPORTFEED is a powerful but less known function in Google Sheets. IMPORTFEED allows you to easily import RSS or ATOM Feed from a feed source to a spread-sheet.
Before we get into the details of how IMPORTFEED works, let’s understand quickly what are RSS (or ATOM) feeds.
What is RSS (and Atom) ?
Syndication feeds (such as an Atom feed, an RSS feed or an RDF feed) are small text files that provide information about content on websites (especially blogs & news sites). When new content is added to the site, the feed text file is also updated, either manually or automatically. These files are not human readable (or let’s say reader friendly). However, programs called “readers” or “aggregators” can parse these files & extract details of content published on the sites.
The easiest way to get the feed file for a site is to append “/feed” to the domain. For example the feed file for digitalmarketingchef.org happens to be digitalmarketingchef.org/feed. If you check the feed file you would notice that it’s a structured XML file.
How does IMPORTFEED work
IMPORTFEED function allows you to convert a Google Sheet to a Feed reader. You can track content from a source on a sheet by using a simple IMPORTFEED formula.
The syntax of IMPORTFEED is as follows:
=IMPORTFEED(url, [query], [headers], [num_items])
url: URL of the feed file
[query]: Type of output expected. The following inputs are acceptable:
"feed"returns a single row containing feed information including title, description, and url.
"feed <type>"returns a particular attribute of the feed, where
"items"returns a full table containing items from the feed. If
num_itemsis not specified, all items currently published on the feed are returned.
"items <type>"returns a particular attribute of the requested item(s), where
summary(the item content, minus hyperlinks and images),
url(the URL of the individual item), or
created(the post date associated with the item).
[headers]: Binary field that mentions whether or not we would want header values. Default value is FALSE.
[num_items]: Number of items we want to see. If a number is entered , the number of output items are shown (sorted by recency). If no number is mentioned – all items in the feed are shown.
Simple Example Usage of IMPORTFEED
In the following example I will use IMPORTFEED to read the feed from digitalmarketingchef.org.
The feed file is located at : http://www.digitalmarketingchef.org/feed/
The formula is as follows:
=IMPORTFEED(” http://www.digitalmarketingchef.org/feed/ “, “items”, TRUE, 5)
I entered “items” for query & “5” for num_items , thus I will see the last 5 published articles as output. Moreover, the first row will be the headers because I passed “TRUE” for headers.
Here’s what the output looks like:
Alternately, we may want to extract a single column only. The formula needs to be tweaked slightly to get that done. For example, if want the list of URLs only the formula would be as follows:
=IMPORTFEED(” http://www.digitalmarketingchef.org/feed/ “, “items url“, TRUE, 5)
It’s that simple! So if you are an avid reader and on the lookout for an easy method to aggregate latest content – go ahead & create Google sheet based feed readers by using IMPORTFEED.
FAQs : IMPORTFEED in Google Sheets
IMPORTFEED function is used for importing syndication feeds (e.g. RSS, Atom) to Google Sheets.
The syntax of IMPORTFEED function is as follows : IMPORTFEED( url, [query], [headers], [num_items] )
The best way to find the feed file of a particular website is to append “/feed” to the website address. For example, the feed file of www.digitalmarketingchef.org is located at www.digitalmarketingchef.org/feed.