Every Nth
Runs on: Frontend (Chatbox) — only available in the Chatbox Flow Editor; runs inside the OBS browser source.
The Every Nth node maintains an internal counter that increments once per message that flows through it. When the counter reaches the Nth position (accounting for the configured offset), the message is forwarded to Pass; all other messages go to Fail. The counter persists for the lifetime of the browser source session and resets on page refresh.
This node is useful for cycling through visual variants across sequential messages — for example, alternating between two layouts on every other message, or creating a 1-2-3 rotation by chaining multiple Every Nth nodes with different offsets.
Inputs
| Name | Type | Description |
|---|---|---|
input | any | Any value — typically the chat message from an upstream node. |
Outputs
| Name | Type | Description |
|---|---|---|
pass | any | The input value, forwarded on every Nth message. |
fail | any | The input value, forwarded on all other messages. |
Configuration
- N (2–5): How many messages form one cycle. Every Nth message in the cycle will Pass; the rest Fail. Minimum 2, maximum 5.
- Offset (0 to N-1): Which position in the cycle triggers Pass. With N=3 and Offset=0, message 1 passes. With Offset=1, message 2 passes. This lets you chain multiple Every Nth nodes (each with a different offset) to route each position in a cycle to a different variant.
Example
To rotate messages across three variants in a 1-2-3 pattern, place three Every Nth nodes in series, all with N=3. Set their offsets to 0, 1, and 2 respectively. Connect the Pass of each node to a different Select Variant effect. Every third message hits variant A, every third+1 hits variant B, and every third+2 hits variant C.