Skip to content

Model Update

Type key: model_update_node
Group: Data
Category: data
Tier: CORE

The Model Update node creates, updates, or upserts Eloquent model records. Field values can be static or dynamically derived from upstream node data using {{tag}} syntax.

Handles

HandleDirectionDescription
inputInputReceives data from the preceding node
outputOutputEmits the affected record(s)

Configuration

FieldTypeDefaultDescription
modelstring""Fully-qualified Eloquent model class
operationenumupdateOperation to perform: create, update, upsert
identifier_fieldstringidColumn used to find the record (for update/upsert)
identifier_valuestring{{id}}Value of the identifier column; supports {{tags}}
field_mappingarray[]Array of field assignment objects

Field Mapping Object

json
{
    "field": "status",
    "value": "published"
}

Both field and value support {{tags}}:

json
{
    "field": "content",
    "value": "{{ai_response.translated_content}}"
}

Operations

create

Creates a new record with the configured field mapping. The identifier_field and identifier_value are not used.

yaml
Operation: create
Field Mapping:
  - field: name,    value: {{input.name}}
  - field: email,   value: {{input.email}}
  - field: status,  value: active

update

Finds an existing record by identifier_field = identifier_value and updates it.

yaml
Operation: update
Identifier Field: id
Identifier Value: {{input.id}}
Field Mapping:
  - field: status,     value: reviewed
  - field: reviewed_at, value: {{now}}

upsert

Creates the record if it does not exist; updates it if it does. Uses identifier_field as the uniqueness constraint.

yaml
Operation: upsert
Identifier Field: email
Identifier Value: {{input.email}}
Field Mapping:
  - field: name,       value: {{input.name}}
  - field: last_seen,  value: {{now}}

Output

The node emits the affected record as a flat array:

json
{
    "id": 42,
    "name": "Alice",
    "status": "published",
    "updated_at": "2025-03-16T10:00:00Z"
}

Example: AI Content Pipeline

[Schedule Trigger]


[Data Model]  ←── fetch articles WHERE status = 'draft'


[For Each]


[HTTP Request]  ←── POST to OpenAI: review and improve content


[Transform]  ←── extract { improved_content } from AI response


[Model Update]
  Operation:         update
  Identifier Field:  id
  Identifier Value:  {{input.id}}
  Field Mapping:
    - content:    {{improved_content}}
    - status:     published
    - reviewed_at: {{now}}

Notes

  • The model must be registered in Model Integrations to appear in the selector
  • {{tags}} in identifier_value are resolved against the full execution context before the query runs
  • For bulk updates (updating many records at once), use the PHP Code node with Eloquent's whereIn for efficiency
  • The upsert operation uses Laravel's updateOrCreate() method under the hood

Proprietary software — source-available. All rights reserved.