DocsWorkflowsComponentsAppapp:record:insert

app:record:insert

Inserts a new record into a schema table and returns the persisted record

Options

NameTypeDescription
org_idstringThe organization ID that scopes the operation
user_idstringThe caller's user ID recorded in the record history
schemastringThe name of the schema (database) that contains the table
tablestringThe name of the table to insert the record into
recordRecordThe key-value data to insert

Outputs

NameTypeDescription
recordRecordThe 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 }}"