Deploy this comprehensive n8n workflow to monitor near-Earth asteroids using the NASA API. Get automatic Slack alerts and Google Calendar events for significant objects, utilizing key n8n node configurations.
Download this n8n workflow template and start using it instantly.
Space Enthusiasts and Researchers: Individuals needing real-time updates on close-approach asteroids.
Technical Users: Users looking for advanced n8n templates that combine data filtering (Code node) with multiple external service integrations.
Automation Developers: Developers who want to study how to handle complex, nested API responses within a single n8n workflow.
Operations Teams: Groups using Slack and Google Calendar for critical alerting and scheduling.
Keeping track of near-Earth objects (NEOs) is crucial for research and potentially for safety. This specialized n8n workflow solves the problem of manually checking the NASA NEO feed by automating the entire process.
This robust n8n workflow runs on a fixed schedule, fetches 14 days of data from the NASA API, and uses custom filtering logic (within an n8n code node) to identify significant objects based on user-defined distance and size thresholds. If an object meets the criteria, the system immediately dispatches a detailed alert via Slack and creates corresponding scheduled events in Google Calendar. This particular n8n template showcases advanced usage of flow control and data transformation within the n8n framework, making it a highly valuable template for complex data ingestion tasks.
This automation starts with a precise schedule, using the n8n trigger to initiate the check twice daily.
Schedule Trigger is the initial n8n trigger, set to run every 12 hours.Code n8n node dynamically calculates the start date (today) and the end date (14 days from now) required for the NASA API request.Get an asteroid neo feed n8n node connects to the NASA API, using the calculated dates to fetch the raw data feed.Filter and Process Asteroids Code n8n node iterates through the highly nested API response. It applies user-defined business logic (miss distance and diameter limits) to select only significant asteroids, cleaning and restructuring the data into easily consumable JSON items. This is a crucial step in this n8n workflow.Check If Asteroids Found IF n8n node verifies if any asteroids met the filtering criteria. If no items are passed, the n8n workflow terminates silently via a NoOp n8n node.Format Alert Messages Code n8n node compiles the data into a single, clean markdown message suitable for Slack, along with a subject line for email/calendar use.Send Slack Alert n8n node immediately posts the detailed, formatted alert message to the designated Slack channel.Split Out Individual Asteroids n8n node takes the aggregated alert data and creates separate items, one for each asteroid, allowing for individual processing.Create an event n8n node then utilizes the approach date of each individual asteroid to schedule a corresponding event in the configured Google Calendar.To deploy this powerful n8n workflow and begin monitoring asteroid feeds, follow these steps:
DEMOKEY with your own API key obtained from api.nasa.gov. Create or update the NASA credential.Filter and Process Asteroids code n8n node. Adjust the MAXDISTANCEKM and MINDIAMETER_METERS variables within the JavaScript code to customize the sensitivity of your alerts.This n8n workflow relies on several specialized n8n nodes:
Schedule Trigger (n8n trigger):
Function: Starts the n8n workflow automatically.
Key Configuration: Runs every 12 hours.
Calculate Date Range (Code n8n node):
Function: Generates startdate and enddate (14 days later) in the required YYYY-MM-DD format for the NASA API.
Key Configuration: Custom JavaScript date calculation.
Get an asteroid neo feed (NASA n8n node):
Function: Fetches Near-Earth Object data from the NASA API.
Key Configuration: Requires a NASA API credential.
Filter and Process Asteroids (Code n8n node):
Function: Flattens the API response, filters asteroids based on distance and diameter thresholds, and sorts the results.
Key Configuration: Contains configurable JavaScript variables (MAXDISTANCEKM, MINDIAMETERMETERS) for alert sensitivity.
Check If Asteroids Found (IF n8n node):
Function: Directs the flow based on whether the filtering step produced any results.
Key Configuration: Condition checks if {{ $items().length }} is greater than 0.
Format Alert Messages (Code n8n node):
Function: Structures the filtered data into a human-readable, markdown-formatted message (for Slack) and an event summary.
Key Configuration: Uses template literals to build detailed strings for each asteroid.
Send Slack Alert (Slack n8n node):
Function: Publishes the formatted alert message to a designated channel.
Key Configuration: Uses OAuth2 authentication; text dynamically pulled from the previous n8n node output.
Split Out Individual Asteroids (Split Out n8n node):
Function: Prepares the data for the calendar node by converting the list of asteroids into individual execution items.
Key Configuration: Splits the asteroids field while retaining global message variables.
Automate medical or professional appointment scheduling using n8n. This powerful n8n workflow integrates a JotForm n8n trigger, Telegram for approval, GPT-4 Mini for personalized email generation, and Google Sheets for record keeping.

Use this comprehensive n8n workflow to automate weekly news research on animal advocacy topics, powered by the Claude AI model and Serper web search. This n8n workflow template generates a detailed HTML email brief.

Use this powerful n8n workflow template to automatically monitor Amazon product stock levels using Bright Data and OpenAI. Receive immediate Gmail alerts via this n8n automation when stock runs low.

Automate attendee segmentation using this advanced n8n workflow. Triggers on Zoom webinar end, fetches participation data, and applies precise tags in KlickTipp (Full, Partial, Absent).

Deploy this powerful n8n workflow to automate B2B lead generation, extract contact data using AI, and send personalized cold emails via Gmail, tracking all activity in Google Sheets.

Automate B2B lead generation using a reliable n8n workflow. Scrape Google Maps data via BrowserAct, process it using a custom n8n node, save leads to Google Sheets, and receive instant Telegram notifications.

Business creator from Tokyo. Designing AI-driven automations that enhance marketing, reporting, and daily operations. I turn complex workflows into simple, elegant automations with n8n.