About the Automations V2 API

The Automations V2 API allows you to manage automations on a site. An automation is a workflow that runs on a site to perform tasks automatically. You can use the Automations V2 API to create, configure, and manage automations so Wix users and apps can automate business processes.

Learn more about Automations.

Use the Automations V2 API to:

Note: Learn more about an automation's architecture and data flow.

Before you begin

It's important to note the following points before starting to code:

  • The trigger and action must already exist, as you can't create them using this API.
  • Any apps that added a trigger or actions to your automation must be installed on the site you're creating the automation on.

Automation setup and configuration

When creating an automation, you must configure it with a single trigger and at least 1 action for it to run.

Note: You can create an automation without configuring an action, but such an automation is saved as a draft and can't run.

Configure a trigger

configure the trigger. The automation runs when the trigger occurs.

Add and configure actions

To add actions to an automation, provide each action's key and configuration details.

Additionally, you must configure the automation's root actions. Root actions are the first actions to run when the automation trigger occurs.

Note: You can currently only specify 1 root action.

Configure the automation's origin and status

You must also specify an automation's origin and activation status.

When you create the automation, set its configuration.status to either ACTIVE or INACTIVE. This determines whether the automation is active as soon as it is added to a site.

Specify one of the following as the automation's origin:

  • USER: A Wix user created the automation in their site dashboard.
  • APPLICATION: A Wix app created the automation as part of its logic. This type of automation is specific to a site and isn't necessarily created for every Wix user who installs the app.
  • PREINSTALLED: An app adds the automation when it's installed on a site. Preinstalled automations aren't specific to a single site. Rather, the app adds them to every site that installs it.

Terminology

  • Automation: Workflow that automatically performs tasks on a site when a specific event occurs.
  • Trigger: Event that initiates an automation, such as a form submission or a purchase.
  • Action: Task that the automation performs, such as sending an email or updating a database.
  • Input mapping: Specifies how each input value is mapped to each field in the action's input schema.
  • Origin: The entity that added the automation to a site.

Use cases

  • Create an automation to respond to site events: Run an automation whenever a particular site event occurs. For example, when a site visitor sends a Wix user a chat message, you can create an automation that responds to this event.
  • Add a delay to an existing automation: Update an automation to include a time delay between 2 actions.
Did this help?