Io Node Config — Automation Protocol reference
Config contracts for the flat IO builtins — notify and http. Reference for HttpConfig, NotifyConfig and 1 more: every property with its type and default.
Config contracts for the flat IO builtins — notify and http (#4045).
Provenance — written from the executors, not from the forms
Each schema here was derived by reading what the executor actually does with
node.config (service-automation/builtin/notify-node.ts, http-nodes.ts),
not by transcribing the hand-written configSchema literal on the node's
descriptor. That independence is the point: the two artifacts are reconciled
bidirectionally by io-node-form-zod-ledger.test.ts in service-automation,
and a Zod copied from the form would make that reconciliation a tautology —
it would pass by construction and prove nothing (#4045).
What these schemas are wired to (#4277)
Like LoopConfigSchema / ParallelConfigSchema / TryCatchConfigSchema,
these are live execute-time contracts: each executor parse()s its
config against its schema before running (service-automation's
parse-config.ts), so type and required violations refuse the node as a
guard (not routable via fault edges). Both parse the RAW stored config —
their text slots carry {{ }} holes and their value slots a CEL value
envelope or a literal (#19939), so both pass, a {token} in either is
refused, and the post-evaluation guards still own "resolved to nothing".
Until #19939 http parsed its INTERPOLATED config, so a {token} in a
typed slot (timeoutMs, durable) resolved to its real type first; those
keys are literals now, read as written, and a token there is refused.
Unknown keys — closed here too, as of #4001 批 9
These contracts used to say "unknown keys are the registration layer's job":
registerFlow() rejects keys the descriptor configSchema does not declare
(the tightened #4059 check), and this parse merely stripped them. That is one
door, and the #4001 campaign's second recurring finding is that a schema
which strips by default leaves every OTHER door open — whoever writes the
guard is fixing the bug in front of them, not auditing the surface.
The registration check remains the first door a stored flow meets and the
more informative one (it walks NESTED config against the descriptor's JSON
Schema and prints the declared set per path, which a flat key list cannot).
What changes is that a config reaching parse() by any OTHER route — a
direct NotifyConfigSchema.parse() in tooling, a host that composes the
engine without registerFlow, a future executor seam — no longer has its
undeclared keys silently deleted. The two doors are kept in agreement by
io-node-form-zod-ledger.test.ts, which reconciles this key set against the
descriptor's in both directions.
connector_action has no schema here on purpose: its config contract is
empty. The executor reads only the declared FlowNodeSchema.connectorConfig
sibling block — see the descriptor note in
service-automation/builtin/connector-nodes.ts.
Source: packages/spec/src/automation/io-node-config.zod.ts
TypeScript Usage
import { HttpConfigSchema, NotifyConfigSchema, NotifyEmailFieldRecipientSchema } from '@objectstack/spec/automation';
import type { HttpConfig, NotifyConfig, NotifyEmailFieldRecipient } from '@objectstack/spec/automation';
// Validate data
const result = HttpConfigSchema.parse(data);HttpConfig
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| url | string | ✅ | Target URL, rendered per run with {{ }} holes (https://api.example.com/v1/orders/{{ record.id }}); a single-brace {token} is refused |
| method | string | optional | HTTP method (default GET; POST when durable) — a literal, read as written: a single-brace {token} is not resolved here and is refused |
| headers | Record<string, string> | optional | Request headers, each value rendered per run with {{ }} holes (X-Request-Id: {{ $runId }}); a single-brace {token} is refused, and a header that renders to no text is not sent. The flow definition, this map included, is served to every member who can read flows, so never put a credential here: declare a connector whose auth is bearer or api-key (a header), with auth.credentialRef naming the secret, and call it from a connector_action node. |
| body | any | optional | Request body (JSON-serialised) — a CEL value envelope { dialect: 'cel', source } evaluated per run to the payload (a CEL map literal builds an object: "{'id': record.id, 'text': dyn('Done: ' + record.title)}", a text or a literal beside a field read wrapped in dyn(…), since a map's values share one type), or a literal sent as written; a {…} template token in a string of a literal is refused |
| durable | boolean | optional | Fire-and-forget via the durable outbox (retry/dead-letter) instead of inline request/response — a literal true or false, read as written |
| timeoutMs | number | optional | Per-request timeout (ms) — a literal number, read as written |
| signingSecret | string | optional | HMAC-SHA256 secret → X-Objectstack-Signature — the secret itself, read as written (a single-brace {token} is not resolved here and is refused); '' sends unsigned on purpose |
NotifyConfig
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| recipients | string | (string | { dialect: 'cel'; source: string; ast?: any; meta?: object })[] | { dialect: 'cel'; source: string; ast?: any; meta?: object } | { emailField: string } | ✅ | Who the notification goes to: a recipient (a user id, or an audience selector such as team:ID) as a string; a list of them, each a string or a CEL value envelope { dialect: 'cel', source } evaluated per run — an entry that evaluates to a list adds each of its recipients, and one that evaluates to null adds none; or one envelope evaluating to a recipient or a list. A {…} template token is refused. Or, as the whole value, { emailField: 'applicant_email' }: the address in that email-typed field of the record that triggered the flow, for a person who is not a user — the node then names email as its only channel. The address is read from the stored record when the node runs and must be one plain ASCII mailbox, or the node fails and nothing is sent; one address receives at most 5 such emails per hour, best-effort. An email address written out as a string is no audience selector but an author constant, sent as written: to the user who holds it, or else, on the email channel, to the address itself. An address an envelope evaluates to is not one: in a node whose channels include email, it must be a user's, written bare or as user:ADDRESS — one a user holds resolves to that user, and one that no user holds fails the node, pointing to { emailField }. A node that does not name email mails nobody, and its computed recipients go to the messaging service as before. |
| title | string | { dialect: 'template'; source?: string; ast?: any; meta?: object } | optional | Notification title — a template: a bare string, or a { dialect: 'template', source } envelope (the tmpl helper) carrying the same text. It is rendered per run with {{ }} holes over the flow's variables — a variable path with an optional formatter ({{ record.name }}, {{ record.amount | currency }}); a single-brace {token} is refused. One text for every recipient (not localizable — use template for per-locale content). Either this or template is required; the two are mutually exclusive. |
| message | string | { dialect: 'template'; source?: string; ast?: any; meta?: object } | optional | Notification body — the same template input as title (a bare string or a { dialect: 'template', source } envelope), rendered per run with {{ }} holes like title; not localizable. Only valid with inline title, never with template. |
| template | string | optional | Email template name (an email_template item's name, e.g. crm.large_deal_won) — the localizable content path: the delivery path resolves (name, locale) among the email templates — built-in, declared by an app, or authored in Studio — at delivery time and renders subject/body from that member. The locale is resolved per recipient, after fan-out: the recipient's own sys_user.locale when set, else the deployment default locale — so recipients whose personal languages differ receive different members of the same bundle. The node's payload.locale is not consulted. Mutually exclusive with inline title/message, which are the non-localizable path. Read raw — no {token} interpolation. |
| templateData | Record<string, any> | optional | Render context for the referenced template's {{var}} placeholders — each value a CEL value envelope { dialect: 'cel', source } evaluated per run, or a literal written as it is; a {…} template token is refused. Only valid together with template. |
| channels | string | string[] | optional | Channels to fan out to (default: inbox) |
| topic | string | optional | Event topic (default: "notify") |
| severity | Enum<'info' | 'warning' | 'critical'> | optional | Severity forwarded to the messaging service |
| sourceObject | string | optional | Object name of the record the notification links to (writes sys_notification.source_object) — a literal, read as written: a single-brace {token} is not resolved here and is refused, as is a CEL value envelope; write the value. Only takes effect together with sourceId — a half-specified click-through target is dropped at execute time, not defaulted, so the inbox never renders a dead link. When sourceObject, sourceId and actionUrl are all left out, a run started by a record (a record change other than a delete or a before-create, a time-relative sweep, an action on a record) links to that record, and a run with no trigger record links nowhere — a before-create run's record has no id until the driver issues one at the write, so it links only when the caller wrote the id; an explicit pair or an actionUrl is kept as written. |
| sourceId | string | { dialect: 'cel'; source: string; ast?: any; meta?: object } | optional | Record id the notification links to (writes sys_notification.source_id) — a string, or a CEL value envelope { dialect: 'cel', source } evaluated per run to one (record.id); a {…} template token is refused. Only takes effect together with sourceObject — a half-specified click-through target is dropped at execute time, not defaulted, so the inbox never renders a dead link. When sourceObject, sourceId and actionUrl are all left out, a run started by a record (a record change other than a delete or a before-create, a time-relative sweep, an action on a record) links to that record, and a run with no trigger record links nowhere — a before-create run's record has no id until the driver issues one at the write, so it links only when the caller wrote the id; an explicit pair or an actionUrl is kept as written. |
| actorId | string | optional | User id that caused the event (writes sys_notification.actor_id) — a literal, read as written: a single-brace {token} is not resolved here and is refused, as is a CEL value envelope; write the value |
| actionUrl | string | optional | Explicit click-through URL, rendered per run with {{ }} holes like title (/crm_case/{{ record.id }}); a single-brace {token} is refused. Overrides the link synthesized from sourceObject/sourceId, and written alone keeps the notification from linking to the record that started the run. |
| payload | Record<string, any> | optional | Extra values merged into the notification payload — literals, read as written: a single-brace {token} in any string of one is not resolved here and is refused, as is a CEL value envelope written as a value; write the value |
Nested Shape: NotifyConfig.recipients[option 4]
An email-field recipient: the address in an email-typed field of the record that triggered the flow — the field is named, never an address or an expression
| Property | Type | Required | Description |
|---|---|---|---|
| emailField | string | ✅ | Machine name of an email-typed field of the record that triggered the flow; the address it holds is the recipient |
NotifyEmailFieldRecipient
An email-field recipient: the address in an email-typed field of the record that triggered the flow — the field is named, never an address or an expression
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| emailField | string | ✅ | Machine name of an email-typed field of the record that triggered the flow; the address it holds is the recipient |
Flow Function
The contract for a named handler function a script node invokes — contributed by defineStack({ functions }) and resolved by name at execute time.
Schedule Organization
The ACTING ORGANIZATION of a time-triggered flow — the one start-node key that says which organization a scheduled run executes as.