Skip to main content

If

Runs on: Shared — pure logic, runs on the Community backend or inside a chatbox overlay.

The If node is the most flexible comparison check in the flow system. It accepts any type on its A input and adapts its available operations to match: strings get equality, inequality, contains, starts-with, and ends-with; numbers get the full set of equality and relational operators; booleans get equality and inequality. When A is a complex object type, you can pick a specific field from that object to compare rather than the whole thing.

The B side can be wired to a second input handle or entered inline as a literal value directly on the node — no extra Data node required. When the comparison is true, the flow continues down Pass, forwarding the original A input unchanged. When false, it goes down Fail. This makes the node a natural replacement for the simpler Match or Math Check nodes when you need more control in one place.

Inputs​

NameTypeDescription
aanyThe primary value to compare. Passed through on whichever output fires.
banyOptional second value to compare against. When not connected, enter the comparison value inline on the node.

Outputs​

NameTypeDescription
passpass-throughThe original A input, forwarded when the comparison is true.
failpass-throughThe original A input, forwarded when the comparison is false.

Configuration​

  • Operation: The comparison to perform. Options depend on the type of A: =, ≠, contains, starts, ends for strings; =, ≠, >, <, ≥, ≤ for numbers; =, ≠ for booleans.
  • Inline B value: When the B input is not connected, type the comparison value directly into the field on the node.
  • Field path (objects only): When A is an object type, select which field to extract for comparison.
  • Case sensitive (strings only): When enabled, string comparisons are case-sensitive.

Example​

After a Channel Cheer trigger, connect the bits amount to A, leave B disconnected, and set the inline B value to 1000 with the operator set to greater-than-or-equal. Viewers who cheer 1000 or more bits go down the Pass path to a special VIP alert and a thank-you TTS message. Smaller cheers take the Fail path to a standard acknowledgment.