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

v0.1.1

Published

n8n community node for DueTrail — trigger on overdue-invoice collection events, create invoices, record payments and add case notes.

Readme

n8n-nodes-duetrail

An n8n community node for DueTrail — review-first overdue-invoice collections for B2B service teams.

Two nodes over the DueTrail public API:

  • DueTrail Trigger — starts a workflow on collection events: promises made and broken, payments recorded, cases settled, portal replies ("I already paid", questions) and reminders sent.
  • DueTrail — Create Invoice, Record Payment, Add Note to Case.

Installation

Self-hosted n8n: Settings → Community Nodes → Install → n8n-nodes-duetrail.

Manually:

cd ~/.n8n/nodes
npm install n8n-nodes-duetrail

Credentials

Create an API key in DueTrail under Settings → API keys (shown once), then add a DueTrail API credential in n8n. The base URL defaults to https://duetrail.com/api/public/v1 and only needs changing for a self-hosted DueTrail.

Example workflows

  • Stop chasing customers who have paid. Stripe/bank trigger → DueTrail: Record Payment. Settling the invoice closes the case and resolves any outstanding promise.
  • Put overdue invoices into collections. Schedule → your accounting system → DueTrail: Create Invoice. The case opens paused; nothing reaches a customer until live sending is on.
  • Route a broken promise to the team. DueTrail Trigger (Promise Broken) → Slack/Teams/Linear.

Design notes

  • The trigger keeps a cursor. Unlike Zapier and Make, n8n does not deduplicate on the node's behalf, so the node persists the API's next_since in workflow static data. Losing it would replay the last 24 hours on every poll.
  • A manual test does not advance the cursor, so trying the node in the editor cannot consume events the live workflow has not yet seen.
  • The first run sends no cursor, letting the API's 24-hour default supply a usable sample without replaying history.
  • external_id on Create Invoice is the idempotency key. n8n retries failed steps; without it, a retry creates a second invoice and the customer is chased twice.
  • Actions are declarative (routing-based) rather than programmatic — every operation is a single REST call, which is the form n8n's reviewers prefer for API nodes.

Development

npm install
npm run build          # tsc + copy the icon into dist
npm test               # structural tests, no n8n install needed

npm test runs tsc --noEmit first, then the structural tests. The type check is not optional: the structural tests read the TypeScript as text, so they pass happily on code that does not compile — which is exactly what happened before the first publish attempt. The structural tests check what a compiler cannot: that the trigger offers exactly the event types the API emits (no more, no fewer), that it reads the real response fields, that the cursor logic is present, that the package's n8n.nodes paths each have a source file, and that the icon is the brand mark.

Publishing

Do not npm publish from a laptop. Since 2026-05-01 n8n only accepts community nodes for verification if they were published from CI with a provenance statement. A manual publish produces a package that installs fine but can never be verified, and burns the version number.

Publish via this repo's Publish n8n node workflow (.github/workflows/publish.yml), which type-checks, tests and verifies the package shape first. No token is stored anywhere: the npm package has a Trusted Publisher naming this repo and publish.yml, so npm authenticates the OIDC token GitHub mints for the run and attaches provenance automatically. Run it once with dry_run on to check the tarball, then again with it off — it fails the run if provenance did not attach.

(0.1.0 was published by hand to create the package, so it carries no provenance. Submit 0.1.1 or later for verification.)

Then submit for verification at the n8n Creator Portal so the node appears in the in-app browser: https://creators.n8n.io/nodes

Verification requirements this package already meets: n8n-nodes- name prefix, n8n-community-node-package keyword, the n8n attribute in package.json, MIT licence, a README, and no runtime dependencies (keep it that way — adding one disqualifies the node).

License

MIT