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

n8n-nodes-serverchan

v3.1.2

Published

n8n community node for ServerChan3 - Send app push notifications with flexible key management

Readme

n8n-nodes-serverchan

npm version License: MIT

n8n community nodes for ServerChan3 - Send app push notifications directly from your n8n workflows with flexible key management.

中文文档 | Installation | Usage | Examples


Features

  • 🔑 Dual Node Architecture: Separate key management from message sending
  • 💾 Flexible Key Management: Save recipients in credentials or input manually
  • 🚀 Batch Sending: Send to multiple recipients in one workflow
  • 🔄 Auto-deduplication: Automatically removes duplicate SendKeys
  • 📝 Markdown Support: Rich text formatting for message content
  • 🏷️ Tags & Metadata: Add tags and short descriptions to messages
  • 🎯 Smart Delimiters: Support newline, comma, semicolon, or space separators
  • Zero Dependencies: No runtime dependencies, lightweight and fast
  • 🌐 Expression Support: Dynamic content using n8n expressions
  • 🛡️ Error Handling: Graceful error handling with detailed feedback

Installation

For Self-Hosted n8n

Option 1: Via npm (Recommended)

# Navigate to your n8n installation directory
cd ~/.n8n

# Install the package
npm install n8n-nodes-serverchan

# Restart n8n

Option 2: Via n8n Community Nodes UI

  1. Go to SettingsCommunity Nodes
  2. Click Install a community node
  3. Enter n8n-nodes-serverchan
  4. Click Install

Option 3: Via Docker

# Enter n8n container
docker exec -it n8n sh

# Install the package
cd /root/.n8n
npm install n8n-nodes-serverchan

# Exit and restart container
exit
docker restart n8n

For n8n Cloud

This node is available for installation via the Community Nodes feature in n8n Cloud.


Quick Start

1. Get Your SendKey

Visit https://sc3.ft07.com/sendkey to obtain your ServerChan3 SendKey(s).

SendKey Format: sctp[UID]t[KEY] (e.g., sctp12345tABCDEF)

  • The UID is automatically extracted from the SendKey
  • No need to configure UID separately

2. Choose Your Workflow Pattern

This package provides two nodes that work together:

| Node | Purpose | Usage | |------|---------|-------| | ServerChan Key | Manage and prepare SendKeys | Select from credentials or input manually | | ServerChan Send | Send messages | Receives SendKeys from Key node |

Recommended Workflow:

[ServerChan Key] → [ServerChan Send]
   Prepare keys       Send message

Node Reference

ServerChan Key

Manages and prepares SendKeys for batch sending.

Configuration

Credential (Optional):

  • ServerChan API: Pre-configured recipients in JSON format

Parameters:

  • Select Recipients: Choose from saved credentials (multi-select)
  • Manual SendKeys: Enter SendKeys directly (supports multiple delimiters)

Supported Input Formats

# Newline-separated (recommended)
sctp12345tXXXXXX
sctp67890tYYYYYY

# Comma-separated
sctp12345tXXXXXX, sctp67890tYYYYYY

# Space-separated
sctp12345tXXXXXX sctp67890tYYYYYY

# Semicolon-separated
sctp12345tXXXXXX; sctp67890tYYYYYY

# Mixed (all work!)
sctp12345tXXXXXX, sctp67890tYYYYYY
sctp11111tZZZZZZ

Output

Produces one item per SendKey:

[
  { "sendKey": "sctp12345tXXXXXX" },
  { "sendKey": "sctp67890tYYYYYY" }
]

ServerChan Send

Sends messages via ServerChan API.

Configuration

Parameters:

  • SendKey (Required): Defaults to {{$json.sendKey}} from previous node. Format: sctp[UID]t[KEY] - UID is automatically extracted
  • Title (Required): Message title (max 32 characters)
  • Content (Optional): Message body with Markdown support (max 32KB)
  • Short Description (Optional): Brief description for message card
  • Tags (Optional): Message tags separated by |

