All challenges

Challenge 17

Northern Lights Tonight?

Get a message only on the evenings when the aurora could reach your city and the sky is clear enough to see it.

BeginnerComplexity:Time: 25–35 min

Your task

Message me only on the evenings when the northern lights could be visible from my city and the sky is clear enough to actually see them. On quiet nights, and on nights when it is clouded over, stay silent.

Your bonus task

Prove the alert really works by replaying the great geomagnetic stormA few hours when the solar wind hits Earth hard enough to light up the sky far from the poles. of 10 and 11 May 2024: fetch what was actually measured that night and show that the same decision would have sent the message.

Example use cases

  • A photographer who would rather get one message than watch three aurora dashboards every night.
  • A family far enough north that the sky is worth checking between October and March.
  • Any alert that should fire only when two unrelated conditions are true at the same time – price and stock, wind and tide, pollen and an open window.

Before you start

  1. 01

    Sign up for n8n Cloud or open your n8n workspace. No other account is needed.

  2. 02

    Space weather comes from the NOAA Space Weather Prediction Center three-day forecast, and the history from GFZ Potsdam (CC BY 4.0). Neither needs a key. NOAA changed the shape of this file in March 2026, so older tutorials show different field names.

  3. 03

    Cloud cover comes from the Open-Meteo forecast API, free for non-commercial use and with no key. Look up your city's latitude and longitude once and put them in the URL.

  4. 04

    To receive the message, use ntfy.sh: pick a hard-to-guess topic name and open https://ntfy.sh/your-topic in a browser or install the ntfy app. No account is needed. A Telegram bot from challenge 2 works just as well.

  5. 05

    Set the workflow's time zone in its Settings, so that "this evening" means your evening.

What the workflow must do

  1. 01

    On a quiet or cloudy evening the workflow sends nothing, and the execution shows which of the two conditions failed.

  2. 02

    When the forecast reaches Kp 5 or higher and cloud coverThe share of the sky covered by cloud, from 0 to 100 per cent. Under about 40 per cent there are enough gaps to see through. stays below 40 per cent, exactly one message arrives, naming tonight's strongest Kp and the cloud coverThe share of the sky covered by cloud, from 0 to 100 per cent. Under about 40 per cent there are enough gaps to see through. it found.

  3. 03

    The workflow is published and runs by itself every evening. Bonus: replaying 10 and 11 May 2024 finds Kp 9.0 and shows the alert would have fired.

Solution

See the workflow challenge answer

Reveal the completed workflow only when you are ready to compare it with your own.

Submit as solved

Ready to submit?

Submit when your team has a working workflow to demonstrate.

Solution

Reveal the workflow solution?

This will show the completed workflow for this challenge. Are you sure you want to continue?

Mentor review

Find a mentor and ask them to review.

Show them your working workflow. Once they approve it, collect the balloon for this challenge.