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 |
|---|---|---|
org_id | string | The organization ID that scopes the operation |
user_id | string | The caller's user ID; recorded as created_by_user_id and used for record history |
schema | string | The name of the schema (database) that contains the table; defaults to "aweehub" |
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. project_id, app_id); values here win over auto-stamped defaults |
Outputs
| Name | Type | Description |
|---|---|---|
id | string | |
record | Record | |
key | string |
Example
name: Save a generated report as a file record
actions:
- name: report
component: inference
vars:
provider: openai
model: gpt-5
prompt: "Write a short status report for {{ var.project }}."
- name: saved
component: app:file:save
vars:
org_id: "{{ var.org_id }}"
user_id: "{{ var.user_id }}"
name: report.md
mime_type: text/markdown
content: "{{ report.content }}"
outputs:
key: "{{ saved.key }}"
record: "{{ saved.record }}"