Skip to Content
NexmodActionsSub-Actions

Sub-Actions

Sub-actions are the individual steps that execute when an action fires. Think of them as building blocks — you combine them to create powerful automations.

Sub-Action Types

Nexmod provides seven sub-action types:

Send Message

Send a text message to chat. Supports all variables including {user}, counters, and global variables.

FieldDescription
MessageThe message text to send. Supports variable interpolation.

Example config:

{ "message": "Welcome {user}! Thanks for following!" }

Run Command

Execute an existing chat command programmatically. This lets you reuse command logic inside automations.

FieldDescription
Command NameThe name of the command to run (e.g., !hello)
ArgumentsOptional arguments to pass to the command

Example: When someone subscribes, automatically run your !welcome command.

Set Variable

Write a value to a global variable. Variables persist across commands and actions, making them useful for sharing state.

FieldDescription
Variable NameThe name of the variable to set
ValueThe value to store (supports variable interpolation)

Example: Store the last follower’s name: set lastFollower to the event’s display name.

Delay

Pause execution for a specified number of seconds before continuing to the next sub-action. Useful for spacing out messages or waiting for external processes.

FieldDescription
DurationWait time in seconds (1–300)

Conditional

Branch the flow based on a condition. If the condition is true, execution continues to the next sub-action; if false, execution can skip ahead or take an alternate path.

FieldDescription
Condition TypeThe type of check to perform
ValueThe value to compare against

Supported conditions:

ConditionDescription
Message ContainsCheck if the triggering message contains text
Message Starts WithCheck if the message begins with text
Message Matches RegexTest against a regular expression
User Role IsCheck the user’s role (everyone, subscriber, VIP, moderator, broadcaster)
Variable EqualsCompare a global variable to an expected value
Counter Greater ThanNumeric comparison on a counter
Counter Less ThanNumeric comparison on a counter
Counter EqualsNumeric comparison on a counter
Random ChancePass with a given percentage (e.g., 50%)
Stream Is LiveCheck if the stream is currently online

HTTP Request

Make an external API call. This is how you integrate Nexmod with third-party services, custom APIs, and webhooks.

FieldDescription
MethodHTTP method: GET, POST, PUT, DELETE, or PATCH
URLThe endpoint to call
HeadersRequest headers as JSON (e.g., {"Authorization": "Bearer ..."})
BodyRequest body for POST/PUT/PATCH requests
Store Response InVariable name to store the API response for use in later sub-actions

HTTP requests are subject to timeouts and rate limits. Ensure external APIs are reliable before using them in high-frequency automations.

Trigger Action

Chain to another action. This lets you compose complex automations from smaller, reusable pieces.

FieldDescription
Action NameThe name of the action to trigger

Example: A “Big Raid” action triggers both a “Shoutout” action and a “Scene Change” action.

Execution Order

Sub-actions execute according to the parent action’s execution mode:

ModeBehavior
SequentialEach sub-action runs in sort order, one after another. Step 2 waits for step 1 to finish.
ConcurrentAll sub-actions fire simultaneously. No ordering guarantees.
RandomOne sub-action is randomly selected and only that one runs.

Reordering

You can drag-and-drop sub-actions to change their execution order. The sort order determines which sub-action runs first in Sequential mode.

Enabling / Disabling

Individual sub-actions can be toggled on or off without deleting them. Disabled sub-actions are skipped during execution.

Groups

Sub-actions can be organized into groups using the optional group name field. Groups are purely organizational — they help you visually separate steps in complex automations but don’t affect execution order.

Example Automations

Follow Alert

Trigger: Follow

Sub-actions (sequential):

  1. Send MessageWelcome to the stream, {user}! Thanks for the follow!
  2. Set VariablelastFollower = event display name
  3. Delay — 2 seconds
  4. Send MessageMake sure to check out the !commands list!

Sub Hype

Trigger: Subscription (any tier)

Sub-actions (sequential):

  1. Conditional — Is the sub gifted?
    • Yes: Send MessageSomeone just gifted a sub! PogChamp
    • No: Send Message{user} just subscribed! Welcome to the squad!
  2. Run Command!subalert (triggers a custom alert command)

Timed Social Reminder

Trigger: Timer Tick (social-timer)

Sub-actions (sequential):

  1. Conditional — Stream Is Live
    • Yes: Send MessageFollow me on Twitter @streamer and join the Discord: discord.gg/invite
    • No: (skip — don’t post in offline chat)

External API Integration

Trigger: Chat Message (!song)

Sub-actions (sequential):

  1. HTTP RequestGET https://api.myservice.com/current-song, store in songData
  2. Send MessageNow playing: {variable:songData}
Last updated on