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
| Handle | Direction | Description |
|---|---|---|
input |
Input | Receives data from the preceding node |
output |
Output | Emits the affected record(s) |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
model |
string | "" |
Fully-qualified Eloquent model class |
operation |
enum | update |
Operation to perform: create, update, upsert |
identifier_field |
string | id |
Column used to find the record (for update/upsert) |
identifier_value |
string | {{id}} |
Value of the identifier column; supports {{tags}} |
field_mapping |
array | [] |
Array of field assignment objects |
Field Mapping Object
{
"field": "status",
"value": "published"
}
Both field and value support {{tags}}:
{
"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.
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.
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.
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:
{
"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}}inidentifier_valueare 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
whereInfor efficiency - The
upsertoperation uses Laravel'supdateOrCreate()method under the hood