Specialty nodes
Reference for Cofactor flow nodes that handle timing, branching and checks. Wait, Condition, Notification email, Audio input, Audio assertion, Visual checkpoint and End.
These nodes handle timing, branching, email, audio and visual checks. They build on the core nodes.
Wait
nodeType: wait. It pauses the run before the next step.
The Wait type field has two choices.
Fixed delay (mode: delay). Set Delay and Unit (delaySeconds).
Until a condition passes (mode: condition). Cofactor checks the page for the condition at each check interval.
| Field | configJson key | Default |
|---|---|---|
| Pass condition | passCondition | Required. Describe the page state that must be true. |
| Estimated wait | estimatedWaitSeconds | 30 minutes. Time before the first check. |
| Check interval | checkIntervalSeconds | 5 minutes. |
| Maximum timeout | maxTimeoutSeconds | 2 hours. The step fails if the condition is not true by then. |
| Agent fallback after failed checks | agentFallbackAfterChecks | 3. |
Each time must be at least 60 seconds, and the estimated wait must be shorter than the maximum timeout. The maximum timeout cannot exceed 30 days. A condition wait is not available in seed and teardown flows.
Condition
nodeType: condition. It branches the flow. Connect one path for true and one for false. The field How should this condition be decided? has two choices.
Typed comparison (deterministic) (predicate). Cofactor compares values itself, with no agent. With Acting as, the value is a persona you pick.
| Field | predicate key | Notes |
|---|---|---|
| Compare | subject | A workflow input, a captured variable ({"kind": "variable", "name": "..."}), or Acting as (login identity) ({"kind": "acting_as"}). |
| JSON field path (optional) | subject.path | Reads a field inside a variable that holds JSON, for example 0.headers.in-reply-to. |
| Operator | operator | equals, not_equals, contains, not_contains, matches, gt, lt, gte, lte, is_set, is_not_set. |
| Value | value | $var.<name> is replaced first. matches takes a JavaScript regular expression. |
Describe for the agent (conditionDescription). An agent reads the page and decides true or false.
Exact checks
To assert a value the run already holds, for example an email body or an API response, turn on Fail the run when false (failOnFalse: true). The node no longer branches, and it shows as Check on the canvas. When the comparison is false, the step fails and the run fails. The error names the expected and the actual value.
{
"nodeType": "condition",
"configJson": {
"conditionDescription": "The reply quotes the original message id",
"predicate": {
"subject": { "kind": "variable", "name": "emails", "path": "0.headers.in-reply-to" },
"operator": "equals",
"value": "$var.message_id"
},
"failOnFalse": true
}
}
failOnFalse needs a typed comparison. See Assertions.
Notification
nodeType: notification. It sends an email when the run reaches it. The Channel field also offers SMS in organizations with SMS messaging enabled. SMS needs a login step before it.
| Field | configJson key | Notes |
|---|---|---|
| To | to | One email address, or the phone number for SMS. |
| Subject | subject | The email subject. Email only. |
| Body | body | Required. |
| From | fromEmail | Email only. A test-user address owned by your organization. Defaults to the upstream login's address. |
| Reply to email containing | replyTo.match | Email only. Replies to the latest email the From address received in this run that contains this text. To is not used when this is set. |
| Attachments | attachmentIds | Library files. Email only. |
To, Subject and Body accept variables and macros. A chosen sender or a reply allows at most 20 emails per run. The attachments on one email can total at most 8 MB. See Receiving email for mail your application sends.
Audio input
nodeType: audio. It plays a clip into the browser microphone.
| Field | configJson key | Notes |
|---|---|---|
| Audio clip | attachmentIds | Required. Pick an audio attachment or record one in the panel. |
| Loop until the next audio node | loop | Off by default. |
| Wait for clip to finish before advancing | waitForCompletion | On by default. |
Audio assertion
nodeType: audio-assertion. It checks the most recent audio capture in the run. Turn on Capture audio playback on the action that triggers the sound.
| Field | configJson key | Notes |
|---|---|---|
| Failure severity | severity | On is fail, off is warn. |
| Min duration (ms), Max duration (ms) | deterministic.minDurationMs, deterministic.maxDurationMs | Bounds on clip length. |
| Min RMS (dB) | deterministic.minRmsDb | A loudness floor. |
| Max silence fraction (0–1) | deterministic.silenceFractionMax | The most silence allowed in the clip. |
| Predicate | naturalLanguage.prompt | A plain-language claim. An audio model judges it. |
The node needs at least one check.
Visual checkpoint
nodeType: visual_checkpoint. It captures a screen state, either the whole page or a part you name, and compares it with the baseline.
| Field | configJson key | Notes |
|---|---|---|
| Name | name | Required. Unique within the flow. configJson also needs title and description. |
| Target (optional) | target | The part of the page, in plain English. Empty captures the whole page. |
| Expected state (optional) | expectedState | What the capture should show. |
| Severity | severity | Record is the default. It keeps the capture for review and the step passes. Fail fails the step when the page visibly changed. |
End
nodeType: end. It ends the flow. Outcome is Pass or Fail (outcome: pass or fail), and Pass is the default. Use it when a branch should stop the run.