Docs/Specialty nodes
#

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.

FieldconfigJson keyDefault
Pass conditionpassConditionRequired. Describe the page state that must be true.
Estimated waitestimatedWaitSeconds30 minutes. Time before the first check.
Check intervalcheckIntervalSeconds5 minutes.
Maximum timeoutmaxTimeoutSeconds2 hours. The step fails if the condition is not true by then.
Agent fallback after failed checksagentFallbackAfterChecks3.

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.

Fieldpredicate keyNotes
ComparesubjectA workflow input, a captured variable ({"kind": "variable", "name": "..."}), or Acting as (login identity) ({"kind": "acting_as"}).
JSON field path (optional)subject.pathReads a field inside a variable that holds JSON, for example 0.headers.in-reply-to.
Operatoroperatorequals, not_equals, contains, not_contains, matches, gt, lt, gte, lte, is_set, is_not_set.
Valuevalue$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.

json
{
  "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.

FieldconfigJson keyNotes
TotoOne email address, or the phone number for SMS.
SubjectsubjectThe email subject. Email only.
BodybodyRequired.
FromfromEmailEmail only. A test-user address owned by your organization. Defaults to the upstream login's address.
Reply to email containingreplyTo.matchEmail 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.
AttachmentsattachmentIdsLibrary 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.

FieldconfigJson keyNotes
Audio clipattachmentIdsRequired. Pick an audio attachment or record one in the panel.
Loop until the next audio nodeloopOff by default.
Wait for clip to finish before advancingwaitForCompletionOn 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.

FieldconfigJson keyNotes
Failure severityseverityOn is fail, off is warn.
Min duration (ms), Max duration (ms)deterministic.minDurationMs, deterministic.maxDurationMsBounds on clip length.
Min RMS (dB)deterministic.minRmsDbA loudness floor.
Max silence fraction (0–1)deterministic.silenceFractionMaxThe most silence allowed in the clip.
PredicatenaturalLanguage.promptA 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.

FieldconfigJson keyNotes
NamenameRequired. Unique within the flow. configJson also needs title and description.
Target (optional)targetThe part of the page, in plain English. Empty captures the whole page.
Expected state (optional)expectedStateWhat the capture should show.
SeverityseverityRecord 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.