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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@yuniruyuni/n8n-nodes-twitch

v0.1.41

Published

n8n node for Twitch API integration. Supports Twitch operations and EventSub triggers.

Readme

n8n-nodes-twitch

CI npm version

This is an n8n community node package for Twitch API integration. It provides comprehensive support for Twitch Helix API operations and real-time EventSub notifications via WebSocket.

n8n is a fair-code licensed workflow automation platform.

English | 日本語

Features

34 Twitch API Resources

All nodes follow Twitch Helix API's resource-oriented structure:

User & Channel Management:

  • Twitch Users - Get user information
  • Twitch Channels - Get channel information
  • Twitch Streams - Get stream information

Content & Media:

  • Twitch Clips - Get, create clips
  • Twitch Videos - Get videos
  • Twitch Games - Get games, top games
  • Twitch Search - Search categories, channels, streams

Chat & Communication:

  • Twitch Chat Messages - Send messages
  • Twitch Chatters - Get chatters list
  • Twitch Emotes - Get channel emotes
  • Twitch Announcements - Send announcements
  • Twitch Whispers - Send whispers

Channel Points & Rewards:

  • Twitch Custom Rewards - Create, get, update, delete custom rewards
  • Twitch Redemptions - Get, update redemption status

Moderation:

  • Twitch Bans - Ban, unban users, get banned users
  • Twitch Moderators - Get, add, remove moderators

Engagement:

  • Twitch Polls - Get, create, end polls
  • Twitch Predictions - Get, create, lock, resolve predictions
  • Twitch Raids - Start, cancel raids

Monetization:

  • Twitch Bits Leaderboard - Get bits leaderboard
  • Twitch Cheermotes - Get cheermotes
  • Twitch Subscriptions - Get broadcaster subscriptions, check user subscription

Scheduling & Teams:

  • Twitch Schedule - Get, create, update, delete stream segments
  • Twitch Teams - Get channel teams, team information

EventSub Trigger Node

Twitch Trigger - Real-time event notifications via WebSocket:

  • Stream Events: online, offline
  • Channel Events: update, follow, subscribe, subscription end/gift/message, cheer, raid, ban, unban
  • Chat Events: message, clear, notification, message delete, clear user messages
  • Channel Points: custom reward add/update/remove, redemption add/update
  • Polls: begin, progress, end
  • Predictions: begin, progress, lock, end
  • Goals: begin, progress, end
  • Hype Train: begin, progress, end
  • Moderator: add, remove
  • Shield Mode: begin, end
  • Shoutout: create, receive

Supports 76 EventSub events with automatic subscription management.

Authentication

Twitch User Access Token - User access tokens for all operations

  • Uses Authorization Code Grant Flow
  • Required for both API operations and EventSub WebSocket subscriptions
  • Pre-configured with comprehensive scopes (80 scopes) covering:
    • All 76 EventSub events
    • All Twitch Helix API operations
    • Chat, moderation, channel management, and more
  • Requires: Client ID, Client Secret, and OAuth redirect URL

Installation

Install from n8n (Recommended)

  1. Go to Settings > Community Nodes
  2. Click Install
  3. Enter @yuniruyuni/n8n-nodes-twitch in the package name field
  4. Click Install

This works for both n8n Cloud and self-hosted instances.

Install manually (For development)

If you're developing or debugging this package:

Via npm:

npm install @yuniruyuni/n8n-nodes-twitch

Via custom extensions path:

N8N_CUSTOM_EXTENSIONS="/path/to/@yuniruyuni/n8n-nodes-twitch"

For Docker: Mount the package directory or add it to your custom nodes directory.

Compatibility

  • n8n version: 1.0.0 or higher
  • Node.js version: 21.0.0 or higher (required for global WebSocket support)

Usage

Setting up Twitch Credentials

  1. Go to Twitch Developer Console
  2. Create a new application or use an existing one
  3. Note your Client ID and Client Secret
  4. Set the OAuth Redirect URL to your n8n instance (e.g., https://your-n8n.com/rest/oauth2-credential/callback)

Using Twitch Nodes

  1. Add a Twitch node to your workflow
  2. Create new Twitch User Access Token credentials
  3. Select the resource and operation you want to perform
  4. Configure the required parameters
  5. Execute the workflow

Using Twitch Trigger

  1. Add the Twitch Trigger node to your workflow
  2. Create Twitch User Access Token credentials
  3. Select the EventSub event type you want to listen for
  4. Configure broadcaster ID and other required parameters
  5. Activate the workflow to start receiving events

The trigger uses WebSocket to receive real-time events from Twitch. When you activate the workflow, the node automatically:

  • Connects to Twitch EventSub WebSocket (wss://eventsub.wss.twitch.tv/ws)
  • Receives a session ID and creates an EventSub subscription
  • Receives real-time event notifications via WebSocket
  • Handles reconnections automatically
  • Automatically cleans up the subscription when the workflow is deactivated

Development

Prerequisites

  • Node.js 21.0.0 or higher (required for global WebSocket support)
  • npm

Setup

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

# Install dependencies
npm install

# Build the nodes
npm run build

# Start n8n with the nodes loaded (development mode)
npm run dev

Available Scripts

| Script | Description | | --------------------- | ---------------------------------------------------------------- | | npm run dev | Start n8n with your node and watch for changes | | npm run build | Compile TypeScript to JavaScript | | npm run build:watch | Build in watch mode (auto-rebuild on changes) | | npm run lint | Check code for errors and style issues | | npm run lint:fix | Automatically fix linting issues | | npm run release | Create a new release |

Release Process

This project uses n8n-node release (powered by release-it) for automated releases:

Recommended: GitHub Actions

  1. Go to ActionsReleaseRun workflow
  2. Click Run workflow
  3. GitHub Actions automatically:
    • Runs lint and build
    • Updates version in package.json (default increment)
    • Generates CHANGELOG
    • Creates git commit and tag
    • Publishes to npm
    • Creates GitHub release with notes

Alternative: Local Release

For local development workflow:

npm run release

This provides an interactive release process managed by n8n-node release.

Prerequisites:

  • Set NPM_TOKEN secret in GitHub repository settings
  • Ensure you have npm publishing rights for @yuniruyuni/n8n-nodes-twitch
  • For local releases: npm login and clean git state on master branch required

Architecture

This package uses the declarative/low-code style for Twitch API operations:

  • Direct calls to Twitch Helix API (https://api.twitch.tv/helix)
  • n8n's routing property for HTTP requests
  • Resource-oriented structure aligned with Twitch Helix API

The Twitch Trigger node uses Node.js global WebSocket (available in Node.js 21+) to receive EventSub notifications via WebSocket (wss://eventsub.wss.twitch.tv/ws). No external dependencies required.

Resources

License

MIT