Resources · n8n integration

Npm n8n integrationAutomate Npm with n8n.

The Npm n8n integration puts the registry inside a workflow. The node ships 5 operations across 2 resources, packages on one side and distribution tags on the other, and reads whichever registry the credential points at. There is no npm trigger, so a schedule or another app starts the run.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Npm n8n integration actually do?

The npm node calls the npm registry API from inside n8n. It reads what a package declares: the metadata of one exact version, the full list of published versions, the distribution tags that point a name at a version, and the results of a keyword search. One operation writes, the one that moves a distribution tag to another version. Everything runs against the registry set in the credential, the public one or your own.

A dependency watch is the first shape teams build. A Schedule Trigger fires each morning, the node returns the published versions of every package the product depends on, and a comparison against the rows already stored in Google Sheets isolates the ones that moved. What people actually read is the Slack message at the end, one line per package that gained a release.

The second shape runs at release time. A build server calls an n8n Webhook with the package name and the version it just published, the node pulls the metadata of that exact version, and the workflow files the record in Postgres next to the build that produced it. Nobody has to open the registry in a browser to know what shipped.

The third shape is a promotion step. Once a candidate passes review, the workflow moves the distribution tag that teams install from onto the version that was approved. Package search covers a smaller need, a keyword sweep of the registry when nobody knows yet what exists for a given job.

The node stops at those 5 operations. Publishing a package, removing one, deprecating a version, changing owners: none of that is here. The HTTP Request node calls the rest of the registry API and reuses the same npm credential, so a missing endpoint costs one extra node rather than a change of tool. Two details are worth knowing before you build. Get Package Metadata wants an exact version, which usually means listing versions first and feeding the one you picked into the second call. And package search walks its results with Limit and Offset, one call per page, with no option to sweep everything at once.

The hosting question comes next. The node ships with n8n, on n8n Cloud and on a self-hosted instance, with nothing to install and no extra cost on the n8n side. The n8n review goes through where the tool is comfortable and where it is not.

Connect

How do you connect npm to n8n?

  1. 01

    Create the access token on npm

    Sign in to the npm account that owns the packages you care about, open the profile menu and pick Access Tokens. Generate one there and copy the value. That string is what n8n sends on every call, so it deserves the same care as a password: whoever holds it talks to the registry with the same rights as the account behind it.

  2. 02

    Save it as an n8n credential

    In n8n, open Credentials and create an npm credential. Paste the token into Access Token, then look at Registry URL: keep the public registry value it comes with, or replace it with the address of your own registry. A credential is created once and reused everywhere, so from that point the npm node offers it in a dropdown and you never retype the token.

  3. 03

    Wire the node and run it once

    Drop the npm node into a workflow, select the credential, then choose the resource, Package or Distribution Tag, and the operation under it. Fill the required fields by hand for the first attempt and execute that node on its own. What comes back in the output panel is exactly what the following nodes will map, so it pays to look at it before building the rest of the branch.

Actions

The 5 operations of the npm node, one by one

The Npm node exposes 5 operations across 2 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceUpdateGet AllGet MetadataGet VersionsSearch
Package✓✓✓
Distribution Tag✓✓

Package

3 operations
01

Returns all the metadata for a package at a specific version

package.getMetadata

What you see in n8n

Notes & use cases

Ask the registry about one precise release and get back everything that version declares, as a single item. It reads without changing anything, so it can be replayed as often as an investigation needs.

Key parameters

  • Package Name: the package name as published on the registry, typed in or mapped from an earlier node with {{ $json.field }}.
  • Package Version: the exact version string. The field is required, the node stops when it is empty, and there is no shortcut to the newest release here.
Use cases
documenting the version a team just put in production, filed next to the ticket that triggered the release.
02

Returns all the versions for a package

package.getVersions

What you see in n8n

Notes & use cases

One package name goes in, the list of versions published for it comes out. This is the operation that answers the question of whether anything landed since yesterday, because nothing tells n8n about a publication on its own.

Key parameters

  • Package Name: the package to read, static in the field or taken from the incoming item, for instance {{ $json.field }}.
Use cases
a daily sweep over the packages a product depends on, compared with yesterday's list so only the new releases are reported.

Distribution Tag

2 operations
04

Returns all the dist-tags for a package

distTag.getMany

What you see in n8n

Notes & use cases

Returns the distribution tags of a package. A dist-tag is a name pointing at one published version, which gives a stable label where people would otherwise have to remember a version number.

Key parameters

  • Package Name: the package whose labels you want to read.
Use cases
checking package by package which version each label currently points at, before opening a deployment window.
05

Update a the dist-tags for a package

distTag.update

What you see in n8n

Notes & use cases

Here the node writes: it points a label at the version you name. This is the only operation of the node that changes something in the registry, so its place is at the end of a workflow, after the check that approves the version.

Key parameters

  • Package Name: the package the label belongs to.
  • Package Version: the version the label targets after the call, often carried over from the previous node with {{ $json.field }}.
  • Distribution Tag Name: the name of the label the call points at the version above.
Use cases
closing a review by switching the label teams install from over to the approved version.
Need help

Need help automating Npm with n8n?

A person reads every message.

FAQ

Questions people ask about npm in n8n

01Is the Npm n8n integration free to use?
Yes on the n8n side. The npm node ships with n8n, on n8n Cloud and on an instance you host yourself under the Community Edition and its Sustainable Use licence. Nothing to install, nothing extra to buy for this particular node: what you pay for is your n8n plan, or the server it runs on. On the registry side it depends on the account you plug in, since the node queries the registry named in the credential. The workflow itself is strictly the same in both hosting models, which makes it easy to start on Cloud and move later.
02What credentials does the npm node need?
An npm account and an API access token. The n8n credential holds two fields: Access Token, which you generate from the Access Tokens entry of your npm profile menu, and Registry URL, which keeps the public registry value until you point it at a registry of your own. It is created once under Credentials and every workflow on the instance can select it, so rotating the token happens in a single place. Of the 5 operations, 4 only read; the update of a distribution tag is the one that writes back to the registry.
03What are the limits of the npm node in n8n?
There are 5 operations, and they read more than they write. Metadata for one version, the version list, the distribution tags of a package and a keyword search make up the reading side. On the writing side there is only the move of a distribution tag. Publishing a package, unpublishing one, deprecating a version or managing owners is not part of the node. Two points matter in practice: Get Package Metadata requires an exact version rather than a name alone, and the search walks page by page with Limit and Offset. For the rest of the registry API, the HTTP Request node takes over with the same credential.
04Can a workflow react to a new release right away?
Not directly. npm has no trigger node in n8n, so nothing pushes the information into your workflow. You need another starting point: a Schedule Trigger that runs at a fixed interval, lists the versions and compares them with what you stored on the previous pass; a Webhook node, that is to say an n8n URL a third-party service calls, for example your publishing pipeline; or the trigger of another tool such as a code repository. The first route suits packages you do not control. The second is more precise when you are the one publishing, because the event is exact.
05n8n or Make to automate npm?
It mostly comes down to hosting and to the cost model. Make is hosted by its publisher, with no self-hosting option, and bills per operation: a watch that loops over many packages every morning sees its bill follow the number of calls. n8n runs on Cloud or on your own server, which counts when the stored token opens a private registry and you would rather keep it at home. Make is the easier editor for a first scenario. n8n gives you the HTTP Request node to cover what the npm node leaves out, and that is often what settles the choice.