In this post, we’ll explore how to use Feed Control and Google Sheets to monitor an RSS feed and automatically insert new items as rows in a spreadsheet.

We’ll first discuss Google Sheet’s IMPORTFEED function and then demonstrate how to use Feed Control with Google Apps Script to automatically add new items to your Google Sheet.

Viewing feeds with IMPORTFEED

Google Sheets offers an IMPORTFEED function to load a feed into your spreadsheet. This feature provides a dynamic snapshot of a feed, displaying the latest items (typically 10-20). While useful, it has limitations:

  1. It only shows the most recent items in the feed.
  2. You can’t delete item rows or edit cells without first copying the contents to break the link to the function.
FiveFilters.org feed loaded inside Google Sheets using the IMPORTFEED function

But what if you want to store each new item as a proper row in your sheet, allowing you to track updates over time?

Inserting items using Feed Control and Google Apps Script

Let’s walk through how to use Feed Control’s webhook functionality to automatically insert new rows into your Google Sheet when new RSS feed items are detected.

Note: Feed Control is a paid service, but we offer a 7-day free trial if you would like to test this process before committing.

Feed Control allows you to add feeds to your account, alerting you of new items via email, Slack, Discord, or webhooks. We’ll use webhooks in this guide to send new items to Google Sheets.

When setting up a webhook, you will need to provide Feed Control with a URL to the webhook handler. We’ll use Google Apps Script via Google Sheets to create a webhook handler tied to your sheet to achieve this.

Step-by-step guide

1. Create a new Google Sheet

Use this link or click Blank spreadsheet in Google Sheets.

 


  • Top 18 Best Web Hosting Services In 2024: Despite there are multiple web hosting providers available in the market, choosing the best one is really a hard nut to crack!! Because almost all service providers are offering their services with the same features and quality.
  • How to start your own Crypto currency website: For a cryptocurrency news website, choosing the right Content Management System (CMS) is crucial for managing content effectively, ensuring security, and providing a great user experience. Here are some of the best CMS options tailored for such a site, each with its unique strengths:
  • The Evolution of Coffee Brewing Methods: A Historical Perspective: Coffee has been brewed and enjoyed for centuries, with various methods evolving over time to create the perfect cup of joe. From early methods like the Ibrik method and coffee pots for coffee houses to modern technologies like the AeroPress and Hario V60, the world of coffee brewing has come a long way.
  • Stop WordPress from Creating Extra Cropped Image Sizes: Whenever you upload an image to your WordPress site through the media library, it automatically creates and stores multiple additional versions of that image. If your site doesn’t utilize these extra image sizes, they will consume valuable storage space and increase the size of your server backups.
  • Explain WordPress Portfolio and how to created them: WordPress portfolios are digital showcases for individuals or businesses to display their work, projects, or professional accomplishments. This feature is particularly useful for creatives, freelancers, and agencies looking to exhibit their skills or services in a visually appealing and organized manner. Portfolios in WordPress can be created using various methods, including themes that come with built-in portfolio functionalities, plugins that add portfolio features, or custom coding for a more personalized approach.
  • 15 Essential WordPress Plugins For Every Site: Plugins are essential for every type of website, as they provide additional features and customization options that are not available in the core WordPress platform. A study by CodeinWP found that the average WordPress site has 20 active plugins, indicating the importance of plugins in website development.
  • SAILING and YACHTING: Awesome Sailing Vlogs for the Enthusiast
  • Comparing Google and Microsoft’s Success in Capitalizing on Generative AI: The buzz of interest in AI services helped drive revenue for Microsoft’s biggest unit, cloud services—up by 7 percentage points compared to a year ago—and Microsoft’s overall sales rose 17 percent to nearly $62 billion. It also gained cloud market share, Nadella added. The number of $100 million cloud deals that Microsoft landed increased 80 percent during the quarter compared to the same period a year ago, and $10 million deals doubled.
  • The Best WordPress Hosting Solution in Australia: Each of our WordPress hosting solutions are fine-tuned, blazing fast and are ready for you! Starting a WordPress website has never been easier with our free 1-click WordPress installation, enterprise-grade security and an assortment of tutorials and helpful guides to get you started, all backed by our 99.9% uptime guarantee.
  • Elementor vs Beaver Builder: A Comparison of Design Flexibility and Performance in WordPress: Elementor and Beaver Builder are two of the most widely recognized options, each providing distinct features that cater to varying user requirements. This article conducts a comprehensive comparison of these tools, examining their design flexibility, performance metrics, and overall user experience.
  • The Best Contact Form Plugins for WordPress to Easily Manage User Inquiries: In an effort to improve user interactions on WordPress websites hosting, the examination of contact form plugins becomes essential. This article aims to present an overview of the top 5 contact form plugins available for WordPress, highlighting their features and pricing structures to facilitate an well-considered choices process.
  • What are the 20 best Joomla plugins: Joomla plugins are small, task-specific extensions that enhance or modify the core functionality of a Joomla website. They operate as event-driven scripts, listening for specific “events” triggered by Joomla or its components and executing corresponding actions. Plugins are a crucial part of Joomla’s extensibility, allowing developers to add features or customise behaviour without altering the core Joomla code.
  • How to design a strong off-page SEO strategy: Lessons learnt from earning over 50,000 contextual links for thousands of websites in the toughest niches. In 2023, virtually every business that has a website is prioritizing their investment in SEO. The reason being, amidst the chaos of the current year, customers are resorting to online channels for safe purchasing, and optimizing their online presence is a surefire way to gain an edge over rivals. While some firms have set up internal teams, and others have hired external agencies to boost their search engine rankings, a documented off-page SEO strategy is still a rarity among most businesses.
  • What are WordPress Plugins? WordPress plugins are modular pieces of software that can be added to a WordPress site to extend or enhance its functionality without modifying the core WordPress code. They allow website owners to add features, improve performance, and customise the behaviour of their websites easily, catering to a wide range of needs, from SEO and security to e-commerce and design enhancements.

 

