Creating RSS feed using ContentService

You created an RSS reader application in Chapter 6, Creating Feed Reader and Translator Applications. Now, you can create an application to publish an RSS feed. Put the RSS data in a Sheet as shown here:

Creating RSS feed using ContentService

Also, edit/enter the following doGet function:

function doGet() { /* * There is no active spreadsheet, so you should open by id. * Use the id of the spreadsheet in which your script resides. * */ var ss = SpreadsheetApp.openById([[ this spreadsheet id ]]); var SheetRss = ss.getSheetByName("RSS Data"); var rssData = SheetRss.getDataRange().getValues(); // Remove header. rssData.shift(); var strRss = '<?xml version="1.0" ...

Get Learning Google Apps Script now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.