# The sky of the night you were born: an n8n workflow recalculates the stars

> Date, optional time, city: a poster of the stars, moon phase and planets of your birth night, plus weather and events. n8n workflow with an AI portrait.

Author: Daniele Michelin · Published: 2026-11-12 · Updated: 2026-11-12 · Language: en
Canonical: https://daniele-michelin.com/en/blog/n8n-birth-sky/

Enter a date, an optional time and a city, and get a poster of that night's sky: stars, moon phase, visible planets, weekday, days lived, weather and three events “on this day”. The astronomy is computed by a Code node inside n8n.

Try it first: [the sky of your birth night](https://daniele-michelin.com/en/birth-sky/). Enter the date, the time is optional, and the city. A few seconds later the poster is there.

## What you get

- **The sky poster:** the stars above your city that night, with the 88 constellations, drawn in a canvas.

- **Moon phase and planets:** how the moon looked and which planets were in the sky.

- **Numbers:** the weekday and how many days have passed since.

- **Weather:** on the day you were born and on your last birthday.

- **Three events “on this day”:** from Wikipedia.

- **A short portrait:** written by an AI from exactly these data.

- **A preview image:** for sharing, with the sky as its motif.

## The workflow

- **Webhook:** receives the date, the optional time and the city.

- **Geocoding:** Open-Meteo turns the city into coordinates and a time zone.

- **Three requests in parallel:** the weather (archive for the birthday, forecast for the last one), “On this day” from Wikipedia and the star catalogue.

- **Code node with the astronomy:** sidereal time, azimuthal projection for the poster, planet positions from the JPL Keplerian elements and the moon from a reduced Meeus formula.

- **AI for the portrait:** gpt-oss-120b at IONOS gets only the computed values.

- **Saving:** a PHP script receives the result. The page draws the poster in a canvas, the server renders the preview image with GD.

## How accurate is the maths?

I tested the Code node against the astronomy-engine library. The largest error is 0.15 degrees, invisible on a poster. The star catalogue comes from Yale/Hipparcos via d3-celestial (BSD-3): 2061 stars down to magnitude 5.2 and the 88 constellations.

Honest limits:

- The planets are approximations from orbital elements, not precision ephemerides.

- There is no refraction, so no correction for the bending of light in the atmosphere near the horizon.

- Historical time zones and daylight saving depend on the ICU database. For old dates the local time can be off by an hour.

- Valid for the years 1900 to 2026.

- Without a time the workflow uses a fixed moment in the night. The sky turns 15 degrees in an hour, so the poster is then an approximation.

## Privacy

The result is stored for 30 days and can be deleted earlier. No IP address is stored, and the result pages are set to noindex.

## Build it yourself

The workflow is ready as [JSON to import](https://daniele-michelin.com/assets/n8n/sky.json). Open-Meteo and Wikipedia need no key. For the AI any OpenAI-compatible API will do, and for saving you need a small endpoint of your own. More workflows to click and download are on the [n8n overview](https://daniele-michelin.com/en/n8n/), for example the [Website DNA scan](https://daniele-michelin.com/en/blog/n8n-website-dna-scan/).

Now it is your turn: what was the moon phase on the night you were born? Tell us in the comments.
