Google Alert to Slack - morning update


Overview

Save yourself time and effort (and from the temptation of time wasting browsing) by getting mentions of your interests, brands or products directly to Slack every morning.

Google Alert to Slack morning update using n8n automation flow diagram

Google Alert to Slack morning update using n8n automation flow diagram

How to recreate this automation

Resources

Step 1: Setup your Google Alerts as RSS feeds

Go to https://www.google.com/alerts. Create alerts of subjects etc that are of interest to you. Once you have done that click the edit button: Edit google alert.

Change the Deliver to section to RSS feed. Deliver to as RSS feed

Now click on the RSS feed icon and grab the URL from the browser (you'll use this later in n8n - it'll look something like https://www.google.com.au/alerts/feeds/12345581409404114402/1234574375811598703) RSS feed icon

Repeat this process for all the subjects/keywords that interest you. Remember to save all your feed URLs as you'll need them in n8n.

Step 2: Setup your n8n workflow

Your n8n workflow should look like something like this: n8n workflow

The Cron node runs this workflow every morning at 7am. (A cron job is a way of running tasks at certain times repeatedly).

In the List feeds function node create an array of Google Alert RSS urls from Step 1 - something like the below (items[0].json follows the format for passing data in n8n).

1items[0].json.feeds = [
2
3	"https://www.google.com/alerts/feeds/12345581409404114402/1234525054193310532",
4	"https://www.google.com/alerts/feeds/12345581409404114402/1234535688892159086",
5	"https://www.google.com/alerts/feeds/12345581409404114402/12345125633164967",
6	"https://www.google.com/alerts/feeds/12345581409404114402/1234537100179579905",
7	"https://www.google.com/alerts/feeds/12345581409404114402/1234540289464225414",
8	"https://www.google.com/alerts/feeds/12345581409404114402/1234577577438323748"]
9
10return items;

In the Cycle through feeds function node we pop a value from the array and pass it on.

1items[0].json.feed = "";
2
3if(items[0].json.feeds.length > 0){
4	items[0].json.feed = items[0].json.feeds.pop();
5}
6
7return items;

If there are still feeds in the feeds array we loop back around to the Cycle through feeds function using the IF node (each time this is run it decreases the length of the feeds array by 1).

We also pass valid feed values through to the RSS Feed Read node. This node just takes in the value passed to it from the IF node (a Google Alerts RSS URL) and loads it.

The Slack node then sends this data to Slack.

Future enhancements

  • add more sources - not just Google Alerts for the ultimate morning update.
  • combine Google Alert RSS feeds into a single RSS feed.

If you enjoyed this we would ❤️ you to retweet or like this tweet