n8n workflow of the week · Episode 2 of 21 · spectacular
This workflow has no serious purpose, but it shows nicely what automation can do: query a public API, a bit of maths in a Code node and a message at the right moment. When the ISS comes closer than 1,500 km, your phone buzzes, with a link to the map.
How it works
- Every 5 minutes: starts every five minutes; in that time the ISS covers about 2,300 km.
- Where is the ISS?: asks wheretheiss.at for the ISS latitude, longitude, altitude and speed (free, no key).
- Close to me?: works out the distance to your town with the haversine formula. A small memory makes sure you get only one message per pass.
- Push to phone: sends title and text to ntfy.sh; the app shows them as a push notification.
What it is good for
For the curious, for kids and for anyone who wants to see the ISS with the naked eye once: it is visible at dusk or dawn, when it is still in sunlight and it is already dark where you are. The message tells you whether it is lit right now.
Make it yours
Town and radius are at the top of the Code node. If you only want visible passes, add the condition iss.visibility === 'daylight' and check that the sun has set where you are (see episode 15). 25544 is the ISS; other satellites have other numbers.
Import it in two minutes
- Download the workflow: week-02.json.
- In n8n, top right “…” → “Import from File”.
- In every push node replace
your-secret-topicwith your own hard-to-guess topic and subscribe to it in the ntfy app (free, no account). - Adjust the values marked with a comment in the Code node, press “Execute workflow” once, then activate it.
New to n8n? The basics are in n8n introduced.
All episodes of the series →
Start an n8n workflow live with one click →