Streamline your Google Alerts with AI
Organize all your Google Alerts into concise summaries with clear categories using AI and automation.
2024-11-13
Setting up Google Alerts is a great way to stay up to date on topics that are important to you and your business, but once you set up several alerts, you run the risk of email overload, never-ending long-form articles you’ll never read, and ultimately, you’ll miss important news.
But have no fear, a little automation with AI can help organize and streamline all your Google Alerts into concise summaries with clear categories — stored or routed to your app of choice.
In this tutorial, we’ll set up a Google Alert, route it to an RSS feed, parse the RSS feed with Zapier, summarize and categorize the content with OpenAI, and eventually store the summaries in Google Sheets.
You’ll need:
Steps:
- Step 1: Create a Google Alert with RSS delivery
- Step 2: Generate an OpenAI key
- Step 3: Set up a Zap to receive, format, and parse your RSS feed(s)
- Step 4: Summarize your alert content with OpenAI
- Step 5: Categorize your alert content with OpenAI
- Step 6: Send your summary and category data to Google Sheets
Step 1: Create a Google Alert with RSS delivery
To get started, navigate to Google Alerts and create an alert that delivers to an RSS feed. In this example, I will create an alert about “sandwiches” (a very important alert!). To do this, type in your alert keyword(s) in the Google Alerts search bar, click the Show Options button below the search bar, and set the Deliver To setting to RSS feed.
.webp)
Next, we’ll need to get the RSS feed link from this alert. The quickest way to do this is to hover over the RSS feed icon of the created alert, right-click, and select Copy Link Address.
.webp)
Alternatively, you can click on the RSS feed icon, which will take you to the RSS feed URL. You can then copy/paste the URL from this page.
.webp)
Step 2: Generate an OpenAI key
Next, we’ll need to generate an OpenAI key. This will be used in the ensuing step within our Zapier Zap to summarize and categorize our Google Alert RSS feed content. To do this, log in to platform.openai.com, then click ‘API’ to be taken to the developer platform.
.webp)
Click ‘API keys’ on the left menu, and click ‘Create new secret key’.
.webp)
Give it a name and click ‘Create secret key’. Once generated, copy it to your clipboard. Also, keep it secure; do not share it publicly as it gives access to your OpenAI account capabilities.
Step 3: Set up a Zap to receive, format, and parse your RSS feed(s)
Now that we have our Google Alert set up and delivering to an RSS feed, and we have an OpenAI API key, we can head over to Zapier to create a Zap automation that will connect all of these apps together to summarize and categorize our Google Alert content.
To do this, go to Zapier, click on the Zaps menu item on the left side, and click the Create button.
.webp)
For the trigger of your Zap, search and select the RSS by Zapier app, and set the Event to “New Item in Multiple Feeds.”
.webp)
Add the Google Alert RSS feed URL(s) from Step 1 into the Feed URLs text box — one URL per text box. Note, that the RSS by Zapier trigger can handle a maximum of 10 RSS feeds. If you need more, you can always duplicate your Zap.
.webp)
Test your trigger to make sure you’re getting content from your Google Alert RSS feed.
.webp)
Now that the RSS feed is populating in our Zap, we need to extract the content from the Raw Link. But there's an issue. The URLs sent from the Google Alert RSS feed have an arbitrary URL prefix that will make it impossible for us to extract the page content. This prefix looks like this “https://www.google.com/url?rct=j&sa=t&url=”.
But not to worry, we can remove this URL prefix on all of the RSS feed URLs using a Code by Zapier step. To do this, click the Add a Step button and search and select the Code by Zapier app. Set the Event to Run Javascript.
.webp)
For the action, we’ll need to set an input variable (e.g. ‘fullURL’) to the Raw Link Href from the RSS feed step and transform it with a little Javascript to output a URL without the Google URL prefix. Copy/paste the code snippet below into the Code text box in this step to do this.
Code Snippet:
.webp)
Test this action and make sure that the “Actual URL” output is a real URL.
.webp)
Now that we have a real URL from our RSS feed, we can grab the content from the webpage with Zapier’s Web Parser.
To do this, click on the Add a Step button in the Zap builder and search and select the Web Parser by Zapier app. Set the Event of this step to Parse Webpage.
.webp)
For the action, select your “Actual URL” from the previous Code step, set your output format (we went with HTML; plaintext is another good option), and pick the setting for Continue on failure. Our recommendation here is “False” because if the web parser doesn’t work, you probably don’t want the automation to continue.
.webp)
Test this step to ensure you’re getting content output from the Web Parser.
Step 4: Summarize your alert content with OpenAI
Now for the fun part! We’ll use the OpenAI key from Step 2 to connect your OpenAI account to this Zap to start summarizing your Google Alert RSS feed content.
Click the Add a Step button, search and select ChatGPT from the app window, and set the Event to Summarize Text.
.webp)
This is where you’ll need your OpenAI API key. On the Account tab, when you click Connect, a pop-up window will appear where you can paste in your OpenAI API key. Drop it into the top text box and then click Continue.
.webp)
In the Action tab, select the “Content” output from your previous Web Parser step as the Text to Be Summarized. You can leave all of the other settings untouched on this page.
.webp)
Test this step to make sure the summary looks correct before moving on to the next step.
Step 5: Categorize your alert content with OpenAI
Now that we have a summary of our Google Alert content, we can categorize it with OpenAI too. To do this, click the Add a Step button, search and select ChatGPT from the app window, and set the Event to Classify Text.
.webp)
In the Action tab, set the Text to Be Classified to the Summary output from the previous ChatGPT step.
Set the Categories to your preferred classifications, adding one item per row.
.webp)
Step 6: Send your summary and category data to Google Sheets
You’ve made it to the last step! Now that you have the majority of your Zap set up, we need to create a place to store your summarized and categorized Google Alert feed content. You could store this in Google Docs, Airtable, or another source. Or, route it to specific channels in Slack or inboxes in Gmail or Outlook — for this tutorial, we’re going to store the output in Google Sheets.
If you want to go with this option, create a Google Sheet with the below column headers:
- Title
- Summary
- Category
- Link
- Date
.webp)
Head back to Zapier and click Add a Step, search and select the Google Sheets app, and set the Event to Create Spreadsheet Row.
.webp)
Connect your account, and in the Action tab, select your Google Drive location, your Spreadsheet, and your Worksheet of the Google Sheet you just created.
Now, we need to map the data from the various steps to the columns in our Google Sheet. To do this, select the data from your previous steps for the matching Google Sheet column like the below screenshot. You’ll note that we’re pulling data from multiple previous steps.
.webp)
Test this step and you should see your Google Alert RSS feed data populate in your Google Sheet.
.webp)
If all looks good, you can publish your Zap. That’s it! You’ve set up an automation that can ingest your Google Alerts, pass the content through multiple AI steps to summarize and categorize the information, and store it all in a central repository.
You can take this one step further and filter the data by date in your Google Sheet, route the content by category to different channels (e.g. Slack, email inboxes, etc.), or add additional AI steps to your automation.
This tutorial was created by Garrett.