Tag Reference
This page is the compact map of every released WOML element. Use it after learning the concepts in the tutorials; follow the linked feature pages for complete examples and execution behavior.
Document and reuse
| Tag | Important attributes | Purpose |
|---|---|---|
<woml> | None | Root of every runnable or reusable document. |
<imports> | None | Groups local module declarations before the document profile. |
<module> | name, from | Imports a local .js, .ts, or reusable .woml definition. |
<props> | None | Declares the public contract of a reusable definition. Invalid in runnable workflows. |
<prop> | name, required, secret | Declares one ordinary or secret reusable prop. |
<provider> | name, kind="notification" | Defines a reusable notification transport. |
<woml> has no attributes. A document has exactly one profile: runnable <workflow>, reusable <step>, or reusable <provider>. See Reusable WOML Definitions.
Workflow structure
| Tag | Important attributes | Purpose |
|---|---|---|
<workflow> | id, name, description, version, tags | Defines one runnable workflow. |
<config> | concurrency, rate-limit, timeout, queue | Applies workflow-level admission and deadline policies. |
<triggers> | None | Contains one or more entry points. |
<steps> | name, description | Contains the ordered root flow. |
<lifecycle> | None | Contains workflow and step observation hooks. |
These structural children are validated by role, but workflow-level placement is intentionally readable rather than relying on arbitrary XML ordering. Each singleton may appear only once.
Triggers
| Tag | Primary attributes | Payload source |
|---|---|---|
<manual> | id | Manual occurrence data. |
<webhook> | id, path, method, auth, secret | HTTP request normalized into context.payload. |
<schedule> | id, cron, timezone, on-missed | Scheduled occurrence metadata. |
<interval> | id, every, on-missed | Interval occurrence metadata. |
<event> | id, name, secret | Authenticated published event data. |
<slack> | Provider-specific event and secret attributes | Slack Socket Mode event. |
<telegram> | Provider-specific event, token, and filter attributes | Telegram update. |
<discord> | Provider-specific event, token, and intent attributes | Discord Gateway event. |
<whatsapp> | Provider-specific callback and secret attributes | Verified WhatsApp callback. |
<schema> | None; raw JSON body | Inline JSON Schema for webhook or event input. |
The same provider tag name can have a different contract inside <notify> or <approval>. Placement determines the role; it is not interchangeable syntax. See Trigger Overview and Communication Providers.
Work and control flow
| Tag | Important attributes | Purpose |
|---|---|---|
<step> | id, name, description, retry | One durable executable operation containing one script. |
<script> | timeout where supported by its profile | Raw JavaScript body; no CDATA or wrapper function. |
<parallel> | id, name, description, concurrency | Runs independent direct step children concurrently and waits for all. |
<choose> | id, name, description | Selects the first strict-boolean <when> or <otherwise>. |
<when> | test | Conditional route whose test must resolve to boolean. |
<otherwise> | None | Fallback route when no condition matched. |
<switch> | id, value, name, description | Selects an exact string <case> or <default>. |
<case> | value | One exact string route. |
<default> | None | Fallback switch route. |
<result> | from | Publishes a predictable output from selected or aggregate control flow. |
<for-each> | id, items, concurrency, name, description | Runs a durable body once for every array item and preserves result order. |
<fork> | id, join, name, description | Starts concurrent multi-step branches and waits for selected branch IDs. |
<branch> | id, name, description | One independent multi-step lane inside a fork. |
<approval> | id, name, description, timeout, on-timeout | Pauses durably for an approved or rejected decision. |
<notify> | None | Contains one or more approval notification destinations. |
<when-approved> | None | Executes after an approved decision. |
<when-rejected> | None | Executes after rejection or reject-on-timeout. |
<choose> and <switch> route one path. <parallel> waits for independent single steps. <fork> owns independent multi-step lanes. <for-each> repeats one durable body for an array. See Choose the Right Primitive.
Lifecycle hooks
<on-start>, <on-step-start>, <on-step-success>, <on-step-failure>, <on-step-complete>, <on-success>, <on-error>, <on-cancel>, and <on-complete> contain scripts or notifications according to their profile.
Workflow hooks observe the overall run. Step hooks live in the workflow <lifecycle> section and receive the current step through the lifecycle binding; they are not nested inside ordinary <step> elements. Reusable definitions support the reviewed general hooks but do not invent a separate error vocabulary.
Notification elements
Inside lifecycle hooks and approval notifications, built-in <slack>, <telegram>, <discord>, and <whatsapp> tags send through supervised provider hosts. Imported reusable provider names can also appear as notification elements. Multiple approval destinations share one logical decision: approving from any valid destination settles the same approval.
Use Notifications for shared behavior and the provider-specific setup guides for exact attributes.