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-onebot-trigger

v0.1.4

Published

OneBot trigger node for n8n with HMAC-SHA1 webhook verification

Downloads

361

Readme

n8n-nodes-onebot-trigger

OneBot Trigger community node for n8n.

Features

  • Receives OneBot webhook events via trigger webhook.
  • Verifies fixed x-signature header using HMAC-SHA1.
  • Uses credential Secret for signature verification when provided.
  • If credential/Secret is empty, signature verification is skipped.
  • Returns 401 when signature verification fails.
  • Optional strict mode: invalid signatures return 401 with empty body.
  • Outputs parsed JSON event payload to workflow on success.
  • Adds a onebot object with commonly used fields (userId, groupId, noticeType, etc.).

Local development

npm install
npm run build

Run n8n with custom extensions:

N8N_CUSTOM_EXTENSIONS=~/source/n8n/dist n8n start

Simulate webhook request

Quick way:

SECRET='your-secret' npm run test:webhook

You can also override target URL and request body:

WEBHOOK_URL='http://localhost:5678/webhook/onebot' \
SECRET='your-secret' \
BODY='{"post_type":"message","message_type":"private","user_id":10001,"self_id":20002,"message":"hello"}' \
npm run test:webhook

Manual curl version:

BODY='{"post_type":"notice","notice_type":"notify","sub_type":"poke","user_id":123,"target_id":456}'
SECRET='your-secret'
SIG=$(printf '%s' "$BODY" | openssl sha1 -hmac "$SECRET" | awk '{print $2}')

curl -i 'http://localhost:5678/webhook/onebot' \
  -H "content-type: application/json" \
  -H "x-signature: sha1=$SIG" \
  --data "$BODY"

Node parameters

  • Credential: optional OneBot Webhook API credential (Secret is read from here).
  • HTTP Method: webhook method, default POST.
  • Path: webhook path, default onebot.
  • Event Type: dropdown filter for post_type, choose All to pass all.
  • Message Type: shown when Event Type=message.
  • Notice Type: shown when Event Type=notice.
  • Request Type: shown when Event Type=request.
  • Message Sub Type: shown when Event Type=message.
  • Notice Sub Type: shown when Event Type=notice.
  • Request Sub Type: shown when Event Type=request.
  • User ID: primary filter for user_id; comma-separated values, leave empty to pass all users.
  • Group ID: primary filter for group_id; comma-separated values, leave empty to pass all groups.
  • Self ID, Target ID: optional comma-separated allow-lists.
  • Strict Invalid Signature Response: when enabled, invalid signatures return empty body.
  • Emit Skipped Item On Filter Mismatch: when enabled, unmatched events are forwarded with skipped=true; when disabled (default), unmatched events are acknowledged and dropped.

Filter behavior

  • Any empty filter means no restriction for that field.
  • For all user IDs to pass, leave User ID empty.
  • Same rule applies to Group ID, Self ID, and Target ID.
  • For unmatched events: by default they are dropped (only HTTP 200 response is returned). If Emit Skipped Item On Filter Mismatch is enabled, an item is still emitted with skipped=true for debugging/branching.