Magidoc

bulkUpdateActionCustomFields
Mutation

Updates a custom field value for multiple actions at once.

This mutation allows you to set or clear the value of a custom field across multiple actions. You must first call getCustomFields to retrieve available custom fields and their types for the workspace.

Important: Use only ONE value parameter based on the custom field type:

Custom Field Type
Parameter to Use
Value Format
text
value
Any string value
number
numberValue
Any numeric value (float)
date
dateValue
ISO 8601 date string (e.g., "2024-01-15T00:00:00.000Z")
select
selectedValues
Array of dropdown option strings (e.g., ["Option 1", "Option 2"])
user
selectedValues
Array of user IDs (e.g., ["userId123", "userId456"])
project
selectedValues
Array of project IDs (e.g., ["projectId123"])

To clear a custom field value: Pass null or an empty value for the corresponding parameter.

Access: Requires user access to all specified actions

Returns: Array of updated Action objects with the new custom field values

Errors:

  • Throws error if user doesn't have access to any of the actions
  • Throws error if custom field doesn't exist
  • Throws error if value type doesn't match the custom field type

Arguments

#

actionIds

[ID !]!
Non-null

Array of action IDs to update the custom field for

workspaceId

ID !
Non-null

The workspace ID that contains the actions

fieldId

ID !
Non-null

The ID of the custom field to update (get this from getCustomFields query)

value

Text value - use ONLY for 'text' type custom fields

selectedValues

Array of selected values - use for 'select', 'user', or 'project' type custom fields. For 'select' type: pass the dropdown option strings. For 'user' type: pass an array of user IDs. For 'project' type: pass an array of project IDs.

dateValue

Date value - use ONLY for 'date' type custom fields. Pass ISO 8601 format.

numberValue

Numeric value - use ONLY for 'number' type custom fields

Response

#

Returns [Action !]!.

Example

#