Events
List of Valid Events
You can use the following event names in the event list of your workflows, depending on which event source is configured in your config.yaml. You can use events from any source, though events from inactive sources will not run.
Twitch API Events
Use these when use_twitchapi: true is configured. Every event has standard fields:
type:str(the event type string)event_id:str | None
The event-specific structures are:
TwitchFollowEvent: Triggered when a user follows the channel.message:Listof items containing:user_id:struser_name:struser_login:strfollowed_at:str
TwitchSubscriptionEvent: Triggered when a user subscribes or resubscribes.message:Listof items containing:user_id:struser_name:struser_login:strtier:stris_gift:bool(default:false)cumulative_months:int(default:0)streak_months:int | None
TwitchBitsEvent: Triggered when bits are cheered.message:Listof items containing:user_id:struser_name:struser_login:stramount:intmessage:str | None
TwitchRaidEvent: Triggered when the channel is raided.message:Listof items containing:from_broadcaster_id:strfrom_broadcaster_name:strfrom_broadcaster_login:strviewers:int
TwitchChannelPointsEvent: Triggered when custom channel points rewards are redeemed.message:Listof items containing:user_id:struser_name:struser_login:strreward_id:strreward_title:strreward_cost:intuser_input:str | None
TwitchPredictionEvent: Triggered when a prediction status updates.message:Listof items containing:prediction_id:strtitle:stroutcomes:List[Any]started_at:strended_at:str | Nonestatus:str
Streamlabs Events
Use these when use_streamlabs: true is configured. Every Streamlabs event has standard fields:
* type: str (the event type string)
* event_id: str | None
* for: str | None (aliased from for_)
The event-specific structures are:
StreamlabsTwitchFollowEvent: Triggered when a user follows.message:Listof items containing:id:str | int | None(aliased from_id)name:strisTest:bool
StreamlabsTwitchSubscriptionEvent: Triggered when a user subscribes or resubscribes.message:Listof items containing:id:str | int | None(aliased from_id)name:strmonths:int(default:1)sub_plan:strmessage:str | NoneisTest:bool
StreamlabsTwitchBitsEvent: Triggered when bits are cheered.message:Listof items containing:id:str | int | None(aliased from_id)name:stramount:intmessage:str | Noneemotes:Any | NoneisTest:bool
StreamlabsTwitchHostEvent: Triggered when another channel hosts the stream.message:Listof items containing:id:str | int | None(aliased from_id)name:strviewers:int(default:0)isTest:bool
StreamlabsTwitchRaidEvent: Triggered when the channel is raided.message:Listof items containing:id:str | int | None(aliased from_id)name:strraiders:int(default:0)amount:int(default:0)isTest:bool
DonationEvent: Triggered when a monetary donation is received.message:Listof items containing:id:str(aliased from_id)name:strmessage:str | Nonefrom:strto:StreamlabsRecipient | str(whereStreamlabsRecipienthas aname: strfield)from_user_id:int | str | Noneamount:floatformattedAmount:str | Nonecurrency:strrecurring:boolisTest:boolfreeze:boolpriority:int
LoyaltyStoreRedemptionEvent: Triggered when a viewer redeems an item from the Streamlabs Loyalty Store.message:Listof items containing:id:str(aliased from_id)name:strmessage:str | Nonefrom:strto:StreamlabsRecipient | strproduct:strimageHref:str | NoneisTest:boolfreeze:boolpriority:int
MerchEvent: Triggered when merch is purchased.message:Listof items containing:id:str(aliased from_id)name:strmessage:str | Nonefrom:strto:StreamlabsRecipient | strproduct:strimageHref:str | Nonecondition:str | NoneisTest:boolfreeze:boolpriority:int
AlertPlayingEvent: Triggered when an alert starts playing on the overlay.message: Object containing:id:str | None(aliased from_id)priority:intfrom:str | NonefromId:str | Noneto:StreamlabsRecipient | str | Nonemessage:str | Nonepayload:dictimageHref:str | NonesoundHref:str | Noneduration:int | NoneisTest:boolrepeat:booltype:strfor:str | None(aliased fromfor_)product:str | Nonecondition:str | Nonename:str | Noneamount:float | str | NonerawAmount:float | Nonecurrency:str | Nonesource:str | Nonedonation_id:str | None
StreamLabelsEvent: Triggered when session labels/stats update.message: Object containing:hash:str | Nonedata: Object containing:id:str(aliased from_id)priority:intdonation_goal:str | Nonemost_recent_donator:str | Nonesession_most_recent_donator:str | Nonesession_donators:str | Nonetotal_donation_amount:str | Nonemonthly_donation_amount:str | Noneweekly_donation_amount:str | Nonethirtyday_donation_amount:str | Nonesession_donation_amount:str | Noneall_time_top_donator:str | Nonesession_top_donator:str | Nonesession_top_donators:str | None
StreamLabelsUnderlyingEvent: Triggered when underlying session data updates.message: Object containing:hash:str | Nonedata: Object containing:id:str(aliased from_id)priority:intdonation_goal:str | Nonemost_recent_donator:str | Nonesession_most_recent_donator:str | Nonesession_donators:str | Nonetotal_donation_amount:StreamLabelsAmount | str | None(whereStreamLabelsAmounthasamount: str)monthly_donation_amount:StreamLabelsAmount | str | Noneweekly_donation_amount:StreamLabelsAmount | str | Nonethirtyday_donation_amount:StreamLabelsAmount | str | Nonesession_donation_amount:StreamLabelsAmount | str | Noneall_time_top_donator:str | Nonesession_top_donator:str | Nonesession_top_donators:Union[List[Any], str] | None
Placeholders
You can dynamically insert event data into your command lines using placeholders. The plugin parses placeholders wrapped in curly braces (e.g. {placeholder}).
Resolve Placeholders via Event Properties
The placeholder resolver traverses the attributes and dictionaries of the triggering event. Paths are dotted, representing attribute/key lookups on the event structure:
- Simple Fields:
{message[0].user_name}resolves by checking themessagelist (or tuple) at index0, then fetching theuser_namefield/attribute. - List/Tuple Access:
- Specific index: Access an item by index, e.g.,
{message[0]}. - Last element (Default): If no index is specified, e.g.,
{message}, it defaults to retrieving the last item in the list (message[-1]).
- Specific index: Access an item by index, e.g.,
- Nested dictionaries or objects: Evaluated recursively (e.g.
{event_data.user.name}).
About using indexes
Most of the time, it's better to just use the last item in the list (i.e., don't specify an index at all).
Special Placeholders
In addition to referencing raw event fields, some special placeholders are resolved during workflow steps:
{target}: Replaced by target player names configured undertwitch_conditions.target.{user_name}: Replaced by the username from the triggering Twitch event (TwitchBitsEvent,TwitchFollowEvent,TwitchChannelPointsEvent, orTwitchSubscriptionEvent), if available.