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

TagImportant attributesPurpose
<woml>NoneRoot of every runnable or reusable document.
<imports>NoneGroups local module declarations before the document profile.
<module>name, fromImports a local .js, .ts, or reusable .woml definition.
<props>NoneDeclares the public contract of a reusable definition. Invalid in runnable workflows.
<prop>name, required, secretDeclares 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

TagImportant attributesPurpose
<workflow>id, name, description, version, tagsDefines one runnable workflow.
<config>concurrency, rate-limit, timeout, queueApplies workflow-level admission and deadline policies.
<triggers>NoneContains one or more entry points.
<steps>name, descriptionContains the ordered root flow.
<lifecycle>NoneContains 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

TagPrimary attributesPayload source
<manual>idManual occurrence data.
<webhook>id, path, method, auth, secretHTTP request normalized into context.payload.
<schedule>id, cron, timezone, on-missedScheduled occurrence metadata.
<interval>id, every, on-missedInterval occurrence metadata.
<event>id, name, secretAuthenticated published event data.
<slack>Provider-specific event and secret attributesSlack Socket Mode event.
<telegram>Provider-specific event, token, and filter attributesTelegram update.
<discord>Provider-specific event, token, and intent attributesDiscord Gateway event.
<whatsapp>Provider-specific callback and secret attributesVerified WhatsApp callback.
<schema>None; raw JSON bodyInline 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

TagImportant attributesPurpose
<step>id, name, description, retryOne durable executable operation containing one script.
<script>timeout where supported by its profileRaw JavaScript body; no CDATA or wrapper function.
<parallel>id, name, description, concurrencyRuns independent direct step children concurrently and waits for all.
<choose>id, name, descriptionSelects the first strict-boolean <when> or <otherwise>.
<when>testConditional route whose test must resolve to boolean.
<otherwise>NoneFallback route when no condition matched.
<switch>id, value, name, descriptionSelects an exact string <case> or <default>.
<case>valueOne exact string route.
<default>NoneFallback switch route.
<result>fromPublishes a predictable output from selected or aggregate control flow.
<for-each>id, items, concurrency, name, descriptionRuns a durable body once for every array item and preserves result order.
<fork>id, join, name, descriptionStarts concurrent multi-step branches and waits for selected branch IDs.
<branch>id, name, descriptionOne independent multi-step lane inside a fork.
<approval>id, name, description, timeout, on-timeoutPauses durably for an approved or rejected decision.
<notify>NoneContains one or more approval notification destinations.
<when-approved>NoneExecutes after an approved decision.
<when-rejected>NoneExecutes 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.