飞书项目 icon

飞书项目

飞书项目管理 API 集成,支持工作项、空间、用户、工作流等完整功能

Actions75

工作项实例读写 → 批量更新工作项字段值

AI-generated

Overview

This node operation performs batch updates on work item fields within a specified project space in Feishu Project. It allows users to update multiple work items' field values simultaneously, supporting different update modes such as append, update (overwrite), and replace. This is useful for managing and modifying large sets of work items efficiently, for example, updating the status or assigned personnel of multiple tasks at once.

Use Case Examples

  1. Batch update the status field of multiple work items in a project space to 'In Progress'.
  2. Append additional personnel to the multi-select personnel field for a list of work items.
  3. Replace a specific field value with a new value across multiple work items.

Properties

Name Meaning
空间 The project space where the work items reside, identified by project_key. Can be selected from a list or entered manually.
工作项类型 Name or ID The type of work item within the selected project space. Must be chosen before updating fields. Options are loaded dynamically based on the selected space.
工作项ID列表 A comma-separated list or expression array of work item IDs to be updated. Maximum 50 IDs per request.
更新模式 The mode of update to apply to the field values. Options include APPEND (add to existing values), UPDATE (overwrite existing values), and REPLACE (replace specific values). Each mode supports different field types.
字段Key The key of the field to be updated. Only one field can be updated in a batch operation. Supported field types depend on the update mode.
被替换的字段值 The field value to be replaced, required only when update_mode is REPLACE. Provided in JSON format.
目标字段值 The target field value for the update operation, in JSON format. Can be empty to indicate deletion.
Options Additional options including batching settings (batch size and interval) and request timeout.

Output

JSON

  • id - The ID of the updated work item.
  • field_key - The key of the field that was updated.
  • status - The status of the update operation for each work item, indicating success or failure.
  • error - Error details if the update operation failed for a work item.

Dependencies

  • Feishu Project API with appropriate API key credentials

Troubleshooting

  • Ensure the project_key and work_item_type_key are correctly selected and valid before executing the batch update.
  • The maximum number of work item IDs per request is 50; exceeding this limit will cause errors.
  • When using REPLACE update mode, the 'before_field_value' must be provided in valid JSON format; otherwise, the operation will fail.
  • Timeout settings should be adjusted based on network conditions to avoid premature request abortion.
  • If the node throws a '未实现方法' (method not implemented) error, verify that the resource and operation parameters are correctly set and supported.

Links

Discussion