Skip to content

dhideo/GAFeed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

📡 Google Alerts to Google Sheets Importer

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.

✨ Features

  • 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:title and og:image from 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.

📋 Example Output

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 ... ... ...

🚀 Getting Started

1. Prepare Your Google Sheet

  • Create a new Google Sheet.
  • Open Extensions → Apps Script.

2. Add the Script

  • Paste the contents of importMultipleGoogleAlerts.js into the editor.
  • Adjust the feeds array 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/...']
];

3. Authorize & Run

  • Save the script.
  • Click Run → importMultipleGoogleAlerts.
  • Authorize the script to access your spreadsheet and fetch URLs.

4. Automate (Optional)

  • In Apps Script, go to Triggers.
  • Add a trigger to run importMultipleGoogleAlerts periodically (e.g., hourly).

⚙️ How It Works

  1. Header Setup — Ensures the sheet has the correct column headers.
  2. Deduplication — Reads existing IDs to avoid duplicates.
  3. RSS Parsing — Fetches and parses each feed using XmlService.
  4. Metadata Extraction — Extracts:
    • Real article URL
    • Source domain
    • Published/updated dates
    • Plain‑text content
  5. Open Graph Fetch — Requests the article page and extracts og:title and og:image.
  6. Row Management — Deletes oldest rows beyond the configured limit (maxRows).

🛠️ Requirements

  • A Google account
  • A Google Sheet
  • Google Alerts RSS feed URLs
  • Apps Script permissions to:
    • Read/write the spreadsheet
    • Fetch external URLs

📄 License

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.

About

📡 Google Alerts to Google Sheets Importer

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published