# YouTube

## Getting Started

Mix It Up connects to your YouTube channel so your live streams, chat, memberships, Super Chats, and other channel events can drive your stream automation.

## Actions

YouTube actions allow you to perform actions on your YouTube channel, such as updating your channel and running ads.

This action supports the following options:

- **Set Title/Description:** Sets the current stream's title and description.
- **Run Ad Break:** Attempts to run a series of ads with the specified duration.

## Latest Video & Latest Short

Mix It Up can pull your most recent upload into any command through the $youtubelatestvideo and $youtubelatestshort [Special Identifiers](/docs/reference/special-identifiers#youtube). Both read your channel's uploads list, so a video posted moments ago is found and the same one comes back every time.

YouTube gives no way to ask whether an upload is a Short, so length is the dividing line. The **Shorts Video Length Cap** under Settings -> Platforms sets it: uploads at or under that many seconds count as Shorts, and anything longer counts as a regular video. The default is 180 seconds.

## Events

### YouTube Channel Stream Start
This event will run when your stream goes from offline to online. It is often used to send out Discord and social media notices to alert users that your stream is starting. This event is only triggered once per-application launch. This event provides no additional special identifiers.

### YouTube Channel Stream Stop
This event will run when your stream goes from online to offline. It is often used to send out Discord and social media notices to alert users that your stream has ended. This event is only triggered once per-application launch. This event provides no additional special identifiers.

### YouTube Channel New Member
This event will run when a user becomes a new paid member of your channel. This event is only triggered once per-user, per-application launch.

The [User](/docs/reference/special-identifiers#user) Special Identifiers reference the user who became the member. This event provides the following additional Special Identifiers:
- $usersubplan = The name of the membership level that the user paid for.

### YouTube Channel Member Milestone
This event will run when a user reaches a new milestone for their paid membership of your channel. This event is only triggered once per-user, per-application launch.

The [User](/docs/reference/special-identifiers#user) Special Identifiers reference the user who is the member. This event provides the following additional Special Identifiers:
- $message = The chat message included by the user for their membership milestone.
- $usersubplan = The name of the membership level that the user paid for.
- $usersubmonths = The number of months that the user has been a member of your channel.

### YouTube Channel Membership Gifted
This event will run when a user gifts a paid member to another user in your channel. The [User](/docs/reference/special-identifiers#user) Special Identifiers reference the user that GIFTED the membership (Ex: $username), while the [Target User](/docs/reference/special-identifiers#target-user) Special Identifiers reference the user that RECEIVED the membership (Ex: $targetusername). This event provides the following additional Special Identifiers:
- $usersubplan = The name of the membership level that the user paid for.

### YouTube Channel Mass Membership Gifted
This event will run once for each time a user in your channel gifts a **set** of memberships. Mass memberships are when the user selects a number of memberships to gift and they are randomly gifted out to users in the channel. For example, if a user gifts 5 memberships to your channel, this event will be run once, while the [YouTube Channel Membership Gifted](/docs/platforms/youtube#youtube-channel-membership-gifted) will be run 5 times, once for each user. The [User](/docs/reference/special-identifiers#user) Special Identifiers reference the user that GIFTED the membership (Ex: $username).

What determines whether this command or the YouTube Channel Membership Gifted command will run is based on what is set for the Mass Gifted Subscriptions Filter Amount under Settings -> Commands. This option is designed to help reduce the spam of membership gifted commands and provide a better experience for your stream. For example, if this option is enabled and the amount is set to 5, then any time 5 OR LESS memberships are gifted at once, it will ONLY run the regular Membership Gifted event for each subscription. If MORE THAN 5 are gifted, then it will ONLY run the Mass Membership Gifted event once. Note that this will cause the processing of Membership Gifted & Mass Membership Gifted events to be slightly delayed, typically less than 10 seconds.

This event provides the following additional Special Identifiers:
- $subsgiftedamount = The number of memberships gifted.
- $usersubplan = The name of the membership level that the user paid for.

### YouTube Channel Super Chat
This event will run when a user performs a super chat in your channel. The [User](/docs/reference/special-identifiers#user) Special Identifiers reference the user that performed the super chat. This event provides the following additional Special Identifiers:
- $message = The message included with the super chat.
- $amount = The amount spent as part of the super chat in display format (EX: $1.23)
- $amountnumber = The amount spent as part of the super chat in pure decimal format (EX: 1.23)
- $amountnumberdigits = The amount spent as part of the super chat as pure digits (EX: 123)
- $currencytype = The ISO 4217 (https://en.wikipedia.org/wiki/ISO_4217) currency code for the amount spent on the super chat (EX: USD)
- $tier = The tier of the super chat. Super Chat tiers define a range of money spent towards a Super Chat, starting at 1 and progressively increasing by 1 with every tier. The below chart is a rough approximation of the range for each tier, with the first row being tier 1. For amounts in currencies other than USD, YouTube will convert it to an equivalent USD amount to determine its tier. (EX: 1)

### YouTube Channel Jewels Gift
This event will run when a user gifts Jewels in your channel. The [User](/docs/reference/special-identifiers#user) Special Identifiers reference the user that performed the Jewels gift. This event provides the following additional Special Identifiers:
- $message = The message included with the Jewels gift.
- $jewelsamount = The amount of Jewels redeemed for the gift. (EX: 10)
- $giftname = The name of the gift.
- $giftimageurl = The URL of the gift.
- $giftdurationseconds = The duration to display the gift URL. (EX: 5)
- $gifthasvisualeffect = Whether the gift has a visual effect. (EX: true)
- $giftcombocount = The combo count of the gift, or 0 if not a combo. (EX: 3)
