app:file:save
Inserts a file record, uploads the blob, and stamps the resulting key back onto the record. Errors mid-flight leave the record in place with an empty Field, which is intentional so the row still shows up in audit and list views and operators can inspect the failure
Options
| Name | Type | Description |
|---|---|---|
schema | string | Is the database selected by the trusted workflow execution context. |
table | string | The name of the table that holds the file record; defaults to "files" |
field | string | Is the FieldTypeFile column on the table that stores the blob key |
name | string | Of the file (e.g. "payout.xml") |
mime_type | string | Of the file |
kind | string | Classifies how the file was produced: "output" (workflow artifact), "input" (user upload consumed by a run), "manual" (user upload, no run) |
content | any | Of the file; string or []byte |
record | map[string]any | Extra fields merged onto the inserted file row (e.g. app_id). Values here win over the stamped defaults, except on the identity columns, which the run's principal owns outright |
Outputs
| Name | Type | Description |
|---|---|---|
id | string | |
record | Record | |
key | string |
Example
name: Save a generated report as a file record
actions:
- name: report
component: llm:generate
vars:
provider: openai
model: gpt-5
prompt: "Write a short status report for {{ var.project }}."
- name: saved
component: app:file:save
vars:
schema: "{{ var.schema }}"
name: report.md
mime_type: text/markdown
content: "{{ report.content }}"
outputs:
key: "{{ saved.key }}"
record: "{{ saved.record }}"