> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mottostreaming.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions engine

> Automations that are triggered when annotations are tagged on a video.

#### Introduction

Actions are **automations**. They are the things that happen when an annotation is triggered. For example, when a goal is scored, you may want to automatically
create a clip of that goal (either as an mp4 asset or a playable video). And maybe you want to automatically share that
clip to social media? Actions are the way to achieve this.

Motto supports a wide range of actions, all with the purpose of simplifying your workflow and automating repetitive tasks.
Or, put differently, reducing the overhead needed to run a live sports OTT platform.

Here is a non-exhaustive list of automated actions:

* **Create a clip** of a goal in your live-stream;
* **Create a highlight reel** of all goals and chances in a match;
* **Share to social media** the clip of a scored goal;
* **Send a notification** to all users that have favorited a team when a goal is scored;
* **Write a message** in a chat room when kickoff starts;
* **Send a webhook callback** to a third-party system when the match is over.

These actions (and more) can be configured to suit your particular needs. The next section explains how this works.

## Get Started

To benefit from Motto's actions system, you must first think through your particular use-cases. What do you want to happen when a goal is scored? Or when a match is over? The following section helps you understand what is possible.

<Note>To get started with actions, you must first ensure that you have followed the steps in the [annotations](/guides/annotations) guide. This is because actions are triggered by annotations.</Note>

#### Action Types

Motto offers a range of action types, such as creating a clip, sharing to social media, or sending a webhook callback.
To find out which action types are available for your use-cases, please [reach out](mailto:info@mottostreaming.com) to Motto's support team.

#### Action Configuration

Once you have determined which action types you would like to trigger when an annotation is created, your annotation type must be configured with the appropriate action configuration.
Motto's support team can help you set this up.

For example, if you want your "Goal" annotations to trigger a highlight clip creation, the action configuration for the "Goal" annotation type would include a "create clip" action,
along with the settings specific to that action type, like the name of the clip, and the start and end times of the clip relative to the annotation time.

<Note>Each action type has its own set of settings that it requires, so the example above is only here for reference.</Note>

Once the configuration is in place, you can verify it by creating an annotation of the type you configured, and see if the action triggered.
Keep in mind that, depending on the kind of action(s) you have configured, it may take some time for the action to complete.

#### Action Secrets (advanced)

Some actions require authentication credentials, for example to post a clip to a social media account.
Rather than storing such credentials in plaintext on the action configuration, where they could be seen by anyone who has access to view your action configurations,
Motto stores them as *action secrets*. The action configuration then only references the secret, so your credentials are not accidentally leaked to unintended parties.

#### Action Chaining (advanced)

The Motto action system is designed for both simple and complex workflow automations.
Action chaining is a concept that lets you execute multiple actions in sequence, where the result of one action can be used as input for the next action.
For example, you may want one action to create a clip, and then use that clip (which is the "output" of that particular action type)
as input for an action that shares it to Instagram.

## Next Steps

If you are interested in using annotations to enrich your OTT platform experience, you may want to learn more about [frontend plugins](/guides/annotations/frontend-plugins).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.