AutomationFlowsSlack & Telegram › Monitor Nasa Asteroid Threats with AI Fact-check and Multi-channel Alerts

Monitor Nasa Asteroid Threats with AI Fact-check and Multi-channel Alerts

ByAsuka @asuka-ai on n8n.io

This workflow is designed for space enthusiasts, science educators, journalists, fact-checkers, and researchers who want to stay informed about near-Earth asteroid threats while filtering out media sensationalism. It's also valuable for anyone studying how different regions…

Cron / scheduled trigger★★★★☆ complexityAI-powered27 nodesNasa@Apify/N8N Nodes ApifyOpenAISlackDiscordEmail SendGoogle Sheets
Slack & Telegram Trigger: Cron / scheduled Nodes: 27 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #11289 — we link there as the canonical source.

This workflow follows the Apifyn8N Nodes Apify → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "KZKgj7KYuSvGg3Ki",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Real-time Asteroid Alert System with AI Fact-Check and Multi-Channel Notifications",
  "tags": [],
  "nodes": [
    {
      "id": "44ba1c99-2d76-4a6b-b522-a76390e3af0a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        1280
      ],
      "parameters": {
        "color": 7,
        "width": 340,
        "height": 664,
        "content": "## \u2699\ufe0f Setup Instructions\n\n### Step 1: NASA API\n1. Go to https://api.nasa.gov/\n2. Sign up for a free API key\n3. Add credential in n8n\n\n### Step 2: Apify\n1. Create account at https://apify.com/\n2. Connect via OAuth in n8n credentials\n\n### Step 3: OpenAI\n1. Get API key from https://platform.openai.com/\n2. Add to n8n credentials\n\n### Step 4: Notifications\nConfigure at least one channel:\n- **Slack**: Create OAuth app, add to n8n\n- **Discord**: Create webhook URL\n- **Email**: Configure SMTP settings\n\n### Step 5: Google Sheets (Optional)\nCreate a sheet with these columns:\n`Date`, `Alert Level`, `Hazardous Count`, `Threat Score`, `Media Panic Score`, `Misinformation Detected`, `Top Asteroid`, `Most Accurate Region`"
      },
      "typeVersion": 1
    },
    {
      "id": "5ee6598d-321d-437a-9a03-23678b2c113b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        1280
      ],
      "parameters": {
        "color": 7,
        "width": 220,
        "height": 192,
        "content": "## \ud83d\udd04 Triggers\n\n**Schedule**: Daily at 9 AM\n\n**Webhook**: POST to\n`/webhook/asteroid-alert`\n\nBoth work simultaneously."
      },
      "typeVersion": 1
    },
    {
      "id": "e70a4cc3-37f5-484e-bdc2-8e8aedf26fe6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        1760
      ],
      "parameters": {
        "color": 7,
        "width": 220,
        "height": 276,
        "content": "## \ud83d\udd0d Asteroid Analysis\n\nScans 7 days of NASA data.\n\n**Alert Levels:**\n- \ud83d\udfe2 LOW: No hazards\n- \ud83d\udfe1 MEDIUM: Hazardous detected\n- \ud83d\udd34 HIGH: Within 10 lunar distances"
      },
      "typeVersion": 1
    },
    {
      "id": "8f919b78-d0a7-46ec-9879-d07fffadabda",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2016,
        1728
      ],
      "parameters": {
        "color": 7,
        "width": 200,
        "height": 240,
        "content": "## \ud83c\udf0d News Search\n\nSearches 3 regions:\n- US (English)\n- Japan (Japanese)\n- EU/UK (English)\n\n5 results per region."
      },
      "typeVersion": 1
    },
    {
      "id": "413b71df-4dbc-4de6-80df-31c839d195cd",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2240,
        1056
      ],
      "parameters": {
        "color": 7,
        "width": 220,
        "height": 224,
        "content": "## \ud83e\udd16 AI Fact-Check\n\nCompares news vs NASA data:\n- Verifies claims\n- Detects sensationalism\n- Scores threat & panic\n- Analyzes regional tone"
      },
      "typeVersion": 1
    },
    {
      "id": "a70895f9-009f-4df0-b98f-1e2a85f8d617",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3504,
        1232
      ],
      "parameters": {
        "color": 7,
        "width": 220,
        "height": 276,
        "content": "## \ud83d\udce4 Output Channels\n\nDisable unused channels by\nremoving their connections.\n\n- Slack (Rich blocks)\n- Discord (Embeds)\n- Email (HTML)\n- Webhook (JSON)\n- Google Sheets (Log)"
      },
      "typeVersion": 1
    },
    {
      "id": "2cf73591-13be-41b0-bfa0-9ef9500e9d28",
      "name": "Daily Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        512,
        1488
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "85ce1a00-9d66-4722-9ab0-57b632471a56",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        512,
        1680
      ],
      "parameters": {
        "path": "asteroid-alert",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "df605926-e7db-42a1-b1f1-727e35559377",
      "name": "Merge Triggers",
      "type": "n8n-nodes-base.merge",
      "position": [
        736,
        1584
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "f885ba3e-1f30-417f-9e97-17f173ba7422",
      "name": "Get NASA Asteroid Data",
      "type": "n8n-nodes-base.nasa",
      "position": [
        960,
        1584
      ],
      "parameters": {
        "resource": "asteroidNeoFeed",
        "additionalFields": {
          "endDate": "={{ $today.plus(7, 'days').format('YYYY-MM-DD') }}",
          "startDate": "={{ $today.format('YYYY-MM-DD') }}"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8ee7cef6-b6fe-473e-8f48-e037b8c9bb65",
      "name": "Analyze Asteroid Threats",
      "type": "n8n-nodes-base.code",
      "position": [
        1184,
        1584
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst hazardousAsteroids = [];\nlet biggestAsteroid = null;\nlet maxSize = 0;\n\nfor (const item of items) {\n  const asteroid = item.json;\n  const size = asteroid.estimated_diameter?.kilometers?.estimated_diameter_max || 0;\n  const isHazardous = asteroid.is_potentially_hazardous_asteroid;\n  \n  if (isHazardous) {\n    hazardousAsteroids.push({\n      name: asteroid.name,\n      id: asteroid.id,\n      size_km: size,\n      size_meters: size * 1000,\n      velocity_kmh: parseFloat(asteroid.close_approach_data?.[0]?.relative_velocity?.kilometers_per_hour || 0),\n      velocity_kms: parseFloat(asteroid.close_approach_data?.[0]?.relative_velocity?.kilometers_per_second || 0),\n      miss_distance_km: parseFloat(asteroid.close_approach_data?.[0]?.miss_distance?.kilometers || 0),\n      miss_distance_lunar: parseFloat(asteroid.close_approach_data?.[0]?.miss_distance?.lunar || 0),\n      close_approach_date: asteroid.close_approach_data?.[0]?.close_approach_date_full,\n      is_potentially_hazardous: true,\n      nasa_url: asteroid.nasa_jpl_url,\n      absolute_magnitude: asteroid.absolute_magnitude_h\n    });\n  }\n  \n  if (size > maxSize) {\n    maxSize = size;\n    biggestAsteroid = {\n      name: asteroid.name,\n      id: asteroid.id,\n      size_km: size,\n      size_meters: size * 1000,\n      velocity_kmh: parseFloat(asteroid.close_approach_data?.[0]?.relative_velocity?.kilometers_per_hour || 0),\n      velocity_kms: parseFloat(asteroid.close_approach_data?.[0]?.relative_velocity?.kilometers_per_second || 0),\n      miss_distance_km: parseFloat(asteroid.close_approach_data?.[0]?.miss_distance?.kilometers || 0),\n      miss_distance_lunar: parseFloat(asteroid.close_approach_data?.[0]?.miss_distance?.lunar || 0),\n      close_approach_date: asteroid.close_approach_data?.[0]?.close_approach_date_full,\n      is_potentially_hazardous: asteroid.is_potentially_hazardous_asteroid,\n      nasa_url: asteroid.nasa_jpl_url,\n      absolute_magnitude: asteroid.absolute_magnitude_h\n    };\n  }\n}\n\nlet alertLevel = 'LOW';\nlet alertColor = '#36a64f';\n\nif (hazardousAsteroids.length > 0) {\n  alertLevel = 'MEDIUM';\n  alertColor = '#FFA500';\n  \n  const veryClose = hazardousAsteroids.filter(a => a.miss_distance_lunar < 10);\n  if (veryClose.length > 0) {\n    alertLevel = 'HIGH';\n    alertColor = '#FF0000';\n  }\n}\n\nreturn [{\n  json: {\n    biggest_asteroid: biggestAsteroid,\n    hazardous_asteroids: hazardousAsteroids,\n    hazardous_count: hazardousAsteroids.length,\n    total_asteroids: items.length,\n    alert_level: alertLevel,\n    alert_color: alertColor,\n    scan_date: new Date().toISOString(),\n    scan_range_days: 7\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "4f83518a-edb2-4470-bdc5-6851b3ee8a57",
      "name": "Check for Hazardous Objects",
      "type": "n8n-nodes-base.if",
      "position": [
        1392,
        1584
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "condition-hazardous",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.hazardous_count }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "268b4c8b-8ac9-4f91-9884-33722ee42665",
      "name": "Configure Regional Search",
      "type": "n8n-nodes-base.code",
      "position": [
        1616,
        1440
      ],
      "parameters": {
        "jsCode": "const data = $input.all()[0].json;\nconst asteroidName = data.hazardous_asteroids[0]?.name || data.biggest_asteroid?.name;\n\nreturn [\n  { json: { ...data, lang: 'en', country: 'us', query_suffix: ' asteroid news threat', search_name: asteroidName } },\n  { json: { ...data, lang: 'ja', country: 'jp', query_suffix: ' \u5c0f\u60d1\u661f \u5371\u967a \u30cb\u30e5\u30fc\u30b9', search_name: asteroidName } },\n  { json: { ...data, lang: 'en', country: 'gb', query_suffix: ' asteroid news ESA', search_name: asteroidName } }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "27c5ff22-d287-4183-a990-917a3346a401",
      "name": "Loop Over Regions",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1840,
        1440
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "5a896df9-7191-48d0-92c0-bdfb65ad31a7",
      "name": "Search Regional News",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        2064,
        1536
      ],
      "parameters": {
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "nFJndFXA5zjCTuudP",
          "cachedResultUrl": "https://console.apify.com/actors/nFJndFXA5zjCTuudP/input",
          "cachedResultName": "Google Search Results Scraper (apify/google-search-scraper)"
        },
        "timeout": {},
        "operation": "Run actor and get dataset",
        "customBody": "={\n  \"queries\": \"{{ $('Loop Over Regions').item.json.search_name }}{{ $('Loop Over Regions').item.json.query_suffix }}\",\n  \"maxPagesPerQuery\": 1,\n  \"resultsPerPage\": 5\n}",
        "actorSource": "store",
        "authentication": "apifyOAuth2Api"
      },
      "typeVersion": 1
    },
    {
      "id": "589825a8-ff44-45fc-b10a-8888a65d3b31",
      "name": "Aggregate All News",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2064,
        1296
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "news_results"
      },
      "typeVersion": 1
    },
    {
      "id": "07e9c05b-48d9-4445-9186-9d1ffa1b4bab",
      "name": "AI Fact-Check Analysis",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2224,
        1296
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "responses": {
          "values": [
            {}
          ]
        },
        "builtInTools": {}
      },
      "typeVersion": 2
    },
    {
      "id": "3f3bf281-a2b5-4847-8b04-85da977b3d8a",
      "name": "Parse AI Response",
      "type": "n8n-nodes-base.code",
      "position": [
        2512,
        1296
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nlet text = items[0].json.output?.[0]?.content?.[0]?.text || items[0].json.message?.content || '';\n\nif (!text && items[0].json.text) {\n  text = items[0].json.text;\n}\n\nlet jsonString = text;\nif (text.includes('```')) {\n  const match = text.match(/```(?:json)?\\s*([\\s\\S]*?)```/);\n  if (match) {\n    jsonString = match[1];\n  }\n}\n\ntry {\n  const parsed = JSON.parse(jsonString.trim());\n  return [{ json: parsed }];\n} catch (e) {\n  return [{ json: {\n    threat_score: 0,\n    media_panic_score: 0,\n    fact_check_results: [],\n    regional_comparison: {\n      us_tone: 'unknown',\n      japan_tone: 'unknown', \n      eu_tone: 'unknown',\n      most_accurate_region: 'unknown',\n      analysis: 'Unable to parse AI response'\n    },\n    misinformation_detected: false,\n    misinformation_details: '',\n    official_threat_summary: 'Analysis failed - please check manually',\n    recommendation: 'Manual review required',\n    parse_error: e.message,\n    raw_response: text\n  }}];\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "b1e2046e-cb6a-4bb7-be89-ef176218cede",
      "name": "Generate Visualization Charts",
      "type": "n8n-nodes-base.code",
      "position": [
        2720,
        1296
      ],
      "parameters": {
        "jsCode": "const analysisData = $('Parse AI Response').item.json;\nconst asteroidData = $('Analyze Asteroid Threats').item.json;\n\nconst threatScore = analysisData.threat_score || 0;\nconst panicScore = analysisData.media_panic_score || 0;\n\nconst threatChartConfig = {\n  type: 'gauge',\n  data: {\n    datasets: [{\n      value: threatScore,\n      data: [30, 60, 100],\n      backgroundColor: ['#36a64f', '#FFA500', '#FF0000']\n    }]\n  },\n  options: {\n    title: {\n      display: true,\n      text: 'Actual Threat Level (NASA Data)'\n    }\n  }\n};\n\nconst panicChartConfig = {\n  type: 'gauge',\n  data: {\n    datasets: [{\n      value: panicScore,\n      data: [30, 60, 100],\n      backgroundColor: ['#36a64f', '#FFA500', '#FF0000']\n    }]\n  },\n  options: {\n    title: {\n      display: true,\n      text: 'Media Panic Level'\n    }\n  }\n};\n\nconst toneToNumber = (tone) => {\n  const map = { 'calm': 25, 'cautious': 50, 'alarming': 75, 'sensational': 100 };\n  return map[tone] || 0;\n};\n\nconst regionalChartConfig = {\n  type: 'bar',\n  data: {\n    labels: ['US', 'Japan', 'EU'],\n    datasets: [{\n      label: 'Sensationalism Level',\n      data: [\n        toneToNumber(analysisData.regional_comparison?.us_tone),\n        toneToNumber(analysisData.regional_comparison?.japan_tone),\n        toneToNumber(analysisData.regional_comparison?.eu_tone)\n      ],\n      backgroundColor: ['#4285F4', '#EA4335', '#34A853']\n    }]\n  },\n  options: {\n    scales: { y: { max: 100, min: 0 } },\n    title: { display: true, text: 'Regional Media Tone Comparison' }\n  }\n};\n\nconst threatChartUrl = 'https://quickchart.io/chart?c=' + encodeURIComponent(JSON.stringify(threatChartConfig));\nconst panicChartUrl = 'https://quickchart.io/chart?c=' + encodeURIComponent(JSON.stringify(panicChartConfig));\nconst regionalChartUrl = 'https://quickchart.io/chart?c=' + encodeURIComponent(JSON.stringify(regionalChartConfig));\n\nreturn [{ \n  json: { \n    threat_chart_url: threatChartUrl,\n    panic_chart_url: panicChartUrl,\n    regional_chart_url: regionalChartUrl,\n    threat_score: threatScore,\n    panic_score: panicScore,\n    analysis: analysisData,\n    asteroid_data: asteroidData\n  } \n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "a9a23e8a-9e4d-417c-96d0-97047c225ed2",
      "name": "Format Multi-Channel Messages",
      "type": "n8n-nodes-base.code",
      "position": [
        2944,
        1296
      ],
      "parameters": {
        "jsCode": "const data = $input.all()[0].json;\nconst analysis = data.analysis;\nconst asteroidData = data.asteroid_data;\n\nlet factCheckText = '';\nif (analysis.fact_check_results && analysis.fact_check_results.length > 0) {\n  factCheckText = analysis.fact_check_results.map((fc, i) => \n    `${i+1}. \"${fc.claim}\"\\n   Verdict: ${fc.verdict}\\n   NASA Data: ${fc.nasa_data}`\n  ).join('\\n\\n');\n} else {\n  factCheckText = 'No specific claims to fact-check';\n}\n\nconst alertEmoji = asteroidData.alert_level === 'HIGH' ? '\ud83d\udea8' : \n                   asteroidData.alert_level === 'MEDIUM' ? '\u26a0\ufe0f' : '\u2705';\n\nconst misinfoWarning = analysis.misinformation_detected ? \n  `\\n\\n\ud83d\udeab *MISINFORMATION ALERT*: ${analysis.misinformation_details}` : '';\n\nconst slackMessage = `${alertEmoji} *ASTEROID ALERT REPORT*\\n` +\n  `\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\\n\\n` +\n  `*\ud83d\udcca Threat Assessment*\\n` +\n  `\u2022 Alert Level: ${asteroidData.alert_level}\\n` +\n  `\u2022 Actual Threat Score: ${data.threat_score}/100\\n` +\n  `\u2022 Media Panic Score: ${data.panic_score}/100\\n` +\n  `\u2022 Hazardous Asteroids Detected: ${asteroidData.hazardous_count}\\n\\n` +\n  `*\ud83c\udf0d Regional Media Analysis*\\n` +\n  `\u2022 US Coverage: ${analysis.regional_comparison?.us_tone || 'N/A'}\\n` +\n  `\u2022 Japan Coverage: ${analysis.regional_comparison?.japan_tone || 'N/A'}\\n` +\n  `\u2022 EU Coverage: ${analysis.regional_comparison?.eu_tone || 'N/A'}\\n` +\n  `\u2022 Most Accurate: ${analysis.regional_comparison?.most_accurate_region || 'N/A'}\\n\\n` +\n  `*\u2705 Fact-Check Results*\\n${factCheckText}\\n\\n` +\n  `*\ud83d\udcdd Official Summary*\\n${analysis.official_threat_summary || 'No summary available'}\\n\\n` +\n  `*\ud83d\udca1 Recommendation*\\n${analysis.recommendation || 'No specific action needed'}` +\n  misinfoWarning;\n\nconst discordMessage = slackMessage.replace(/\\*/g, '**');\n\nconst emailSubject = `${alertEmoji} Asteroid Alert: ${asteroidData.alert_level} - ${asteroidData.hazardous_count} Hazardous Object(s) Detected`;\n\nconst emailHtml = `<html><body style=\"font-family: Arial, sans-serif; max-width: 800px; margin: 0 auto;\"><h1 style=\"color: ${asteroidData.alert_color};\">${alertEmoji} Asteroid Alert Report</h1><h2>\ud83d\udcca Threat Assessment</h2><ul><li><strong>Alert Level:</strong> ${asteroidData.alert_level}</li><li><strong>Actual Threat Score:</strong> ${data.threat_score}/100</li><li><strong>Media Panic Score:</strong> ${data.panic_score}/100</li><li><strong>Hazardous Asteroids:</strong> ${asteroidData.hazardous_count}</li></ul><h2>\ud83d\udcc8 Visualization</h2><img src=\"${data.threat_chart_url}\" alt=\"Threat Level\" style=\"max-width: 400px;\"/><img src=\"${data.panic_chart_url}\" alt=\"Media Panic\" style=\"max-width: 400px;\"/><img src=\"${data.regional_chart_url}\" alt=\"Regional Comparison\" style=\"max-width: 400px;\"/><h2>\ud83c\udf0d Regional Media Analysis</h2><ul><li><strong>US:</strong> ${analysis.regional_comparison?.us_tone || 'N/A'}</li><li><strong>Japan:</strong> ${analysis.regional_comparison?.japan_tone || 'N/A'}</li><li><strong>EU:</strong> ${analysis.regional_comparison?.eu_tone || 'N/A'}</li><li><strong>Most Accurate:</strong> ${analysis.regional_comparison?.most_accurate_region || 'N/A'}</li></ul><h2>\u2705 Fact-Check Results</h2><pre style=\"background: #f5f5f5; padding: 15px; border-radius: 5px;\">${factCheckText}</pre><h2>\ud83d\udcdd Official Summary</h2><p>${analysis.official_threat_summary || 'No summary available'}</p><h2>\ud83d\udca1 Recommendation</h2><p>${analysis.recommendation || 'No specific action needed'}</p>${analysis.misinformation_detected ? `<h2 style=\"color: red;\">\ud83d\udeab MISINFORMATION ALERT</h2><p>${analysis.misinformation_details}</p>` : ''}<hr/><p style=\"color: #666; font-size: 12px;\">Generated by Asteroid Alert System | Data Source: NASA NeoWs API</p></body></html>`;\n\nreturn [{ \n  json: { \n    ...data,\n    slack_message: slackMessage,\n    discord_message: discordMessage,\n    email_subject: emailSubject,\n    email_html: emailHtml,\n    alert_emoji: alertEmoji\n  } \n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "1847ddc7-4dca-4768-ad82-f98984b6f67c",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        3264,
        992
      ],
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_SLACK_CHANNEL_ID"
        },
        "attachments": [
          {
            "text": "={{ $json.slack_message }}",
            "color": "={{ $json.asteroid_data.alert_color }}",
            "title": "={{ $json.alert_emoji }} Asteroid Alert Report",
            "image_url": "={{ $json.threat_chart_url }}"
          }
        ],
        "messageType": "attachment",
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "id": "3619815a-4b82-4131-934b-30d36d840851",
      "name": "Send Discord Alert",
      "type": "n8n-nodes-base.discord",
      "position": [
        3264,
        1184
      ],
      "parameters": {
        "content": "={{ $json.discord_message }}",
        "options": {},
        "authentication": "webhook"
      },
      "typeVersion": 2
    },
    {
      "id": "e1cba41d-2d63-4a80-9540-6977424516ec",
      "name": "Send Email Alert",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        3264,
        1392
      ],
      "parameters": {
        "html": "={{ $json.email_html }}",
        "options": {},
        "subject": "={{ $json.email_subject }}",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com"
      },
      "typeVersion": 2.1
    },
    {
      "id": "2e9c2a6a-b474-4c39-a215-a9eafb156ba7",
      "name": "Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3264,
        1584
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ success: true, alert_level: $('Analyze Asteroid Threats').item.json.alert_level, hazardous_count: $('Analyze Asteroid Threats').item.json.hazardous_count, threat_score: $('Parse AI Response').item.json.threat_score, message: 'Alert processed successfully' }) }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "d5716068-c397-4730-9f48-46f7342d6676",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3264,
        1792
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $now.format('YYYY-MM-DD HH:mm:ss') }}",
            "Alert Level": "={{ $('Analyze Asteroid Threats').item.json.alert_level }}",
            "Threat Score": "={{ $('Parse AI Response').item.json.threat_score }}",
            "Top Asteroid": "={{ $('Analyze Asteroid Threats').item.json.biggest_asteroid?.name }}",
            "Hazardous Count": "={{ $('Analyze Asteroid Threats').item.json.hazardous_count }}",
            "Media Panic Score": "={{ $('Parse AI Response').item.json.media_panic_score }}",
            "Most Accurate Region": "={{ $('Parse AI Response').item.json.regional_comparison?.most_accurate_region }}",
            "Misinformation Detected": "={{ $('Parse AI Response').item.json.misinformation_detected }}"
          },
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": []
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Asteroid Alerts Log"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_GOOGLE_SHEET_ID"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "0a4d533a-cb47-42a4-9a00-228bcc27fdcf",
      "name": "Create All-Clear Status",
      "type": "n8n-nodes-base.code",
      "position": [
        1616,
        1728
      ],
      "parameters": {
        "jsCode": "const data = $input.all()[0].json;\n\nreturn [{ \n  json: {\n    status: 'ALL_CLEAR',\n    message: `\u2705 No potentially hazardous asteroids detected in the next ${data.scan_range_days} days.`,\n    total_asteroids_scanned: data.total_asteroids,\n    biggest_asteroid: data.biggest_asteroid,\n    scan_date: data.scan_date\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "445dd71c-0e74-4033-996b-18019ec57076",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        1280
      ],
      "parameters": {
        "width": 500,
        "height": 804,
        "content": "## \ud83d\ude80 Real-time Asteroid Alert System with AI Fact-Check\n\n### What This Workflow Does\nThis workflow monitors NASA's Near Earth Object database for potentially hazardous asteroids, searches news coverage across US, Japan, and EU regions, performs AI-powered fact-checking against official NASA data, and sends multi-channel alerts with visualization.\n\n### Key Features\n- \ud83d\udd0d **7-day asteroid forecast** from NASA NeoWs API\n- \ud83c\udf0d **Cross-regional media comparison** (US vs Japan vs EU)\n- \u2705 **AI fact-checking** against NASA ground truth data\n- \ud83d\udcca **Dual scoring** (Actual Threat vs Media Panic)\n- \ud83d\udeab **Misinformation detection** and alerting\n- \ud83d\udcc8 **Visual charts** (threat gauge, panic gauge, regional comparison)\n- \ud83d\udd14 **Multi-channel notifications** (Slack, Discord, Email)\n- \ud83d\udcdd **Historical logging** to Google Sheets\n\n### Who Is This For?\n- Space enthusiasts and educators\n- Science journalists and fact-checkers\n- Researchers studying media coverage\n- Anyone interested in planetary defense\n\n### Requirements\n- NASA API Key (free at api.nasa.gov)\n- Apify account (for news scraping)\n- OpenAI API key\n- Slack/Discord/Email credentials (choose what you need)\n- Google Sheets (optional, for logging)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ef8d4116-2a84-49a5-a702-9fedb14dad65",
  "connections": {
    "Daily Schedule": {
      "main": [
        [
          {
            "node": "Merge Triggers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Triggers": {
      "main": [
        [
          {
            "node": "Get NASA Asteroid Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Merge Triggers",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Loop Over Regions": {
      "main": [
        [
          {
            "node": "Aggregate All News",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search Regional News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Response": {
      "main": [
        [
          {
            "node": "Generate Visualization Charts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All News": {
      "main": [
        [
          {
            "node": "AI Fact-Check Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Regional News": {
      "main": [
        [
          {
            "node": "Loop Over Regions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Fact-Check Analysis": {
      "main": [
        [
          {
            "node": "Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get NASA Asteroid Data": {
      "main": [
        [
          {
            "node": "Analyze Asteroid Threats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Asteroid Threats": {
      "main": [
        [
          {
            "node": "Check for Hazardous Objects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Regional Search": {
      "main": [
        [
          {
            "node": "Loop Over Regions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Hazardous Objects": {
      "main": [
        [
          {
            "node": "Configure Regional Search",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create All-Clear Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Multi-Channel Messages": {
      "main": [
        [
          {
            "node": "Send Slack Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Discord Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Email Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Visualization Charts": {
      "main": [
        [
          {
            "node": "Format Multi-Channel Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow is designed for space enthusiasts, science educators, journalists, fact-checkers, and researchers who want to stay informed about near-Earth asteroid threats while filtering out media sensationalism. It's also valuable for anyone studying how different regions…

Source: https://n8n.io/workflows/11289/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

Enhance financial oversight with this automated n8n workflow. Triggered every 5 minutes, it fetches real-time bank transactions via an API, enriches and transforms the data, and applies smart logic to

HTTP Request, Email Send, Google Sheets +1
Slack & Telegram

This workflow automates competitive price intelligence using Bright Data's enterprise web scraping API. On a scheduled basis (default: daily at 9 AM), the system loops through configured competitor pr

HTTP Request, Google Sheets, Slack +1
Slack & Telegram

SEO managers, content marketers, bloggers, and growth teams who want to automatically catch declining content performance before it's too late — without manually checking Google Search Console every w

HTTP Request, Google Sheets, Slack +1
Slack & Telegram

Automate tax deadline monitoring with AI-powered insights. This workflow checks your tax calendar daily at 8 AM, uses GPT-4 to analyze upcoming deadlines across multiple jurisdictions, detects overdue

Google Sheets, HTTP Request, Email Send +1
Slack & Telegram

This automated n8n workflow monitors real-time cryptocurrency prices using CoinGecko API and sends smart alerts when price conditions are met. It supports multi-coin tracking, dynamic conditions, and

Google Sheets, HTTP Request, Email Send +2