> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About Automations

## Article: About Automations

## Article Link: https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/automations/about-automations.md

## Article Content:

# About Automations

An automation is a workflow that Wix runs when something happens on a site. A trigger, such as a form submission, starts the automation, and its actions do the work, such as sending a confirmation email. Wix users build automations on the **Automations** page of the site dashboard, without writing code.

On a Studio Two site, your code can start an automation with a custom trigger, which the automation builder lists as **Velo code trigger**. Use it when your site detects an event that no built-in trigger covers, such as a site visitor clicking a button in an [Editor React Component (ERC)](https://dev.wix.com/docs/studio-two/code-your-site/code-model/editor-react-components/about-editor-react-components.md). The automation then runs Wix's built-in actions, so you don't write the code that does the work.

## How site code runs an automation

In Studio Two, frontend code reaches backend code only through [HTTP endpoints](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/http-endpoints/about-http-endpoints.md), so an endpoint runs the custom trigger. When a Wix user selects **Velo code trigger** in the automation builder, the builder shows a trigger ID for the automation. Your site's code then runs the automation like this:

1. Frontend code, such as an ERC or a [Data Source](https://dev.wix.com/docs/studio-two/code-your-site/code-model/data-sources/about-data-sources.md), calls an HTTP endpoint in your site project.
2. The endpoint calls [Run Trigger](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/custom-trigger/run-trigger?apiView=SDK.md) from `@wix/automations` with the trigger ID.
3. Wix runs the automation's actions.

For the steps, see [Run an Automation from Site Code in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/automations/run-an-automation-from-site-code-in-studio-two.md).

### Send data to the automation

Your code can send a payload to the automation. A payload is an object of values for the automation's actions to use, such as a message that a site visitor typed. To make the payload's fields available to the actions, a Wix user defines the payload structure in the trigger's settings, from sample JSON. A field, such as **Message**, then appears in the actions. For example, a **Send an email** action can include the message in the email.

The payload is optional. Without one, the automation runs with no data from your code.

Any site visitor can call your endpoint, so treat the payload as site visitor input. Validate it in the endpoint before you send it on.

## What Studio Two doesn't support

Custom actions aren't supported in Studio Two. You can't write code that runs as a step of an automation.

To run your own logic as part of the flow, run it in your HTTP endpoint before the endpoint calls Run Trigger. Then use built-in actions for the rest of the automation.

## See also

- [Run an Automation from Site Code in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/automations/run-an-automation-from-site-code-in-studio-two.md)
- [About HTTP Endpoints](https://dev.wix.com/docs/studio-two/code-your-site/build-a-custom-backend/http-endpoints/about-http-endpoints.md)
- [Wix Automations: About the New Automations Builder](https://support.wix.com/en/article/wix-automations-about-the-new-automations-builder)