2. Create an Apps Script for your sheet

  • Click Extensions > Apps Script from the menu.

3. Create the webhook handler for Feed Control

  • In the code editor, replace the empty function with the following code:
function doPost(e) {
  // Get spreadsheet connected to this script
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
  
  // Add header row if this is an empty sheet
  if (sheet.getLastRow() === 0) {
    sheet.appendRow(['Date', 'Title', 'Description', 'Author', 'URL', 'Content']);
  }
  
  // Parse the JSON payload from the webhook
  var jsonData = JSON.parse(e.postData.contents);
  
  // Extract the fields from the JSON data
  var date = jsonData.date || new Date().toISOString();
  var title = jsonData.title || '';
  var description = jsonData.description || '';
  var author = jsonData.author || '';
  var url = jsonData.url || '';
  var content = jsonData.content || '';
  
  // Append the data as a new row
  sheet.appendRow([date, title, description, author, url, content]);
  
  // Return a success response
  return ContentService.createTextOutput(JSON.stringify({ 'result': 'success' }))
    .setMimeType(ContentService.MimeType.JSON);
}

4. Deploy the webhook handler

  • Click on Deploy > New deployment
  • Choose Web app as the script type
  • Set the following options:
    • Description: Feed Control webhook handler
    • Execute as: Me
    • Who has access: Anyone

Note: Access to anyone does mean for your sheet, but for the webhook handler. It simply means that no additional authentication will be required to trigger the script. The URL to your handler will have a long unique ID. So unless you share it with someone else, it’s very unlikely anyone will be able to trigger the handler.

  • Click Deploy

Note: You may have to authorise access and navigate through a security warning. If you see such a message click Advanced and then Go to [project name] to continue.

5. Copy the Web App URL

  • Copy the long, unique URL generated for your webhook handler.

6. Add webhook integration in Feed Control

  • In Feed Control, go to Integrations > Webhook
  • Paste the URL you copied and click Save.

7. Enable integration on your feed

  • In Feed Control, select your desired feed (or add the feed first)
  • In the Alerts/Integrations tab, select your newly added webhook
  • Click Save to confirm

8. Test the setup

From now on the webhook will be triggered when new items are detected.

To test immediately, you can:

  • Delete the latest item in the feed from Feed Control (via the Feed Items tab)
  • Refresh the feed (via the Actions drop down)
  • Check your Google Sheet for a new row with the re-detected item

If everything is set up correctly, you should see a new row at the bottom of your sheet for the new feed item. It may take a minute for this to occur.

Updating the script

To modify the webhook handler script:

  1. Open your Google Sheet
  2. Click Extension > Apps Script
  3. Edit the script
  4. Click Deploy > Manage Deployments
  5. Click Edit (pencil icon)
  6. Under Version, choose New Version
  7. Click Deploy

With this setup, each new item from your RSS feed will be automatically added as a new row to your Google Sheet, allowing you to track and analyze feed updates over time.

Similar Posts