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-workflow-manager

v1.4.7

Published

Powerful tool for n8n to batch manage workflows, sync across instances, and deep-clean data to avoid 400 errors.

Readme

n8n-nodes-workflow-manager

npm version n8n community node

这是一个强大的 n8n 社区节点,专门为解决大规模工作流管理跨实例环境同步而设计。它不仅支持批量操作,更通过独有的“极致字段脱敏”技术,彻底解决了 n8n 原生 API 在同步和导入时常见的 400 校验错误。

✨ 核心亮点

  • 🔄 全能同步 (Power Sync):支持 Push、Pull、Bidirectional 三种模式,在不同 n8n 实例(如 Dev、Staging、Prod)之间无缝拉取或推送工作流。
  • 智能批量导入 (Smart Batch Import)
    • 自动识别 n8n 官方导出文件格式及多工作流数组。
    • 支持文件夹级别的 JSON 合并导入。
    • 三种冲突策略:跳过 (Skip)、覆写 (Overwrite)、创建副本 (Duplicate)。
  • 🧹 极致字段脱敏 (Deep Clean)
    • 自动洗白:导入/同步前自动移除 versionIdtriggerCountsharedupdatedAt 等 API 不允许的干扰字段。
    • Settings 保护:深层过滤 settings 字典中的非法属性(如执行顺序等),仅保留 100% 安全的核心设置。
    • 自产自销:确保从一个实例导出的 JSON 可以毫无阻碍地导入到任何其他实例。
  • 🔍 灵活筛选 (Flexible Filter):支持按标签 (Tags)、激活状态、指定 ID 等多种维度批量导出工作流。
  • 🛡️ 安全脱敏:可选择在导出时自动移除凭证名,保护敏感信息。

🚀 快速开始

安装

在你的 n8n 实例中运行:

npm install n8n-nodes-workflow-manager

或者在 n8n 的 Settings > Community Nodes 中搜索 n8n-nodes-workflow-manager 进行安装。

使用场景

  1. 多环境部署:在本地开发完成后,通过 Sync 操作一键将指定标签的工作流推送到生产服务器。
  2. 定期备份:配合 Cron 节点,定期通过 Batch Export 获取所有工作流详情并上传到 GitHub 或 S3。
  3. 快速迁移:直接将备份实例的 JSON 库通过 Batch Import 恢复到新实例,全过程零报错。

🛠️ 配置说明

节点包含一个名为 n8nApi 的凭证:

  • Base URL: 你的 n8n 实例地址 (例如 http://localhost:5678)
  • API Key: 在 n8n 的 Settings > API 中生成的有效密钥。

⚠️ 注意事项

  • 标签处理:跨实例同步时,为了保证 100% 成功率,本插件目前会移除工作流的 tags 属性。这是因为不同实例的标签 ID 往往不一致,会导致 API 校验失败。
  • 版本要求:建议 n8n 版本 >= 1.0.0。

📄 开源协议

MIT


💡 使用示例 (Usage Demo)

场景一:批量备份工作流 (Batch Export)

将此节点连接到 CronManual 触发器后,可以一次性导出所有(或筛选后的)工作流数据。

节点配置:

  • Resource: Workflow
  • Operation: Batch Export
  • Filters: 可选。例如勾选 Active 只导出激活的工作流,或按 Tag IDs 导出特定标签的工作流。
  • Output Format:
    • One Entry per Workflow (默认): 每个工作流作为独立的 Item 输出,适合后续进行文件分割保存。
    • Single JSON: 作为一个大 JSON 数组输出,适合存为单个备份文件。

后续操作建议:

  • 连接 Convert to File 节点:将 JSON 转为二进制文件。
  • 连接 Local File Trigger / AWS S3 / Git 节点:保存备份文件。

场景二:批量导入/迁移工作流 (Batch Import)

用于将备份文件恢复到新实例,或将从社区下载的多个工作流一次性导入。

节点配置:

  • Resource: Workflow
  • Operation: Batch Import
  • Import Source:
    • JSON Text: 直接将导出的 JSON 内容(例如从其他实例导出的工作流数组)粘贴到这里。
    • Input Data: 从上游节点(如 Read Binary File -> Spreadsheet File)获取 JSON 对象。
  • Conflict Strategy:
    • Duplicate: 创建副本(推荐,避免覆盖)。
    • Overwrite: 覆盖同名/同 ID 工作流。
    • Skip: 跳过已存在的工作流。

✅ 核心优势: 此节点在导入时会自动执行深度清理,解决常见的 "node type not known""Referenced node doesn't exist" 错误。如果原工作流中引用了不存在的节点,插件会自动创建占位节点以确保导入成功。

场景三:工作流 JSON 示例

以下是一个标准的导出格式示例,你可以直接复制并通过 Batch Import 导入测试:

import

{
  "name": "import",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [-400, -64],
      "id": "d64d8a69-319c-4c89-943b-88f8049d4c2f",
      "name": "When clicking ‘Execute workflow’"
    },
    {
      "parameters": {
        "operation": "batchImport",
        "importSource": "jsonText"
      },
      "type": "n8n-nodes-workflow-manager.workflowManager",
      "typeVersion": 1,
      "position": [-192, -64],
      "id": "83e18704-2fe5-4619-9e23-24ad0c7117ca",
      "name": "批量导入工作流",
      "credentials": {
        "n8nApi": {
          "id": "AXrbN17qW6ykloui",
          "name": "n8n account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "批量导入工作流",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "2e0ed612-de6b-4f0b-963d-741d5158809c",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "2d4d9e1f3cb1a0d65ddc04cdd95a68ba1d8090af7ecd85af941529f97903549b"
  },
  "id": "h4d6ir7v83o7rRKd",
  "tags": []
}

export

{
  "name": "export",
  "nodes": [
    {
      "parameters": {},
      "id": "476ab5a8-6eb9-4f4e-89b4-30ba4054313b",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [-160, -224]
    },
    {
      "parameters": {},
      "id": "ae5ec1bc-2612-4b76-88ec-ec26ed6219c7",
      "name": "批量导出工作流",
      "type": "n8n-nodes-workflow-manager.workflowManager",
      "typeVersion": 1,
      "position": [64, -224],
      "credentials": {
        "n8nApi": {
          "id": "AXrbN17qW6ykloui",
          "name": "n8n account"
        }
      }
    },
    {
      "parameters": {
        "operation": "toJson",
        "options": {
          "fileName": "workflows.json"
        }
      },
      "id": "a9d01e48-2d02-4f5b-b03b-d158e69ede9a",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [288, -224]
    }
  ],
  "pinData": {},
  "connections": {
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "index": 0,
            "node": "批量导出工作流",
            "type": "main"
          }
        ]
      ]
    },
    "批量导出工作流": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false
  },
  "versionId": "61fcfe8a-5c3b-4a66-81d6-67425aef6a68",
  "meta": {
    "instanceId": "2d4d9e1f3cb1a0d65ddc04cdd95a68ba1d8090af7ecd85af941529f97903549b"
  },
  "id": "VGeoKK3nOUFQ5lje",
  "tags": []
}

Made with ❤️ for the n8n community.