Docs
Tutorials
How-to guides
Reference
Explanation
Release notes
Search
Docs
/

Object - Remove

Type identifier: object:remove Category: Object Operations

Description

Removes Records that match filter criteria. Supports querying by any property and removes matching Records along with their relationships. Returns the removed Records for downstream processing.

Input Handles

Handle

Data Type

Required

Description

trigger

trigger

Yes

Initiates the remove operation

<variableId>

Varies

Varies

Dynamic handles for filter variables

Input Handle Details

Variable Handles

Input handles are dynamically generated based on the variables configuration:

  • Handle ID: Variable's id property
  • Type: Defined by the variable's type configuration
  • Notes:

    • Variables are used in filter expressions
    • Default variable is id for Record ID lookup

Output Handles

Handle

Data Type

Description

success

trigger

Triggered when removal succeeds

error

trigger

Triggered on any error

removed

object/array

The removed Record(s) with metadata

Output Handle Details

removed

  • Type: Object (if firstOnly) or Array (if multiple)
  • Includes:

    • All Record properties
    • id: Record ID
    • schemaId: Schema ID
    • createdAt: Creation timestamp
    • updatedAt: Last update timestamp
    • createdById: Creator ID
    • updatedById: Last updater ID
  • Notes: File entries are augmented with Record context

Configuration Options

Property

Type

Required

Default

Description

label

string

Yes

"Object - Remove"

Display label for the node

schemaId

string

Yes

""

CUID2 of the Schema to query

variables

array

No

ID variable

Variable definitions for filtering

filter

object

No

ID equals

Filter criteria for Record selection

firstOnly

boolean

No

true

Return single Record vs array

limit

number

No

1

Maximum Records to remove

offset

number

No

undefined

Skip N Records before removing

order

"asc" / "desc"

No

"desc"

Sort order for selection

orderBy

string

No

"createdAt"

Property to sort by

Configuration Details

variables

  • Type: array
  • Default: Single id variable with string type
  • Notes:

    • Each variable creates an input handle
    • Used to populate filter expressions
    • Built-in spaceIdentityId always available

filter

  • Type: object
  • Structure:

    {
      "path": "propertyName",
      "type": "property",
      "value": { "type": "contextValue", "valueId": "variableId" },
      "operator": "eq"
    }
  • Notes: Supports complex nested filters with AND/OR logic

Behaviour

V2 Execution

The node supports filters, ordering, offset, and limit. Removal is bounded to at most 1000 Records per execution; an omitted limit defaults to 1000 in v2 (the node's configured default remains 1). Offset must be a non-negative integer. A filter may be omitted, in which case the bounded page is removed.

firstOnly changes the shape of the removed output; it does not change how many Records are removed. The default limit of 1 therefore removes one Record unless a different limit is configured. With no matches, removed is null when firstOnly is enabled and an empty array otherwise. Configured filter variables must be connected; an unconnected variable routes to error without removing anything. Expected validation and authorization failures route to error; unexpected infrastructure failures fail the execution.

Error Handling

Scenario

Behaviour

Schema not found

Sets error result, triggers error

Invalid filter

Triggers error

Unexpected infrastructure error

Fails the execution; it does not emit the error control

Examples

Remove by ID

{
  "type": "object:remove",
  "data": {
    "label": "Remove User",
    "schemaId": "user-schema-uuid",
    "variables": [
      {
        "id": "id",
        "type": { "name": "id", "type": "string", "required": true }
      }
    ],
    "filter": {
      "path": "id",
      "type": "property",
      "value": { "type": "contextValue", "valueId": "id" },
      "operator": "eq"
    },
    "firstOnly": true,
    "limit": 1
  }
}

Remove by Status

{
  "type": "object:remove",
  "data": {
    "label": "Remove Expired Orders",
    "schemaId": "order-schema-uuid",
    "variables": [
      {
        "id": "status",
        "type": { "name": "status", "type": "string", "required": true }
      }
    ],
    "filter": {
      "path": "status",
      "type": "property",
      "value": { "type": "contextValue", "valueId": "status" },
      "operator": "eq"
    },
    "firstOnly": false,
    "limit": 100
  }
}

Remove With Complex Filter

{
  "type": "object:remove",
  "data": {
    "label": "Cleanup Old Records",
    "schemaId": "log-schema-uuid",
    "filter": {
      "type": "and",
      "filters": [
        {
          "path": "processed",
          "type": "property",
          "value": { "type": "literal", "value": true },
          "operator": "eq"
        },
        {
          "path": "createdAt",
          "type": "property",
          "value": { "type": "contextValue", "valueId": "cutoffDate" },
          "operator": "lt"
        }
      ]
    },
    "firstOnly": false,
    "order": "asc",
    "orderBy": "createdAt"
  }
}

Related pages

Page not found. It may have moved or may not be published.
Browse documentation