Send earthquake safety check alerts from USGS to Slack using Google Sheets
Ready for 3.0What this workflow does
This workflow has 14 nodes and runs on a schedule (every 5 minutes) (plus 2 other triggers). Along the way it connects Google Sheets and Slack.
How it runs
Trigger: On a schedule (every 5 minutes) (plus 2 other triggers).
- Config (Edit Fields (Set)): sets 5 fields: feed, min_magnitude, radius_km…
- Spreadsheet ID (Edit Fields (Set)): sets 1 field: spreadsheet_id
- Read Sites tab (Google Sheets): read (sheet)
- Add the Sites and Alerts tabs (HTTP Request): calls an HTTP API (POST)
- Get earthquakes (USGS) (HTTP Request): calls an HTTP API (GET)
- Write the header rows (HTTP Request): calls an HTTP API (POST)
- Read Alerts tab (Google Sheets): read (sheet)
- Match quakes and sites (Code): runs custom JavaScript code
- Post safety check (Slack): post (message)
- To alert rows (Code): runs custom JavaScript code
…plus 1 more step. See the full node list below.
Services it uses
Other Google Sheets + Slack templates (1,314)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow runs every 5 minutes, reads your site locations from Google Sheets, checks the USGS GeoJSON earthquake feed, and posts a Slack safety-check message when a qualifying quake occurs near any site, while recording sent alerts back to…