Performing tasks in automations
Actions are the core of automations, these can carry out updates on a table, call to an external service, send emails and so on. We have built our action system to be easily extensible so actions can be added to the system at any time! Your automation can have many actions, allowing you to perform many different tasks as part of a single trigger.
Below is a few examples of actions that exist today however there may be many more when you look in the builder, to get a full list install the builder and check it out!
Create row, this will create a new row in a specified table
Update row, can be used to update a row which was triggered upon
Delete row, delete a specified row from a table, like something that was triggered upon
Send an email, as it suggests, send an email based on the specified inputs
The real power in actions is the ability to make use of outputs from previous steps, how to do this will be covered in the contextual inputs section.
We welcome ideas for further action steps, in-fact our system has been designed around making the development and deployment of new actions easy! If you have an idea for a new automation action and would like to pass it along to us, or even have a go at developing it yourself, check out our Automations repo on Github!
Kicking off automations
Each automation must have a single trigger step, this is essentially a watcher - waiting for a particular condition to be met at which point the process will kick off.
Currently there are three main ways that an automation can be triggered:
Saving a row to a particular table
Deleting a row from a particular table
An external trigger in the form of a JSON Webhook
Triggers are internal to the Budibase system and therefore cannot easily be altered - if you have an idea for a good trigger then let us know on our main Github repo! It is also possible to create custom triggers using the external Webhook, create an external application that will trigger on your required conditions and target your Budibase Webhook!
Conditional and intermediate steps
Sometimes it is necessary for your automation to make decisions as part of the process, for example if you wanted to send an email to a customer when their order enters the shipped state then you would need a logical step to handle this. An automation can have as many logical steps as you require, if you wish to filter against multiple different outputs from previous steps then this can be done with multiple filters.
Currently there are two main ways that logic can be executed in an automation:
Filtering against a specified field, with a particular operator and value to compare against
Delay, waiting a period of milliseconds before continuing
Our filter currently can handle checking a single input value against a single, if the condition is not met then the automation will stop execution, if two separate paths are required then two different automations can be used.
Discussing triggers, logic and actions
In this section we will cover the the three main components of an automation and how they are used together to create the automation processes your app requires.
Once you have created a new automation you will find a panel on the left hand side of the builder, listing steps that can be added, initially only the list of triggers, once this is picked you will be presented with a list of logic and action steps.
When a step is added to your automation you can configure it in the right panel of the builder. The various defined inputs of the step will be listed and previous step outputs can be used, as discussed .
In the following pages we will cover the three step types:
Below is a quick overview of setting up a few steps as part of an automation.