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

v0.1.16

Published

n8n node for PubNub real-time messaging platform

Readme

n8n-nodes-pubnub

This is an n8n community node that provides integration with PubNub real-time messaging platform.

n8n is a fair-code licensed workflow automation platform.

PubNub is a real-time communication platform for building live chat, multiplayer games, IoT device control, and other real-time features.

Installation

Follow the installation guide in the n8n community nodes documentation.

Community Nodes (Recommended)

  1. Go to Settings > Community Nodes
  2. Click Install
  3. Enter n8n-nodes-pubnub in Enter npm package name
  4. Click Install

Manual Installation

To use this package in your n8n instance, you can install it via npm:

npm install n8n-nodes-pubnub

Credentials

To use this node, you'll need to configure your PubNub credentials:

  1. Publish Key: Your PubNub Publish Key (required for publishing messages)
  2. Subscribe Key: Your PubNub Subscribe Key (required for subscribing to channels)
  3. Secret Key: Optional secret key for encryption and access manager
  4. User ID: Optional unique identifier for this client (auto-generated if not provided)

You can find your keys in the PubNub Admin Portal.

Nodes

This package provides two nodes:

1. PubNub Node

The main node for interacting with PubNub. Supports the following operations:

Message Operations

  • Publish: Send a message to a channel
    • Supports metadata, TTL, and history storage options
  • Signal: Send a lightweight signal (max 30 characters)

History Operations

  • Fetch Messages: Retrieve message history from a channel
    • Supports pagination, metadata, and message actions
  • Delete Messages: Delete messages from a channel
  • Message Counts: Get message counts for channels

Presence Operations

  • Here Now: Get current occupancy and user list for channels
  • Where Now: Get channels where a specific user is present
  • Set State: Set state data for a user on channels
  • Get State: Get state data for a user on channels

Channel Group Operations

  • Add Channels: Add channels to a channel group
  • Remove Channels: Remove channels from a channel group
  • List Channels: List all channels in a channel group
  • Delete Group: Delete a channel group

2. PubNub Trigger Node

A trigger node that starts your workflow when PubNub events occur:

  • Trigger On: Choose to trigger on messages, presence events, or both
  • Channels: Subscribe to specific channels (comma-separated)
  • Channel Groups: Subscribe to channel groups (comma-separated)

Options:

  • Filter Expression: Apply message filtering
  • With Presence: Receive presence events
  • Time Token: Start receiving messages from a specific timetoken
  • Include Message Actions: Include message actions in events
  • Include Metadata: Include message metadata

Usage Examples

Example 1: Publish a Message

  1. Add a PubNub node to your workflow
  2. Select Message resource and Publish operation
  3. Enter your channel name (e.g., my-channel)
  4. Enter your message as JSON: {"text": "Hello World!", "timestamp": "{{$now}}"}
  5. Configure credentials and execute

Example 2: Subscribe to Real-time Messages

  1. Add a PubNub Trigger node to start your workflow
  2. Set Trigger On to Message
  3. Enter channel name(s) (e.g., chat-room,notifications)
  4. Configure credentials
  5. Activate the workflow - it will now trigger whenever messages arrive

Example 3: Check Channel Presence

  1. Add a PubNub node
  2. Select Presence resource and Here Now operation
  3. Enter channel name(s)
  4. Enable options: Include UUIDs and Include State
  5. Execute to see who's currently online

Example 4: Fetch Message History

  1. Add a PubNub node
  2. Select History resource and Fetch Messages operation
  3. Enter channel name
  4. Set count to desired number of messages (e.g., 50)
  5. Enable Include Metadata if needed
  6. Execute to retrieve historical messages

Development

To develop or modify this package:

# Clone the repository
git clone https://github.com/pubnub/n8n-nodes-pubnub.git
cd n8n-nodes-pubnub

# Install dependencies
npm install

# Build the package
npm run build

# Watch for changes during development
npm run dev

Resources

Version History

0.1.0

  • Initial release
  • PubNub node with message, history, presence, and channel group operations
  • PubNub Trigger node for real-time subscriptions
  • Full credential support with auto-generated User ID fallback

License

MIT

Support

If you encounter issues or have questions:

  1. Check the PubNub Documentation
  2. Visit the n8n Community Forum
  3. Open an issue on GitHub

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request