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-secuencialgenerator

v0.2.1

Published

N8N node for auto-incrementing sequential values with mathematical operations (sum, multiply, subtract)

Readme

n8n-nodes-secuencialgenerator

This is an n8n community node that provides an auto-increment generator with persistent state for your n8n workflows.

n8n is a fair-code licensed workflow automation platform.

Features

The SecuencialGenerator node is an auto-incrementing value generator that performs mathematical operations on a sequence value each time it executes. It supports three operation types:

  1. Sum By: Add a value to the current sequence
  2. Multiply By: Multiply the current sequence by a value
  3. Subtract By: Subtract a value from the current sequence

Each execution returns the updated sequence value in the format: { sequence: value }

Installation

Follow the installation guide in the n8n community nodes documentation.

Local Development

To use this node in local development:

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run build to compile the TypeScript code
  4. Link the package: npm link
  5. In your n8n installation directory, run: npm link n8n-nodes-secuencialgenerator
  6. Restart n8n

How It Works

The node performs mathematical operations on a sequence value. Each time the workflow executes, the operation is applied and the new value is returned.

Parameters

  • Operation Type: The mathematical operation to perform

    • Sum By: Adds the operational value to the current value
    • Multiply By: Multiplies the current value by the operational value
    • Subtract By: Subtracts the operational value from the current value
  • Operational Value: The value to use in the operation (must be an integer)

    • Supports expressions for dynamic values
    • Example: 1, 5, {{ $json.increment }}
  • Current Value: The current state of the sequence (must be an integer)

    • This should be set to the previous execution's output to maintain state
    • Supports expressions to reference previous values
    • Example: 0, {{ $json.sequence }}

Example Usage

Example 1: Simple Counter

First execution:

  • Operation Type: Sum By
  • Operational Value: 1
  • Current Value: 0
  • Output: { sequence: 1 }

Second execution (using previous output):

  • Operation Type: Sum By
  • Operational Value: 1
  • Current Value: {{ $json.sequence }} (references previous output)
  • Output: { sequence: 2 }

Example 2: Multiply Sequence

First execution:

  • Operation Type: Multiply By
  • Operational Value: 2
  • Current Value: 1
  • Output: { sequence: 2 }

Second execution:

  • Operation Type: Multiply By
  • Operational Value: 2
  • Current Value: {{ $json.sequence }}
  • Output: { sequence: 4 }

Example 3: Countdown

First execution:

  • Operation Type: Subtract By
  • Operational Value: 1
  • Current Value: 10
  • Output: { sequence: 9 }

Maintaining State

To maintain state between executions, you need to:

  1. Store the output value (the sequence field) after each execution
  2. Reference this stored value in the Current Value parameter on the next execution using expressions like {{ $json.sequence }}

Common patterns include:

  • Using a Set node to store the value in a variable
  • Chaining the node output back to itself in loops
  • Storing the value in a database and retrieving it for the next execution

Validation

Both Operational Value and Current Value must be integers. The node will show an error if:

  • Non-integer values are provided
  • Values cannot be parsed as numbers
  • Expressions evaluate to non-integer values

Compatibility

This node was developed and tested with n8n version 1.x.

Resources

License

MIT