A Google Apps Script utility that automatically imports multiple Google Alerts RSS feeds into a Google Sheet, enriches them with Open Graph metadata (title & image), and keeps your sheet clean and up‑to‑date.
- Multiple feed support — import from any number of Google Alerts RSS feeds.
- Automatic deduplication — skips entries already in your sheet.
- Open Graph enrichment — fetches
og:titleandog:imagefrom the linked article. - Clean data layout — consistent headers and plain‑text content extraction.
- Row limit management — keeps only the latest 100 entries (plus header).
- City tagging — label each feed with a custom location or category.
| Cidade | ID | Título | Link | Fonte | Publicado | Atualizado | Conteúdo | OG Title | OG Image |
|---|---|---|---|---|---|---|---|---|---|
| Presidente Epitácio | tag:google.com,2013:alerts/... | Example Alert Headline | ... | site.com | 2025‑07‑21 | 2025‑07‑31 | ... | ... | ... |
- Create a new Google Sheet.
- Open Extensions → Apps Script.
- Paste the contents of
importMultipleGoogleAlerts.jsinto the editor. - Adjust the
feedsarray to include your own Google Alerts RSS feed URLs and labels.
const feeds = [
['Presidente Epitácio', 'https://www.google.com.br/alerts/feeds/...'],
['Nova Andradina', 'https://www.google.com.br/alerts/feeds/...']
];- Save the script.
- Click Run → importMultipleGoogleAlerts.
- Authorize the script to access your spreadsheet and fetch URLs.
- In Apps Script, go to Triggers.
- Add a trigger to run
importMultipleGoogleAlertsperiodically (e.g., hourly).
- Header Setup — Ensures the sheet has the correct column headers.
- Deduplication — Reads existing IDs to avoid duplicates.
- RSS Parsing — Fetches and parses each feed using
XmlService. - Metadata Extraction — Extracts:
- Real article URL
- Source domain
- Published/updated dates
- Plain‑text content
- Open Graph Fetch — Requests the article page and extracts
og:titleandog:image. - Row Management — Deletes oldest rows beyond the configured limit (
maxRows).
- A Google account
- A Google Sheet
- Google Alerts RSS feed URLs
- Apps Script permissions to:
- Read/write the spreadsheet
- Fetch external URLs
This project is licensed under the MIT License.
Pro tip: You can fork this repo and adapt it to import any RSS feed into Google Sheets, not just Google Alerts.