app:record:insert
Inserts a new record into a schema table and returns the persisted record
Options
| Name | Type | Description |
|---|---|---|
org_id | string | The organization ID that scopes the operation |
user_id | string | The caller's user ID recorded in the record history |
schema | string | The name of the schema (database) that contains the table |
table | string | The name of the table to insert the record into |
record | Record | The key-value data to insert |
Outputs
| Name | Type | Description |
|---|---|---|
record | Record | The newly inserted record as persisted in the database |
Example
name: Insert a record
actions:
- name: inserted
component: app:record:insert
vars:
org_id: "{{ var.org_id }}"
user_id: "{{ var.user_id }}"
schema: content
table: articles
record:
title: "Hello world"
body: "The first post."
status: draft
outputs:
article: "{{ inserted.record }}"