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-to-wps

v1.1.0

Published

n8n节点,用于将数据发送到WPS多维表

Readme

n8n WPS多维表发送节点

这是一个n8n工作流节点,用于将数据发送到WPS多维表。该节点基于原有的Python版本MySQL到WPS数据发送功能开发,提供了更加通用和灵活的数据发送能力。

功能特性

  • 通用数据发送: 支持任何JSON格式的数据输入,不仅限于MySQL查询结果
  • 批量处理: 支持大批量数据分批发送,避免API超时
  • 字段映射: 支持自定义字段映射,灵活匹配WPS多维表列名
  • 错误重试: 内置重试机制,提高数据传输成功率
  • 超时控制: 可配置请求超时时间
  • 详细日志: 提供详细的发送结果和统计信息

安装方法

方法1:npm安装

npm install n8n-nodes-to-wps

方法2:本地开发安装

cd to_wps
npm install
npm run build

然后在n8n的社区节点设置中安装构建好的包,或者通过以下命令链接到本地n8n实例:

npm link
# 然后在n8n目录中运行
npm link n8n-nodes-to-wps

使用方法

基本工作流示例

  1. MySQL查询节点WPS多维表发送节点
MySQL查询 -> 数据处理 -> WPS多维表发送

节点配置参数

必需参数

  • WPS API地址: AirScript脚本的API调用地址
  • 多维表名称: 要写入的WPS多维表名称
  • WPS AirScript Token: 在凭证中配置的访问令牌

可选参数

  • 批次大小: 每批次发送的数据条数(默认:20000)
  • 超时时间: API请求超时时间,单位秒(默认:120)
  • 数据字段映射: 自定义输入字段到WPS列名的映射,参考wps_to_mysql节点中的字段映射方式
    • 格式: "sourceDataField": '字段1','字段2','字段3','字段4' "targetDataField": 'WPS列名1','WPS列名2','WPS列名3','WPS列名4'

    • 示例: "sourceDataField": '日期','商品SKU码','商品名称','价格','库存数量' "targetDataField": '数据日期','商品SKU码','商品名称','价格','库存数量'

输入数据格式

节点接受标准的n8n JSON数据格式,可以是:

  1. MySQL查询结果: 直接连接MySQL节点的输出
  2. API响应数据: 任何JSON格式的数据
  3. 手动构造数据: 通过代码节点构造的数据

示例输入数据:

[
  {
    "日期": "2023-12-01",
    "商品SKU码": "SKU789012",
    "商品名称": "测试商品",
    "价格": 99.99,
    "库存数量": 100
  }
]

输出数据格式

节点返回发送结果的详细信息:

{
  "success": true,
  "message": "成功发送 3/3 批次数据到WPS多维表",
  "data_count": 15000,
  "batch_count": 3,
  "success_batch_count": 3,
  "duration": 45.2,
  "sheet_name": "商品信息"
}

错误处理

节点内置了完善的错误处理机制:

  1. 网络错误: 自动重试,指数退避
  2. API错误: 返回详细的错误信息
  3. 数据格式错误: 提供清晰的错误提示
  4. 超时处理: 可配置的超时时间和重试机制

性能优化建议

  1. 批次大小: 根据网络环境和数据量调整,建议5000-20000条
  2. 并发控制: 避免同时运行多个大数据量任务
  3. 数据预处理: 在发送前过滤无效数据
  4. 监控日志: 关注发送时间和成功率统计

故障排除

常见问题

  1. Token无效: 检查AirScript Token是否正确
  2. API地址错误: 确认API地址是否为完整的同步任务地址
  3. 数据格式问题: 检查输入数据是否为有效的JSON格式
  4. 网络超时: 增加超时时间或减少批次大小

调试方法

  1. 使用较小的测试数据集
  2. 启用n8n的调试模式
  3. 检查节点的详细输出信息
  4. 查看WPS AirScript脚本的执行日志

更新日志

v1.0.0

  • 初始版本发布
  • 支持基本的数据发送功能
  • 支持批次处理和重试机制
  • 支持字段映射功能