节点代码库文件(Node codex files)#
codex 文件包含关于你的节点的元数据。此文件是位于节点根目录下的 JSON 文件。例如,在 n8n 入门示例中 HttpBin.node.json 文件。
🌐 The codex file contains metadata about your node. This file is the JSON file at the root of your node. For example, the HttpBin.node.json file in the n8n starter.
编目文件名必须与节点基础文件名匹配。例如,给定一个名为 MyNode.node.ts 的节点基础文件,编目文件应命名为 MyNode.node.json。
🌐 The codex filename must match the node base filename. For example, given a node base file named MyNode.node.ts, the codex would be named MyNode.node.json.
| 参数 | 描述 |
|---|---|
node |
包含节点名称。必须以 n8n-nodes-base. 开头。例如,n8n-nodes-base.openweatherapi。 |
nodeVersion |
节点版本。此值应与主节点文件中的 version 参数相同。例如,"1.0"。 |
codexVersion |
编解码文件版本。目前的版本是 "1.0"。 |
categories |
categories 数组中的设置决定 n8n 在 GUI 中将你的节点添加到哪个类别。更多信息请参见 节点类别。 |
resources |
resources 对象包含指向你的节点文档的链接。n8n 会在 GUI 中自动为凭证和节点添加帮助链接。 |
节点类别(Node categories)#
你可以在节点配置 JSON 中定义一个或多个类别。这可以帮助 n8n 将节点放在节点面板中的正确类别下。
🌐 You can define one or more categories in your node configuration JSON. This helps n8n put the node in the correct category in the nodes panel.
选择以下类别:
🌐 Choose from these categories:
- 数据与存储
- 财务与会计
- 市场营销与内容
- 生产力
- 其他
- 销售
- 开发
- 分析
- 通信
- 实用程序
您必须匹配语法。例如,Data & Storage而不是data and storage。
🌐 You must match the syntax. For example, Data & Storage not data and storage.