Example Configuration

SendKey: {{$json.sendKey}}  (auto-filled from ServerChan Key, e.g., sctp12345tXXXXXX)
Title: Workflow Completed
Content: **Success!** Your workflow finished at {{$now}}
Short: Automation notification
Tags: n8n|automation|success

Note: The UID (12345 in this example) is automatically extracted from the SendKey and used to construct the API endpoint.


Credential Setup (Optional)

For frequently used recipients, create a ServerChan API credential:

  1. Go to CredentialsCreate New Credential
  2. Search for ServerChan API
  3. Configure recipients in JSON format:
[
  {
    "name": "Alice",
    "sendKey": "sctp12345tXXXXXX"
  },
  {
    "name": "Bob",
    "sendKey": "sctp67890tYYYYYY"
  },
  {
    "name": "DevOps Team",
    "sendKey": "sctp11111tZZZZZZ"
  }
]
  1. Save the credential

Note: SendKey format is sctp[UID]t[KEY]. The UID will be automatically extracted when sending messages.

Benefits:

  • Reusable across workflows
  • Easy recipient management
  • Clear naming for better organization

Examples

Example 1: Simple Notification (Manual SendKey)

Workflow:

[Schedule Trigger] → [ServerChan Key] → [ServerChan Send]

ServerChan Key:

Manual SendKeys: sctp12345tXXXXXX

ServerChan Send:

Title: Daily Report
Content: Today's summary is ready!

Example 2: Batch Notification (Multiple Recipients)

Workflow:

[Webhook] → [ServerChan Key] → [ServerChan Send]

ServerChan Key:

Select Recipients: Alice (sctp12345t...), Bob (sctp67890t...), DevOps Team (sctp11111t...)

ServerChan Send:

Title: Alert: Server Down
Content: ## Urgent
Server `{{$json.serverName}}` is not responding.

**Time:** {{$now}}
**Status:** {{$json.status}}

Please investigate immediately.

Tags: alert|urgent|server

Example 3: Dynamic Recipients (Credentials + Manual)

Workflow:

[HTTP Request] → [ServerChan Key] → [ServerChan Send]

ServerChan Key:

Select Recipients: Alice, Bob  (from credentials)
Manual SendKeys: sctp99999tTEMPKEY  (temporary recipient)

ServerChan Send:

Title: {{$json.eventName}}
Content: Event details: {{$json.description}}
Short: {{$json.summary}}
Tags: event|{{$json.category}}

Example 4: Error Monitoring

Workflow:

[Error Trigger] → [Code] → [ServerChan Key] → [ServerChan Send]

Code Node (Process Error):

return {
  errorType: $input.item.json.error.name,
  errorMessage: $input.item.json.error.message,
  workflowName: $workflow.name,
  timestamp: new Date().toISOString()
};

ServerChan Send:

Title: ⚠️ Workflow Error: {{$json.workflowName}}
Content: ## Error Details
**Type:** {{$json.errorType}}
**Message:** {{$json.errorMessage}}
**Time:** {{$json.timestamp}}

