{
  "name": "Real-time ISS overhead alert with weather check and multi-channel notifications",
  "nodes": [
    {
      "id": "f3d745a2-edd3-4d86-bcfc-ff772f0dd9bd",
      "name": "Real-time Check (5 min)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -5472,
        944
      ]
    },
    {
      "id": "7a27519a-2676-4215-8589-769cbd2e05ef",
      "name": "Daily Predictions (6 AM)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -5472,
        1744
      ]
    },
    {
      "id": "74b0a74f-17eb-4363-a7e8-4dbfc2b8a7f9",
      "name": "Weekly Report (Sunday 8 PM)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -5472,
        2368
      ]
    },
    {
      "id": "6d10a256-3f6f-4a9d-97ba-e4b9b0f28e77",
      "name": "Get ISS Detailed (N2YO)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4992,
        944
      ]
    },
    {
      "id": "e80a14fe-57ba-4eab-ac37-2b5d0197c80d",
      "name": "Get Tiangong Position",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4992,
        1104
      ]
    },
    {
      "id": "46f850f4-73b6-455f-84f9-53f6486742b4",
      "name": "Calculate All Satellites",
      "type": "n8n-nodes-base.code",
      "position": [
        -4752,
        1024
      ]
    },
    {
      "id": "783657de-3858-42d0-a672-a4f29c5b2ff6",
      "name": "Any Satellite Nearby?",
      "type": "n8n-nodes-base.if",
      "position": [
        -4512,
        1024
      ]
    },
    {
      "id": "ea6d90bf-85c8-4648-a296-70132d3ab964",
      "name": "Get Weather Conditions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4272,
        944
      ]
    },
    {
      "id": "cb5579d6-8260-4904-91b1-8b51d5d61fe4",
      "name": "Get Astronauts in Space",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4272,
        1104
      ]
    },
    {
      "id": "e21082fe-9638-468a-a2cb-79aa59982e84",
      "name": "Observable Conditions?",
      "type": "n8n-nodes-base.if",
      "position": [
        -3792,
        1024
      ]
    },
    {
      "id": "4ad898e5-57ae-42ac-bd57-2be23a00c01c",
      "name": "OpenAI Trivia",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -3568,
        1152
      ]
    },
    {
      "id": "7e3a5437-14ef-499f-b25d-3cf7b982a74f",
      "name": "Generate Space Trivia",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -3568,
        1008
      ]
    },
    {
      "id": "c527ccdc-16f6-44c2-8c71-36f276fdb27c",
      "name": "Format Rich Notification",
      "type": "n8n-nodes-base.code",
      "position": [
        -3200,
        1008
      ]
    },
    {
      "id": "b2df9e60-6761-49f5-b3a0-0e08c8eb51c9",
      "name": "Log to History",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2912,
        1008
      ]
    },
    {
      "id": "f68e0852-c8ac-4c14-8bb4-1c66a8809270",
      "name": "Get ISS Pass Predictions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -5248,
        1744
      ]
    },
    {
      "id": "af1c999e-c16d-4f78-9f54-79755fab653e",
      "name": "Get Tiangong Predictions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -5248,
        1904
      ]
    },
    {
      "id": "c5ec4863-b61b-40b9-8206-11a985a848bc",
      "name": "Process All Predictions",
      "type": "n8n-nodes-base.code",
      "position": [
        -5008,
        1824
      ]
    },
    {
      "id": "37df7e2d-dc81-4129-9494-64929a25b4a1",
      "name": "Format Prediction Report",
      "type": "n8n-nodes-base.code",
      "position": [
        -4768,
        1824
      ]
    },
    {
      "id": "89e0d973-1b17-40b2-994b-8b54bd0236a6",
      "name": "Send Predictions to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -4528,
        1744
      ]
    },
    {
      "id": "3db268d7-162f-4917-a77f-6528f3616b8a",
      "name": "Send Predictions to Discord",
      "type": "n8n-nodes-base.discord",
      "position": [
        -4528,
        1904
      ]
    },
    {
      "id": "52dc4e6e-b24f-4ea0-b021-cd8a5c4c072d",
      "name": "Loop Calendar Events",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -4288,
        1824
      ]
    },
    {
      "id": "99a045a7-686c-4483-9b32-b476c0d817e5",
      "name": "Add to Google Calendar",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -4032,
        1808
      ]
    },
    {
      "id": "b8a703ad-2c5f-4ddd-b964-e211a8aec47c",
      "name": "Get History Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -5232,
        2368
      ]
    },
    {
      "id": "55d4f0c8-1e48-4364-b554-f66bb678e8b5",
      "name": "Calculate Weekly Statistics",
      "type": "n8n-nodes-base.code",
      "position": [
        -4992,
        2368
      ]
    },
    {
      "id": "d434026e-677f-4e60-a804-645a578a0872",
      "name": "OpenAI Report",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -4688,
        2544
      ]
    },
    {
      "id": "1d32083b-1a46-47c1-82c4-8662f5d9c0fd",
      "name": "Generate Weekly Report",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -4688,
        2368
      ]
    },
    {
      "id": "d2ea8685-8f71-464e-be67-39721ab1cfbc",
      "name": "Format Weekly Report",
      "type": "n8n-nodes-base.code",
      "position": [
        -4272,
        2368
      ]
    },
    {
      "id": "aa4dfcdb-55f8-4080-87a3-e8a213b60d23",
      "name": "Send Weekly to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -4032,
        2288
      ]
    },
    {
      "id": "adadbd20-23b0-4af3-998e-866dbccbb11d",
      "name": "Send Weekly to Discord",
      "type": "n8n-nodes-base.discord",
      "position": [
        -4032,
        2448
      ]
    },
    {
      "id": "e9899310-c455-42cb-9184-f59ec3897735",
      "name": "Real-time Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5536,
        640
      ],
      "parameters": {
        "width": 3128,
        "height": 848,
        "content": "### 🔄 Real-time Tracking Flow\nEvery 5 minutes: Check satellite positions → Weather check → AI trivia → Log & Notify"
      }
    },
    {
      "id": "d6e8ba35-50d7-457e-bc9a-0ab7d973dfb3",
      "name": "Prediction Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5536,
        1488
      ],
      "parameters": {
        "width": 1784,
        "height": 608,
        "content": "### 🔮 Daily Predictions Flow\nEvery morning at 6 AM: Fetch 7-day predictions → Format report → Add to Google Calendar"
      }
    },
    {
      "id": "2757afc4-5dcf-4abe-8e12-299cf5aa3d86",
      "name": "Weekly Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5536,
        2096
      ],
      "parameters": {
        "width": 1752,
        "height": 560,
        "content": "### 📊 Weekly Analytics Flow\nEvery Sunday: Aggregate history data → AI analysis → Generate insights report"
      }
    },
    {
      "id": "3d4ca261-1ee8-40ef-a21a-0023663dc39b",
      "name": "Get ISS Position1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -5232,
        944
      ]
    },
    {
      "id": "fb5ec1f9-c4af-4f49-aa3d-33c1412a5859",
      "name": "Analyze Observation Conditions1",
      "type": "n8n-nodes-base.code",
      "position": [
        -4032,
        1024
      ]
    },
    {
      "id": "c4758a00-7bc8-43b0-a2c2-906217a806ad",
      "name": "Send to Discord2",
      "type": "n8n-nodes-base.discord",
      "position": [
        -2688,
        1008
      ]
    },
    {
      "id": "bc84d059-9b7c-4352-ab05-c510336014d6",
      "name": "Send to Telegram3",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2688,
        1168
      ]
    },
    {
      "id": "3513c339-c26c-4c89-9642-1268911f0ffe",
      "name": "Send to Slack1",
      "type": "n8n-nodes-base.slack",
      "position": [
        -2688,
        1328
      ]
    },
    {
      "id": "3ad6d550-a78e-428b-af2c-017d7a88f325",
      "name": "Workflow Description1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6080,
        640
      ],
      "parameters": {
        "width": 520,
        "height": 860,
        "content": "## 🛰️ Space Station Intelligence Hub\n### Advanced Satellite Tracker with Predictions & Analytics\n\n**What this workflow does:**\nTracks the International Space Station and Chinese Tiangong station in re"
      }
    },
    {
      "id": "79b04fd4-a4ce-4964-bd61-3fce668e6584",
      "name": "Step 1 - Fetch Positions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5488,
        800
      ],
      "parameters": {
        "width": 280,
        "height": 128,
        "content": "**Step 1: Fetch Satellite Positions**\nGet current positions from:\n- Open Notify API (ISS basic)\n- N2YO API (ISS detailed + Tiangong)"
      }
    },
    {
      "id": "f674db6d-71e1-4bcb-9de2-bb8aa843118e",
      "name": "Step 2 - Calculate",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4848,
        816
      ],
      "parameters": {
        "width": 260,
        "height": null,
        "content": "**Step 2: Calculate Distance & Direction**\nUsing Haversine formula to compute:\n- Distance from user location\n- Compass bearing (N/NE/E...)\n- Elevation angle"
      }
    },
    {
      "id": "a80edf3f-991e-4bcf-98f5-f6bf931f3c14",
      "name": "Step 3 - Filter Nearby",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4544,
        816
      ],
      "parameters": {
        "width": 220,
        "height": 100,
        "content": "**Step 3: Check Proximity**\nFilter satellites within visibility radius (default 800km)"
      }
    },
    {
      "id": "13387e14-ac1d-4436-a3ec-9c1c52817e9d",
      "name": "Step 4 - Context",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4304,
        816
      ],
      "parameters": {
        "width": 220,
        "height": 124,
        "content": "**Step 4: Get Context Data**\n- Weather conditions (OpenWeatherMap)\n- Current astronauts in space"
      }
    },
    {
      "id": "21842888-97e3-40ac-8d21-3bd4182855f1",
      "name": "Step 5 - Score",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4000,
        816
      ],
      "parameters": {
        "width": null,
        "height": 140,
        "content": "**Step 5: Score Observation Conditions**\nCalculate 0-100 score based on:\n- Weather (clouds, rain)\n- Time of day (twilight = best)\n- Generate camera settings"
      }
    },
    {
      "id": "4dc59d0f-b40e-4ae0-a42f-7542f83ce7d4",
      "name": "Step 6 - AI Trivia",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3568,
        816
      ],
      "parameters": {
        "width": null,
        "height": 100,
        "content": "**Step 6: Generate AI Trivia**\nOpenAI generates fun space facts in Japanese based on current context"
      }
    },
    {
      "id": "0d04e8c6-4975-4770-90e6-eb7bcbf03ca3",
      "name": "Step 7 - Format",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3264,
        784
      ],
      "parameters": {
        "width": 220,
        "height": 208,
        "content": "**Step 7: Format Notification**\nBuild rich message with:\n- Satellite details\n- Observation score\n- Camera tips\n- Astronaut list\n- Space trivia"
      }
    },
    {
      "id": "50dacd3f-e069-447c-accd-59c6610f017f",
      "name": "Step 8 - Log & Send",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2992,
        864
      ],
      "parameters": {
        "width": 220,
        "height": 116,
        "content": "**Step 8: Log & Notify**\n- Save to Google Sheets\n- Send to Discord/Telegram/Slack"
      }
    },
    {
      "id": "d91ea33a-76dc-4d0f-bd90-d59b03383cd1",
      "name": "Step 1 - Fetch Predictions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5504,
        1600
      ],
      "parameters": {
        "width": null,
        "height": 140,
        "content": "**Step 1: Fetch 7-Day Predictions**\nN2YO visual passes API for:\n- ISS (NORAD 25544)\n- Tiangong (NORAD 48274)"
      }
    },
    {
      "id": "39c90a07-f964-4c99-9ec9-6218b932f5c6",
      "name": "Step 2 - Process",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5104,
        1616
      ],
      "parameters": {
        "width": null,
        "height": 172,
        "content": "**Step 2: Process & Rank Passes**\n- Combine ISS + Tiangong passes\n- Sort by time\n- Find best passes (elevation ≥40°)"
      }
    },
    {
      "id": "6934c72f-9881-4b0e-8ef7-034c8ff4a225",
      "name": "Step 3 - Format Report",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4816,
        1616
      ],
      "parameters": {
        "width": null,
        "height": 172,
        "content": "**Step 3: Format Report**\nCreate Japanese report with:\n- Top observation opportunities\n- Full 7-day schedule\n- Viewing tips"
      }
    },
    {
      "id": "666c7056-530b-47bf-8c44-ee96a4710261",
      "name": "Step 4 - Notify",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4544,
        1616
      ],
      "parameters": {
        "width": 200,
        "height": 116,
        "content": "**Step 4: Notify Users**\nSend prediction report to:\n- Telegram\n- Discord"
      }
    },
    {
      "id": "1e037aed-e7ce-4eae-8b41-1fe8ace8e120",
      "name": "Step 5 - Calendar",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4176,
        1616
      ],
      "parameters": {
        "width": null,
        "height": 100,
        "content": "**Step 5: Add to Calendar**\nLoop through best passes and create Google Calendar events"
      }
    },
    {
      "id": "a703fc5e-1188-4030-9ab6-e036671aac5c",
      "name": "Step 1 - Load History",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5264,
        2240
      ],
      "parameters": {
        "width": 220,
        "height": 116,
        "content": "**Step 1: Load History Data**\nFetch all sighting records from Google Sheets"
      }
    },
    {
      "id": "ce93ac1a-148e-4a87-b768-a6dd9c2c7a16",
      "name": "Step 2 - Stats",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5024,
        2240
      ],
      "parameters": {
        "width": null,
        "height": 104,
        "content": "**Step 2: Calculate Statistics**\n- Total/observable sightings\n- Success rate\n- Breakdown by satellite, direction, weather"
      }
    },
    {
      "id": "f13aa8da-5fd8-47a4-9972-2026d2cffc53",
      "name": "Step 3 - AI Analysis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4720,
        2192
      ],
      "parameters": {
        "width": null,
        "height": 156,
        "content": "**Step 3: AI Analysis**\nGPT-4 generates insights:\n- Weekly highlights\n- Success rate analysis\n- Next week outlook\n- Observer tips"
      }
    },
    {
      "id": "b95009f7-5a81-48b7-8fbe-e67414a035ab",
      "name": "Step 4 - Send Report",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4352,
        2240
      ],
      "parameters": {
        "width": null,
        "height": 100,
        "content": "**Step 4: Format & Send Report**\nCombine stats + AI analysis into final report, send to channels"
      }
    }
  ],
  "connections": {
    "OpenAI Report": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Weekly Report",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Trivia": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Space Trivia",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Log to History": {
      "main": [
        [
          {
            "node": "Send to Discord2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send to Telegram3",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send to Slack1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get History Data": {
      "main": [
        [
          {
            "node": "Calculate Weekly Statistics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get ISS Position1": {
      "main": [
        [
          {
            "node": "Get ISS Detailed (N2YO)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Tiangong Position",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Weekly Report": {
      "main": [
        [
          {
            "node": "Send Weekly to Telegram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Weekly to Discord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Calendar Events": {
      "main": [
        [
          {
            "node": "Add to Google Calendar",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Any Satellite Nearby?": {
      "main": [
        [
          {
            "node": "Get Weather Conditions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Astronauts in Space",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Space Trivia": {
      "main": [
        [
          {
            "node": "Format Rich Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Tiangong Position": {
      "main": [
        [
          {
            "node": "Calculate All Satellites",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add to Google Calendar": {
      "main": [
        [
          {
            "node": "Loop Calendar Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Weekly Report": {
      "main": [
        [
          {
            "node": "Format Weekly Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Weather Conditions": {
      "main": [
        [
          {
            "node": "Analyze Observation Conditions1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Observable Conditions?": {
      "main": [
        [
          {
            "node": "Generate Space Trivia",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Astronauts in Space": {
      "main": [
        [
          {
            "node": "Analyze Observation Conditions1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get ISS Detailed (N2YO)": {
      "main": [
        [
          {
            "node": "Calculate All Satellites",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process All Predictions": {
      "main": [
        [
          {
            "node": "Format Prediction Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Real-time Check (5 min)": {
      "main": [
        [
          {
            "node": "Get ISS Position1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate All Satellites": {
      "main": [
        [
          {
            "node": "Any Satellite Nearby?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Predictions (6 AM)": {
      "main": [
        [
          {
            "node": "Get ISS Pass Predictions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Tiangong Predictions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Prediction Report": {
      "main": [
        [
          {
            "node": "Send Predictions to Telegram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Predictions to Discord",
            "type": "main",
            "index": 0
          },
          {
            "node": "Loop Calendar Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Rich Notification": {
      "main": [
        [
          {
            "node": "Log to History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get ISS Pass Predictions": {
      "main": [
        [
          {
            "node": "Process All Predictions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Tiangong Predictions": {
      "main": [
        [
          {
            "node": "Process All Predictions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Weekly Statistics": {
      "main": [
        [
          {
            "node": "Generate Weekly Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Report (Sunday 8 PM)": {
      "main": [
        [
          {
            "node": "Get History Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Observation Conditions1": {
      "main": [
        [
          {
            "node": "Observable Conditions?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}