{
  "name": "Automated asteroid alerts with NASA API, Slack & Google Calendar",
  "nodes": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        224,
        304
      ]
    },
    {
      "id": "note1a2b3c4d-5678-90ab-cdef-1234567890ab",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        16
      ],
      "parameters": {
        "width": 300,
        "height": 264,
        "content": "## NASA Asteroid Alert Workflow\n\nThis workflow automatically checks for near-Earth asteroids twice daily using NASA's API and sends alerts to Slack and Google Calendar.\n\n**Process:**\n1. Runs on a 12-h"
      }
    },
    {
      "id": "b2c3d4e5-f678-90ab-cdef-234567890abc",
      "name": "Calculate Date Range",
      "type": "n8n-nodes-base.code",
      "position": [
        464,
        304
      ]
    },
    {
      "id": "note2b3c4d5e-6789-0abc-def1-234567890abc",
      "name": "API Key Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        16
      ],
      "parameters": {
        "width": 280,
        "height": 260,
        "content": "## ⚙️ NASA API Configuration\n\n**Action Required:** Replace the default `DEMO_KEY` with your own NASA API key in the 'Get an asteroid neo feed' node.\n\n1. **Get a free key at:** [api.nasa.gov](https://a"
      }
    },
    {
      "id": "d4e5f678-90ab-cdef-1234-567890abcdef",
      "name": "Filter and Process Asteroids",
      "type": "n8n-nodes-base.code",
      "position": [
        992,
        304
      ]
    },
    {
      "id": "note3c4d5e6f-7890-abcd-ef12-34567890abcd",
      "name": "Filter Settings",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -16
      ],
      "parameters": {
        "width": 280,
        "height": 280,
        "content": "## ⚙️ Filtering Criteria\n\nThis node filters asteroids to find only significant ones. **You should adjust these values.**\n\n**Default (Test) Values:**\n- `MAX_DISTANCE_KM = 75000000000` (very far)\n- `MIN"
      }
    },
    {
      "id": "e5f67890-abcd-ef12-3456-7890abcdef12",
      "name": "Check If Asteroids Found",
      "type": "n8n-nodes-base.if",
      "position": [
        1376,
        304
      ]
    },
    {
      "id": "f6789012-3456-7890-abcd-ef1234567890",
      "name": "Format Alert Messages",
      "type": "n8n-nodes-base.code",
      "position": [
        1648,
        192
      ]
    },
    {
      "id": "78901234-5678-90ab-cdef-123456789012",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1840,
        64
      ]
    },
    {
      "id": "note4d5e6f78-90ab-cdef-1234-567890abcdef",
      "name": "Slack Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1504,
        -80
      ],
      "parameters": {
        "width": 280,
        "height": 244,
        "content": "## ⚙️ Slack Configuration\n\n**Setup Required:**\n1. Select the 'Send Slack Alert' node.\n2. Add your Slack OAuth2 credentials.\n3. Choose the channel for alerts (e.g., `#asteroid-alerts`).\n\nEnsure the n8n"
      }
    },
    {
      "id": "90123456-7890-abcd-ef12-345678901234",
      "name": "Split Out Individual Asteroids",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1840,
        304
      ]
    },
    {
      "id": "note6f78901a-bcde-f123-4567-890abcdef123",
      "name": "Calendar Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        512
      ],
      "parameters": {
        "width": 280,
        "height": 264,
        "content": "## ⚙️ Google Calendar Setup\n\nThis branch creates a calendar event for *each* asteroid found.\n\n**Setup Required:**\n1. Select the 'Create an event' node.\n2. Add your Google Calendar OAuth2 credentials.\n"
      }
    },
    {
      "id": "note7890abcd-ef12-3456-7890-abcdef123456",
      "name": "No Results Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        480
      ],
      "parameters": {
        "width": 280,
        "height": 224,
        "content": "## No Asteroids Branch\n\nThis is the 'false' branch of the IF node. It's triggered when no asteroids meet the filtering criteria.\n\nThe **NoOp** node does nothing, ending the workflow silently.\n\n**Idea:"
      }
    },
    {
      "id": "8da8e937-6acf-43d7-8a7e-43635b7abfde",
      "name": "Get an asteroid neo feed",
      "type": "n8n-nodes-base.nasa",
      "position": [
        720,
        304
      ]
    },
    {
      "id": "9c7340e9-6b56-4888-8180-373942e5d1d7",
      "name": "Create an event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        2064,
        304
      ]
    },
    {
      "id": "89d59b68-b6a1-43c3-8968-c6710a561032",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1616,
        400
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Calculate Date Range",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Date Range": {
      "main": [
        [
          {
            "node": "Get an asteroid neo feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Alert Messages": {
      "main": [
        [
          {
            "node": "Send Slack Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out Individual Asteroids",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Asteroids Found": {
      "main": [
        [
          {
            "node": "Format Alert Messages",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get an asteroid neo feed": {
      "main": [
        [
          {
            "node": "Filter and Process Asteroids",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter and Process Asteroids": {
      "main": [
        [
          {
            "node": "Check If Asteroids Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Individual Asteroids": {
      "main": [
        [
          {
            "node": "Create an event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}