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-civic-decision

v0.1.0

Published

Decision making node for n8n workflows (civic tech platforms)

Readme

n8n-nodes-civic-decision

This custom node for n8n provides various decision-making methods for civic tech platforms. The Decision node takes multiple inputs (votes) and determines whether a decision passes based on different decision-making methods.

Installation

Option 1: npm installation (recommended)

Install the package in your n8n installation:

npm install n8n-nodes-civic-decision

Restart your n8n instance.

Option 2: Manual installation

Alternatively, you can manually install the node:

  1. Clone this repository
  2. Copy the nodes/Decision folder to your n8n custom nodes directory (typically ~/.n8n/custom/)
  3. Restart your n8n instance

Features

The Decision node supports the following decision-making methods:

Simple Majority

A decision passes if there are more "Yes" votes than "No" votes. Abstentions are not counted.

Threshold

A decision passes if the "Yes" votes meet or exceed a specified threshold. The threshold can be:

  • Percentage: A percentage of valid votes (excluding abstentions)
  • Absolute: An absolute number of "Yes" votes

Consensus

A decision passes if the percentage of blocking votes ("No" votes) is below a specified blocking percentage. This implements a form of consensus decision-making where a small minority cannot block a decision.

Custom Logic

Define custom conditions for when a decision passes using JavaScript expressions. Available variables:

  • yesVotes: Number of "Yes" votes
  • noVotes: Number of "No" votes
  • abstainVotes: Number of abstention votes
  • totalVotes: Total number of votes

Example: yesVotes > noVotes * 2 (passes if there are at least twice as many "Yes" votes as "No" votes)

Usage

  1. Add the Decision node to your workflow
  2. Connect it to a source of vote data (e.g., Airtable, Google Sheets, or an API)
  3. Configure the node:
    • Select a decision method
    • Specify the field name containing votes and values for "Yes", "No", and "Abstain"
    • Configure method-specific parameters
  4. Connect the outputs:
    • First output: Decision passes
    • Second output: Decision fails

Example

Here's a simple example workflow:

  1. HTTP Request node: Triggers the workflow when votes are submitted
  2. Function node: Formats the votes from various sources
  3. Decision node: Applies the selected decision method
  4. If Decision Passes: Send confirmation, update records, etc.
  5. If Decision Fails: Notify stakeholders, archive proposal, etc.

Inputs

The Decision node expects input items with a field containing vote values. The field name and values are configurable.

Outputs

The Decision node has two outputs:

  1. Decision Passed: Activated when the decision passes
  2. Decision Failed: Activated when the decision fails

Both outputs include a summary object with:

  • Method used
  • Total votes
  • Yes votes
  • No votes
  • Abstain votes
  • Result (PASSED/FAILED)
  • Method-specific information (threshold, blocking percentage, etc.)

License

MIT