Step 1: Install the Required Package

First, you’ll need to install the rss-parser package, which allows you to easily work with RSS feeds in JavaScript.

Open your terminal and run the following command:

npm install rss-parser

Step 2: Create a Webhook Listener

const Parser = require('rss-parser');
const parser = new Parser();

// RSS feed URL
const rssFeedUrl = 'https://zapier.com/engine/rss/682420/llm-radar-new-models';

// Function to fetch and parse the RSS feed
async function fetchRssFeed() {
    try {
        const feed = await parser.parseURL(rssFeedUrl);
        feed.items.forEach(item => {
            console.log('New Model:', item.title);
            console.log('Description:', item.contentSnippet);
            console.log('Link:', item.link);
            console.log('Published Date:', item.pubDate);
            console.log('-----------------------------');
        });
    } catch (error) {
        console.error('Error fetching RSS feed:', error);
    }
}

// Poll the RSS feed every 15 minutes
setInterval(fetchRssFeed, 15 * 60 * 1000);

// Initial fetch when the script starts
fetchRssFeed();