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.
| Field | Description |
|---|---|
| Message | The 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.
| Field | Description |
|---|---|
| Command Name | The name of the command to run (e.g., !hello) |
| Arguments | Optional 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.
| Field | Description |
|---|---|
| Variable Name | The name of the variable to set |
| Value | The 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.
| Field | Description |
|---|---|
| Duration | Wait 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.
| Field | Description |
|---|---|
| Condition Type | The type of check to perform |
| Value | The value to compare against |
Supported conditions:
| Condition | Description |
|---|---|
| Message Contains | Check if the triggering message contains text |
| Message Starts With | Check if the message begins with text |
| Message Matches Regex | Test against a regular expression |
| User Role Is | Check the user’s role (everyone, subscriber, VIP, moderator, broadcaster) |
| Variable Equals | Compare a global variable to an expected value |
| Counter Greater Than | Numeric comparison on a counter |
| Counter Less Than | Numeric comparison on a counter |
| Counter Equals | Numeric comparison on a counter |
| Random Chance | Pass with a given percentage (e.g., 50%) |
| Stream Is Live | Check 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.
| Field | Description |
|---|---|
| Method | HTTP method: GET, POST, PUT, DELETE, or PATCH |
| URL | The endpoint to call |
| Headers | Request headers as JSON (e.g., {"Authorization": "Bearer ..."}) |
| Body | Request body for POST/PUT/PATCH requests |
| Store Response In | Variable 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.
| Field | Description |
|---|---|
| Action Name | The 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:
| Mode | Behavior |
|---|---|
| Sequential | Each sub-action runs in sort order, one after another. Step 2 waits for step 1 to finish. |
| Concurrent | All sub-actions fire simultaneously. No ordering guarantees. |
| Random | One 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):
- Send Message —
Welcome to the stream, {user}! Thanks for the follow! - Set Variable —
lastFollower= event display name - Delay — 2 seconds
- Send Message —
Make sure to check out the !commands list!
Sub Hype
Trigger: Subscription (any tier)
Sub-actions (sequential):
- Conditional — Is the sub gifted?
- Yes: Send Message —
Someone just gifted a sub! PogChamp - No: Send Message —
{user} just subscribed! Welcome to the squad!
- Yes: Send Message —
- Run Command —
!subalert(triggers a custom alert command)
Timed Social Reminder
Trigger: Timer Tick (social-timer)
Sub-actions (sequential):
- Conditional — Stream Is Live
- Yes: Send Message —
Follow me on Twitter @streamer and join the Discord: discord.gg/invite - No: (skip — don’t post in offline chat)
- Yes: Send Message —
External API Integration
Trigger: Chat Message (!song)
Sub-actions (sequential):
- HTTP Request —
GET https://api.myservice.com/current-song, store insongData - Send Message —
Now playing: {variable:songData}