npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-sunrise-sunset

v0.1.2

Published

n8n node to work with the Sunrise-Sunset API

Readme

n8n-nodes-sunrise-sunset

This is an n8n community node that integrates with the Sunrise-Sunset API to trigger workflows based on sunrise, sunset, and twilight times for specific geographical locations.

The node fetches data every Sunday for the upcoming week and can be used to trigger workflows at specific times based on natural light events.

Installation

Follow these steps to install this community node:

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-sunrise-sunset in the npm package name field
  4. Click Install

Alternatively, you can install via npm:

npm install n8n-nodes-sunrise-sunset

Node Configuration

Basic Configuration

  • Latitude: The latitude of the location in decimal degrees (e.g., 36.7201600).
  • Longitude: The longitude of the location in decimal degrees (e.g., -4.4203400).

Event Selection

  • Event Type: Choose between sunrise or sunset.
  • Time Event: Select the specific moment:
    • Actual Time: The actual sunrise or sunset time
    • Civil Twilight Begin: When civil twilight begins
    • Civil Twilight End: When civil twilight ends
    • Nautical Twilight Begin: When nautical twilight begins
    • Nautical Twilight End: When nautical twilight ends
    • Astronomical Twilight Begin: When astronomical twilight begins
    • Astronomical Twilight End: When astronomical twilight ends

Additional Options

  • Timezone: Specify a timezone (e.g., Europe/Madrid). If left empty, the system timezone will be used.

How It Works

  1. The node runs every Sunday at midnight to fetch data for the upcoming week.
  2. For each day, it requests data from the Sunrise-Sunset API based on your location settings.
  3. The node returns an array of objects containing the times for each day of the week.

Output Data

The node returns an array of objects (one for each day of the week) with the following properties:

{
  "date": "2023-05-21",
  "utcTime": "2023-05-21T05:05:35+00:00",
  "localTime": "2023-05-21T07:05:35+02:00",
  "event": "sunrise",
  "timeEvent": "actual",
  "timezone": "Europe/Madrid",
  "raw": {
    "results": {
      "sunrise": "2023-05-21T05:05:35+00:00",
      "sunset": "2023-05-21T19:22:59+00:00",
      "solar_noon": "2023-05-21T12:14:17+00:00",
      "day_length": 51444,
      "civil_twilight_begin": "2023-05-21T04:36:17+00:00",
      "civil_twilight_end": "2023-05-21T19:52:17+00:00",
      "nautical_twilight_begin": "2023-05-21T04:00:13+00:00",
      "nautical_twilight_end": "2023-05-21T20:28:21+00:00",
      "astronomical_twilight_begin": "2023-05-21T03:20:49+00:00",
      "astronomical_twilight_end": "2023-05-21T21:07:45+00:00"
    },
    "status": "OK",
    "tzid": "UTC"
  }
}

Use Cases

  • Automate smart home devices based on natural light events
  • Schedule outdoor activities around daylight hours
  • Send notifications at sunrise or sunset
  • Control lighting systems based on twilight times
  • Schedule agricultural operations based on natural light cycles

Resources