# Shared fields and workflow structure

Search `GET /node-types?q=keyword&page=1&pageSize=20`, then pass the returned type ID to `GET /node-types/{nodeType}`. Pages start at 1 and page size is 1–100 (default 20). A type such as `browser_gotoUrl` is distinct from a workflow node ID such as `visit`.

| Contract field | What to check |
|  --- | --- |
| `authorable`, `runtimeSupported`, `externalRunnable`, `documentationComplete` | Authoring, runtime support, external execution, and documentation coverage. |
| `inputSchema` | Types, enums, formats and structure. Resolve `$ref` using the instance's schema URL. |
| `conditionalRules`, `referenceRules` | Fields required or forbidden in each mode, resolved values and allowed reference scope. |
| `defaults`, `outputVariants`, `fieldPolicies` | Execution defaults, outputs by mode and field policies. `x-editor-default` describes the initial editor value. |


## Workflow structure

Write `editorVersion: 2` and `editorParametersVersion: 1`. Root `nodes` run in order, with one `start` first and one `end` last. Nested nodes use the `blocks` specified by each contract. Keep node IDs unique across the tree and stable through edits. Give every node and branch a descriptive `data.title`. A group cannot contain another group.

An action uses `type: browser_<action>`, the matching `data.browserAction`, and inputs under `data.browserUi.inputs`. Action inputs use strings such as `${targetUrl}` and `${visit.data.finalUrl}`. End output and condition operands can use `{"type":"ref","content":["visit","data","finalUrl"]}`, with an array of path segments. Refer only to visible variables and previous nodes. Declare custom variables in `start.data.customVariables`, update them with `browser_updateCustomVariable` and read them as `${custom.<id>}`. Use the server's normalized tree after saving.

## Variable references

When a field supports variable references, use `${…}` and replace the ellipsis with the actual variable name or reference path. The workflow resolves that reference at runtime and checks the resulting value against the field rules.

For example, `"selectorRadio": "${locatorType}"` reads the initial parameter `locatorType`. A value of `"XPath"` selects XPath mode. The resolved value must be `"CSS"` or `"XPath"`, so `"TEXT"` fails validation.

## Example fields and bounds

| Field | Rule |
|  --- | --- |
| `gotoUrl.url` | Required string; supports references. Use an absolute HTTP(S) URL for portable templates. For other schemes, preflight against your client and check how the browser handles them. |
| `gotoUrl.postWaitMs` | Number or supported numeric expression, documented range 0–2147483647 milliseconds after resolution. Defaults to 1000; set 0 for no wait. Keep the value within this range. |
| `getUrl.type` / `key` | `href` (default), `origin` or `search`. Search requires a key that resolves to a non-empty string. In href mode, `data.value` is the full current URL. Check the live contract for missing search values. |
| `browserUi.exception.timeout` | Integer, 0–2147483647 milliseconds. Zero disables the node timeout but the run budget still applies. Defaults: 30000 for actions and 0 for control nodes. An explicit timeout on a control node covers its entire child graph. |
| `browserUi.exception.policy` | Set `interrupt`, `skip` or `handle` explicitly. If a failed node is skipped, references to its data resolve to null; check the run's `hasNodeErrors`. |
| `retryTimes` / `retryInterval` | When retry is enabled for an atomic action, 1–10 additional attempts. The interval is 0–2147483 **seconds**. Retrying may repeat an action that already took effect. |


A template requires `title` (1–100 characters after trimming), `description` (up to 1000 characters, may be empty), `workflow` and `dependencies` (use `[]` with no child templates). Check `capabilities.data.limits` for request and workflow sizes, node count, nesting depth and edits per request. See [Workflow, variables and structure nodes](/browser-rpa/api/workflow) and [Data models](/browser-rpa/api/data-types) for the full models.

Next: [validate and save the example](/browser-rpa/quickstart).