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.
It's important to note the following points before starting to code:
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 the trigger. The automation runs when the trigger occurs.
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.
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.