Login
Free Sign Up
Docs
/

Object - Create

Type identifier: object:create Category: Object Operations

Description

Creates a new Record in a specified Schema. The created Record can be queried or modified by subsequent nodes in the Flow.

Input Handles

Handle

Data Type

Required

Description

trigger

trigger

Yes

Run trigger input

data

Target Schema

Yes, root-input mode

Full object or scalar value

Property path

Target Schema property

Yes, for each selected property

One input per configured Schema path

Input Handle Details

Dynamic Property Handles

Property input handles are dynamically generated from selectedProperties. Each handle ID is the selected Schema path joined with dots. A property with ID Pname has handle Pname; a nested path such as Paddress.Pcity has handle Paddress.Pcity.

  • Type: Matches the Schema field type for each property
  • Notes:

    • Handle types are inferred from the target Schema's field definitions
    • Every configured property handle is required to be connected
    • Properties not selected as inputs use Schema defaults or remain null

When useRootInput is enabled, the selected-property inputs are replaced by one required data input. Schemas of type object can also be created from selected-property inputs.

Output Handles

Handle

Data Type

Description

success

trigger

Emitted on successful Record creation

error

trigger

Emitted when a handleable creation failure occurs

object

Schema object

The created Record, including standard Record fields

Output Handle Details

object

  • Type: object matching the target Schema structure
  • Notes: Contains the created Record's Schema properties and standard fields such as id, schemaId, createdAt, and createdById. object.id holds the new Record ID for later nodes.

Configuration Options

Property

Type

Required

Default

Description

label

string

Yes

"Object - Create"

Display label for the node

schemaId

string

Yes

""

CUID2 identifier of the target Schema

selectedProperties

array

No

[]

Schema paths for property input handles

useRootInput

boolean

No

false

Use one full-Schema data input instead of selected-property inputs

Configuration Details

schemaId

  • Type: string (CUID2 format, 25 characters)
  • Validation: Must be a valid CUID2 referencing an existing Schema in the current Space
  • Notes: Select the Schema from the Flow editor's Schema picker. The Schema must be accessible in the current Space.

selectedProperties

  • Type: Array of paths (each path is a string or an array of path segments)
  • Notes:

    • Each path identifies a property in the target Schema
    • Paths can be nested (for example, ["Paddress", "Pcity"] for Paddress.Pcity)
    • Properties not in this array won't have input handles
    • Configure via the node's property selector in the Flow editor

Behaviour

Execution Flow

  1. Node receives a trigger and either the full data value or all configured property values
  2. Missing object fields are filled from Schema defaults
  3. Input data is validated against the target Schema
  4. File references are checked before the Record is created
  5. The node emits the created object and the success control output

Success Path

When Record creation succeeds:

  • Output handle success is triggered
  • Output handle object contains the created Record, including its generated id

Error Path

When Record creation fails:

  • Expected input and file-context failures emit the error control output
  • Unexpected internal failures fail the run instead of emitting error
  • Schema-validation failures include each issue's property path and code, plus the expected type when available. The run inspector shows up to 20 issues with strings limited to 160 characters; input values and custom validation messages are not included.

Edge Cases

Scenario

Behaviour

Empty or unavailable schemaId

Error output when the Schema lookup fails

Unknown selected path

Error output; Record is not created

Missing required field or invalid value

Error output; Record is not created

Bare file reference, another Space, or another Flow run

Error output; Record is not created

Unexpected internal failure

The run fails

Examples

Create a Contact Record

Create a simple contact Record with name and email.

Configuration:

{
  "type": "object:create",
  "data": {
    "label": "Create Contact",
    "schemaId": "clx1234567890abcdefghij",
    "selectedProperties": [["Pname"], ["Pemail"]]
  }
}

Connected Inputs:

  • Pname ← "John Doe"
  • Pemail ← "john@example.com"

Outputs:

{
  "object": {
    "id": "clx9876543210zyxwvutsrq",
    "schemaId": "clx1234567890abcdefghij",
    "Pname": "John Doe",
    "Pemail": "john@example.com",
    "createdAt": "2024-01-15T10:30:00.000Z",
    "createdById": "space-identity-id"
  }
}

Create a Customer Record With Nested Properties

Create a Record with nested object properties.

Configuration:

{
  "type": "object:create",
  "data": {
    "label": "Create Customer",
    "schemaId": "clx1234567890abcdefghij",
    "selectedProperties": [
      ["Pname"],
      ["Paddress", "Pstreet"],
      ["Paddress", "Pcity"],
      ["Paddress", "Pcountry"]
    ]
  }
}

Connected Inputs:

  • Pname ← "Acme Corp"
  • Paddress.Pstreet ← "123 Main St"
  • Paddress.Pcity ← "New York"
  • Paddress.Pcountry ← "USA"

Related pages