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

v1.2.0

Published

n8n community nodes for the Captain customer data platform

Readme

n8n-nodes-captain

npm version License: MIT

Community nodes for integrating n8n with the Captain customer data platform (CDP). The package provides 27 nodes for messaging, segmentation, user data, events, products and vouchers.

Requirements

  • A self-hosted n8n instance
  • A Captain CDP instance with a Server-Side Token

Installation

From the n8n GUI

  1. Go to Settings > Community Nodes.
  2. Select Install.
  3. Enter n8n-nodes-captain and confirm the risk notice.
  4. Restart n8n if it does not restart automatically.

This package is an unverified community node. Installing it requires accepting the community node risk notice, which is available on self-hosted instances only.

Manual installation (npm)

Use this method for Docker, queue mode or private deployments. Run it inside the n8n environment:

mkdir -p ~/.n8n/nodes
cd ~/.n8n/nodes
npm install n8n-nodes-captain

Then restart n8n. In queue mode, repeat the installation on every worker.

If npm tries to compile native dependencies from the n8n-workflow peer dependency, install with npm install --legacy-peer-deps n8n-nodes-captain. n8n provides n8n-workflow at runtime, so the peer copy is not needed.

Managed by environment variables

On n8n 2.21.0 and later you can provision the package through environment variables:

N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV=true
N8N_COMMUNITY_PACKAGES='[{"name":"n8n-nodes-captain","version":"1.0.0"}]'

Unverified packages additionally require N8N_UNVERIFIED_PACKAGES_ENABLED=true or a pinned checksum.

Credentials

The nodes authenticate with a Captain API credential. Create it once per Captain instance under Credentials and select it in the nodes.

The Access Token is the project's Server-Side Token (not the SERVER_SIDE_TOKEN_SECRET). It is generated when the project is initialized and can be copied from the dashboard under Settings > API & Security > Server-Side Token.

| Field | Description | | --- | --- | | CDP Base URL | Root URL of the Captain instance, for example https://cdp.example.com, without a trailing slash | | Access Token | Server-Side Token from the dashboard, sent as a Bearer token | | Event Trigger Token | Bearer token that incoming event webhooks must present — use the project Server-Side Token (falls back to the Access Token when empty) |

The credential supports the Test button, which verifies the base URL and access token against the campaigns endpoint.

Environment variable fallback

For existing deployments that configure nodes through environment variables, every setting falls back to the environment when the credential field is empty:

| Setting | Environment variable | Default | | --- | --- | --- | | CDP Base URL | CDP_URL | - | | Access Token | UNEXO_API_KEY | - | | Request timeout | REQ_TIMEOUT | 60000 ms | | Message timeout | MESSAGE_TIMEOUT | 300000 ms |

Values from the credential always take precedence over environment variables.

Nodes

Messaging

| Node | Description | | --- | --- | | Captain - Send SMS (Advanced) | Sends an SMS campaign to the input users | | Captain - Send Email (Advanced) | Sends an email campaign with personalized subject, preview and content | | Captain - Send WhatsApp (Advanced) | Sends a WhatsApp campaign; supports rotary mode, file attachments and tags | | Captain - Send WebPush (Advanced) | Sends a web push campaign with title, body, icon, image and action buttons | | Captain - Send BaleMessage (Advanced) | Sends a Bale messenger campaign | | Captain - Send Content | Sends content to a segment through SMS, WhatsApp, Web Push, Email or Bale | | Captain - One Time Send Content | Sends content to a segment once per user | | Captain - Ask ChatGPT | Sends a per-user prompt to the Captain GPT endpoint and stores the answer in outputResult.chatGpt |

Audience and segmentation

| Node | Description | | --- | --- | | Captain - Get Segment Users | Fetches the users of a segment, or applies a custom filter rule; can attach the latest events | | Captain - User Update | Updates user fields and attributes using n8n expressions | | Captain - Add/Remove Tags | Adds or removes tags for the input users | | Captain - Check Tags | Splits users by whether they have any of the selected tags | | Captain - Check User Conditions | Splits users by a conditions rule | | Captain - Check If Sent | Splits users by whether content was sent | | Captain - Check Link Click | Splits users by their SMS or email link click status | | Captain - Has Done | Splits users by whether they performed an event within a time range | | Captain - AB Test | Splits users into two groups based on a percentage | | Captain - Best Channel | Routes users by their first, second or third best channel (8 outputs) | | Captain - Send To Call Center | Adds users to a call center category or removes them from it | | Captain - Coupon Code | Assigns coupons from a voucher pool to the input users | | Captain - User Name Formatter | Builds display names from first and last name, with configurable suffixes |

Events and products

| Node | Description | | --- | --- | | Captain - Events | Retrieves the last event, last cart or recommended purchases for the input users | | Captain - Event Trigger | Triggers the workflow when Captain sends an event (Bearer token authentication) | | Captain - Get Product Info | Retrieves product information for the input users | | Captain - Items | Fetches consumable or discounted items | | Captain - Product Available | Triggers the workflow when a product becomes available | | Captain - Remove Users From Notify Product Available | Removes product availability notification events for the input users |

Example

A typical workflow:

  1. Captain - Get Segment Users selects a segment and returns its users.
  2. Captain - User Name Formatter prepares a display name for each user.
  3. Captain - Send SMS (Advanced) sends a personalized message. The message field supports expressions such as {{ $json.outputResult.name }}.

Nodes that send messages can wait until Captain reports that all messages were sent before continuing. Sending nodes return a per-user outputResult object that describes what happened, and failures are returned as items instead of failing the whole workflow.

Development

npm install
npm run build      # compile nodes and copy assets into dist/
npm run lint       # run the n8n community node linter
npm run dev        # start a local n8n instance with the nodes loaded
npm run release    # lint, build and publish a new version

Project layout:

credentials/   credential types
nodes/         one folder per node, plus shared helpers in nodes/shared
dist/          build output that is published to npm

The package has no runtime dependencies; n8n-workflow is provided by n8n.

License

MIT