[View Workflow](https://your-n8n.com/workflow/{{$workflow.id}})

Tags: error|monitoring|{{$json.errorType}}

Advanced Usage

Using Expressions

All text fields support n8n expressions:

// Dynamic title
Title: {{$workflow.name}} - {{$json.status}}

// Conditional content
Content: {{$json.success ? '✅ Success' : '❌ Failed'}}

// Date formatting
Title: Report for {{$now.format('YYYY-MM-DD')}}

// Loop data
Content: Processed {{$json.items.length}} items

Error Handling

Enable Continue on Fail in node settings to handle errors gracefully:

{
  "error": "Invalid SendKey format",
  "sendKey": "invalid-key"
}

Troubleshooting

Node not appearing in n8n

  1. Restart n8n after installation
  2. Check installation: npm list n8n-nodes-serverchan
  3. Clear browser cache

"No recipients" error

  • Ensure at least one SendKey is provided (credential or manual)
  • Check credential JSON format
  • Verify SendKey format: sctp[UID]t[KEY] (e.g., sctp12345tABCDEF)

Credential errors

  • Check JSON syntax (must be valid JSON array)
  • Each object must have name and sendKey fields
  • Use empty array [] if no recipients configured

Messages not received

  1. Verify SendKey format at https://sc3.ft07.com/sendkey
  2. Ensure SendKey follows the format: sctp[UID]t[KEY]
  3. Check ServerChan3 service status
  4. Review message content (title required, max limits)

Requirements

  • n8n version: 0.200.0 or higher
  • Node.js version: 18.0.0 or higher

Changelog

v3.0.0 (Latest)

  • 🎉 ServerChan3 Support: Migrated to ServerChan3 API (app push notifications)
  • 🆔 Auto UID Extraction: UID is automatically extracted from SendKey (format: sctp[UID]t[KEY])
  • 🔗 Smart Routing: Automatically routes to ServerChan3 or Turbo based on SendKey format
  • 🔄 Backward Compatible: Still supports legacy SendKey format for ServerChan Turbo
  • 📚 Documentation Update: Updated all links to ServerChan3 documentation

v2.0.0

  • 🎉 New architecture: Separated into ServerChan Key + ServerChan Send nodes
  • 🚀 Zero dependencies: Removed runtime dependencies
  • 🎯 Smart delimiters: Support multiple input formats
  • 🏷️ Dynamic subtitle: Shows recipient count in real-time
  • 🛡️ Better error handling: Detailed error messages for credentials
  • 📝 Improved UX: Added usage hints and clearer field descriptions

v1.0.0

  • Initial release with basic ServerChan integration

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/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

MIT © Libukai


Support


Related Links

Note

ServerChan3 focuses on app push notifications. If you need WeChat, DingTalk, Feishu, or webhook channels, please use ServerChan Turbo instead (v2.x of this package).


中文说明

简介

n8n 社区节点,用于通过 Server酱3 发送App推送通知,支持灵活的密钥管理和批量发送。


功能特性

  • 🔑 双节点架构:密钥管理与消息发送分离
  • 💾 灵活的密钥管理:凭据保存或手动输入
  • 🚀 批量发送:一次工作流发送给多个接收者
  • 🔄 自动去重:自动删除重复的 SendKey
  • 📝 Markdown 支持:富文本格式的消息内容
  • 🏷️ 标签和元数据:为消息添加标签和简短描述
  • 🎯 智能分隔符:支持换行、逗号、分号、空格分隔
  • 零依赖:无运行时依赖,轻量快速
  • 🌐 表达式支持:使用 n8n 表达式的动态内容
  • 🛡️ 错误处理:优雅的错误处理和详细反馈

安装方法

自托管 n8n

方法 1:通过 npm(推荐)

# 进入 n8n 安装目录
cd ~/.n8n

# 安装包
npm install n8n-nodes-serverchan

# 重启 n8n

方法 2:通过 n8n 社区节点 UI

  1. 进入 设置社区节点
  2. 点击 安装社区节点
  3. 输入 n8n-nodes-serverchan
  4. 点击 安装

方法 3:通过 Docker

# 进入 n8n 容器
docker exec -it n8n sh

# 安装包
cd /root/.n8n
npm install n8n-nodes-serverchan

# 退出并重启容器
exit
docker restart n8n

n8n Cloud

此节点可通过 n8n Cloud 的社区节点功能安装。


快速开始

1. 获取 SendKey

访问 https://sc3.ft07.com/sendkey 获取你的 ServerChan3 SendKey。

SendKey 格式: sctp[UID]t[密钥] (例如:sctp12345tABCDEF)

  • UID 会自动从 SendKey 中提取
  • 无需单独配置 UID

2. 选择工作流模式

本包提供两个节点协同工作:

| 节点 | 用途 | 使用方式 | |------|------|----------| | ServerChan Key | 管理和准备 SendKey | 从凭据选择或手动输入 | | ServerChan Send | 发送消息 | 从 Key 节点接收 SendKey |

推荐工作流:

[ServerChan Key] → [ServerChan Send]
   准备密钥           发送消息

节点参考

ServerChan Key(密钥管理节点)

管理和准备 SendKey 用于批量发送。

配置

凭据(可选):

  • ServerChan API:JSON 格式的预配置接收者

参数:

  • Select Recipients:从保存的凭据中选择(多选)
  • Manual SendKeys:直接输入 SendKey(支持多种分隔符)

支持的输入格式

# 换行分隔(推荐)
sctp12345tXXXXXX
sctp67890tYYYYYY

# 逗号分隔
sctp12345tXXXXXX, sctp67890tYYYYYY

# 空格分隔
sctp12345tXXXXXX sctp67890tYYYYYY

# 分号分隔
sctp12345tXXXXXX; sctp67890tYYYYYY

# 混合(都可以!)
sctp12345tXXXXXX, sctp67890tYYYYYY
sctp11111tZZZZZZ

输出

每个 SendKey 生成一个项目:

[
  { "sendKey": "sctp12345tXXXXXX" },
  { "sendKey": "sctp67890tYYYYYY" }
]

ServerChan Send(发送节点)

通过 ServerChan API 发送消息。

配置

参数:

  • SendKey(必填):默认为上一节点的 {{$json.sendKey}},格式:sctp[UID]t[密钥] - UID 会自动提取
  • Title(必填):消息标题(最多 32 字符)
  • Content(可选):支持 Markdown 的消息内容(最多 32KB)
  • Short Description(可选):消息卡片的简短描述
  • Tags(可选):用 | 分隔的消息标签

配置示例

SendKey: {{$json.sendKey}}  (从 ServerChan Key 自动填充,例如 sctp12345tXXXXXX)
Title: 工作流完成
Content: **成功!** 你的工作流在 {{$now}} 完成
Short: 自动化通知
Tags: n8n|自动化|成功

注意:UID(本例中的 12345)会自动从 SendKey 中提取并用于构建 API 端点。


凭据设置(可选)

对于常用接收者,创建 ServerChan API 凭据:

  1. 进入 凭据新建凭据
  2. 搜索 ServerChan API
  3. 配置接收者(JSON 格式):
[
  {
    "name": "张三",
    "sendKey": "sctp12345tXXXXXX"
  },
  {
    "name": "李四",
    "sendKey": "sctp67890tYYYYYY"
  },
  {
    "name": "运维团队",
    "sendKey": "sctp11111tZZZZZZ"
  }
]
  1. 保存凭据

注意:SendKey 格式为 sctp[UID]t[密钥]。发送消息时会自动提取 UID。

优势:

  • 可跨工作流重复使用
  • 易于管理接收者
  • 清晰的命名便于组织

使用示例

示例 1:简单通知(手动 SendKey)

工作流:

[定时触发器] → [ServerChan Key] → [ServerChan Send]

ServerChan Key:

Manual SendKeys: sctp12345tXXXXXX

ServerChan Send:

Title: 每日报告
Content: 今日摘要已准备好!

示例 2:批量通知(多个接收者)

工作流:

[Webhook] → [ServerChan Key] → [ServerChan Send]

ServerChan Key:

Select Recipients: 张三 (sctp12345t...), 李四 (sctp67890t...), 运维团队 (sctp11111t...)

ServerChan Send:

Title: 警报:服务器宕机
Content: ## 紧急
服务器 `{{$json.serverName}}` 无响应。

**时间:** {{$now}}
**状态:** {{$json.status}}

请立即检查。

Tags: 警报|紧急|服务器

示例 3:动态接收者(凭据 + 手动)

工作流:

[HTTP 请求] → [ServerChan Key] → [ServerChan Send]

ServerChan Key:

Select Recipients: 张三, 李四  (来自凭据)
Manual SendKeys: sctp99999tTEMPKEY  (临时接收者)

ServerChan Send:

Title: {{$json.eventName}}
Content: 事件详情:{{$json.description}}
Short: {{$json.summary}}
Tags: 事件|{{$json.category}}

示例 4:错误监控

工作流:

[错误触发器] → [代码] → [ServerChan Key] → [ServerChan Send]

代码节点(处理错误):

return {
  errorType: $input.item.json.error.name,
  errorMessage: $input.item.json.error.message,
  workflowName: $workflow.name,
  timestamp: new Date().toISOString()
};

ServerChan Send:

Title: ⚠️ 工作流错误:{{$json.workflowName}}
Content: ## 错误详情
**类型:** {{$json.errorType}}
**消息:** {{$json.errorMessage}}
**时间:** {{$json.timestamp}}

[查看工作流](https://your-n8n.com/workflow/{{$workflow.id}})

Tags: 错误|监控|{{$json.errorType}}

高级用法

使用表达式

所有文本字段都支持 n8n 表达式:

// 动态标题
Title: {{$workflow.name}} - {{$json.status}}

// 条件内容
Content: {{$json.success ? '✅ 成功' : '❌ 失败'}}

// 日期格式化
Title: {{$now.format('YYYY-MM-DD')}} 的报告

// 循环数据
Content: 已处理 {{$json.items.length}} 项

错误处理

在节点设置中启用失败时继续以优雅地处理错误:

{
  "error": "SendKey 格式无效",
  "sendKey": "invalid-key"
}

常见问题

节点未出现在 n8n 中

  1. 安装后重启 n8n
  2. 检查安装:npm list n8n-nodes-serverchan
  3. 清除浏览器缓存

"没有接收者"错误

  • 确保至少提供一个 SendKey(凭据或手动)
  • 检查凭据 JSON 格式
  • 验证 SendKey 格式:sctp[UID]t[密钥](例如:sctp12345tABCDEF

凭据错误

  • 检查 JSON 语法(必须是有效的 JSON 数组)
  • 每个对象必须有 namesendKey 字段
  • 如果没有配置接收者,使用空数组 []

未收到消息

  1. https://sc3.ft07.com/sendkey 验证 SendKey 格式
  2. 确保 SendKey 遵循格式:sctp[UID]t[密钥]
  3. 检查 ServerChan3 服务状态
  4. 检查消息内容(标题必填,注意最大限制)

系统要求

  • n8n 版本:0.200.0 或更高
  • Node.js 版本:18.0.0 或更高

更新日志

v3.0.0(最新)

  • 🎉 ServerChan3 支持:迁移至 ServerChan3 API(App 推送通知)
  • 🆔 自动提取 UID:从 SendKey 自动提取 UID(格式:sctp[UID]t[密钥]
  • 🔗 智能路由:根据 SendKey 格式自动路由到 ServerChan3 或 Turbo
  • 🔄 向后兼容:仍支持 ServerChan Turbo 的旧版 SendKey 格式
  • 📚 文档更新:所有链接更新为 ServerChan3 文档

v2.0.0

  • 🎉 新架构:分离为 ServerChan Key + ServerChan Send 节点
  • 🚀 零依赖:移除运行时依赖
  • 🎯 智能分隔符:支持多种输入格式
  • 🏷️ 动态副标题:实时显示接收者数量
  • 🛡️ 更好的错误处理:凭据的详细错误消息
  • 📝 改进的 UX:添加使用提示和更清晰的字段描述

v1.0.0

  • 初始发布,基本 ServerChan 集成

贡献

欢迎贡献!请随时提交 Pull Request。

  1. Fork 仓库
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 开启 Pull Request

许可证

MIT © Libukai


支持


相关链接

注意

Server酱3 专注于 App 推送通知。如果你需要微信、钉钉、飞书或 Webhook 渠道,请使用 Server酱 Turbo(本包的 v2.x 版本)。


Made with ❤️ for n8n community