Show NASA APOD and nearest asteroid data in Home Assistant dashboards
Ready for 3.0What this workflow does
This workflow has 9 nodes and runs on a schedule (every day at 06:00) (plus 1 other trigger). Along the way it connects Home Assistant. It also calls science.nasa.gov and api.nasa.gov over HTTP.
How it runs
Trigger: On a schedule (every day at 06:00) (plus 1 other trigger).
- Fetch NASA APOD Data (HTTP Request): calls science.nasa.gov (GET)
- Fetch Asteroid Feed (HTTP Request): calls api.nasa.gov
- Set APOD Fields (Edit Fields (Set)): sets 5 fields: title, explanation, image_url…
- Set Asteroid Data (Edit Fields (Set)): sets 2 fields: count, raw_objects
- Send APOD to Home Assistant (Home Assistant): create or update (state)
- Find Nearest Asteroid (Code): runs custom JavaScript code
- Send Asteroid to Home Assistant (Home Assistant): create or update (state)
Services it uses
HTTP calls to: science.nasa.gov, api.nasa.gov
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 (6)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Home Assistant
n8n-nodes-base.homeAssistant - Code
n8n-nodes-base.code - Manual Trigger
n8n-nodes-base.manualTrigger
From the author
Quick overview This workflow runs daily and pulls NASA’s Astronomy Picture of the Day plus the closest near‑Earth asteroid from NASA’s NEO feed, then upserts both datasets into Home Assistant as sensors for use in dashboards and automations. How it works 1.…