Skip to content

聚合#

¥Aggregate

使用聚合节点,将单独的项目或其部分组合成单独的项目。

¥Use the Aggregate node to take separate items, or portions of them, and group them together into individual items.

节点参数#

¥Node parameters

要开始使用该节点,请选择你要使用的聚合:

¥To begin using the node, select the Aggregate you'd like to use:

¥Individual Fields: Aggregate individual fields separately.

¥All Item Data: Aggregate all item data into a single list.

单个字段#

¥Individual Fields

  • 输入字段名称:输入要聚合在一起的输入数据字段名称。

¥Input Field Name: Enter the name of the field in the input data to aggregate together.

  • 重命名字段:此开关控制是否在聚合输出数据中为该字段指定不同的名称。启用此选项可添加不同的字段名称。如果你要聚合多个字段,则必须提供新的输出字段名称。无法将多个字段设为未定义。

¥Rename Field: This toggle controls whether to give the field a different name in the aggregated output data. Turn this on to add a different field name. If you're aggregating multiple fields, you must provide new output field names. You can't leave multiple fields undefined.

  • 输出字段名称:启用“重命名字段”后,将显示此字段。输入聚合输出数据的字段名称。

    ¥Output Field Name: This field is displayed when you turn on Rename Field. Enter the field name for the aggregated output data.

请参阅 节点选项 获取更多配置选项。

¥Refer to Node options for more configuration options.

所有项目数据#

¥All Item Data

  • 输出字段:输入用于输出数据的字段名称。

¥Put Output in Field: Enter the name of the field to output the data in.

  • 包含:选择要包含在输出中的字段。选择以下选项:

¥Include: Select which fields to include in the output. Choose from:

  • 所有字段:输出包含所有字段的数据,不包含其他参数。

    ¥All fields: The output includes data from all fields with no further parameters.

  • 指定字段:如果你选择此选项,请在“要包含的字段”参数中输入以逗号分隔的字段列表,这些字段的数据将从输出中包含。输出将仅包含此列表中的字段。

    ¥Specified Fields: If you select this option, enter a comma-separated list of fields the output should include data from in the Fields To Include parameter. The output will include only the fields in this list.

  • 除以下情况外的所有字段:如果你选择此选项,请在“要排除的字段”参数中输入以逗号分隔的字段列表,这些字段的数据将从输出中排除。输出将包含此列表中未包含的所有字段。

    ¥All Fields Except: If you select this option, enter a comma-separated list of fields the output should exclude data from in the Fields To Exclude parameter. The output will include all fields not in this list.

请参阅 节点选项 获取更多配置选项。

¥Refer to Node options for more configuration options.

节点选项#

¥Node options

你可以使用以下选项进一步配置此节点:

¥You can further configure this node using these Options:

  • 禁用点号表示法:当你选择“单个字段”聚合时,该节点会显示此切换开关。它控制是否禁止在字段名中使用 parent.child 引用子字段(已启用),或允许(已禁用,默认)。

¥Disable Dot Notation: The node displays this toggle when you select the Individual Fields Aggregate. It controls whether to disallow referencing child fields using parent.child in the field name (turned on), or allow it (turned off, default).

  • 合并列表:当你选择“单个字段”聚合时,该节点会显示此切换开关。如果要聚合的字段是列表,并且你希望输出单个扁平列表而不是列表的列表,请开启此选项。

¥Merge Lists: The node displays this toggle when you select the Individual Fields Aggregate. Turn it on if the field to aggregate is a list and you want to output a single flat list rather than a list of lists.

  • 包含二进制文件:该节点对两种聚合类型均显示此切换开关。如果你希望在新输出中包含输入中的二进制数据,请开启此选项。

¥Include Binaries: The node displays this toggle for both Aggregate types. Turn it on if you want to include binary data from the input in the new output.

  • 保留缺失值和空值:当你选择“单个字段”聚合时,该节点会显示此切换开关。如果输入中存在空值或缺失值,请开启此选项以在输出列表中添加一个空(null)条目。如果关闭此选项,则输出将忽略空值或 null 值。

¥Keep Missing And Null Values: The node displays this toggle when you select the Individual Fields Aggregate. Turn it on to add a null (empty) entry in the output list when there is a null or missing value in the input. If turned off, the output ignores null or empty values.

模板和示例#

¥Templates and examples

Template widget placeholder.

相关资源#

¥Related resources

Learn more about data structure and data flow in n8n workflows.