Trigger/Action Commonality
Trigger and Action assemblies share some common features and behaviors.
Most triggers and actions invoke API's that require either user-entered credentials or OAuth credentials.
The OAuth Transaction module and its variants automatically fetch the user's credentials.
If an HTTP Transaction module or its variants is used, the Service Credentials – Get module is needed to fetch API credentials saved by the App Assembly:
By default, the OAuth Transaction modules and Service Credentials module use the service account configured in the automation editor when the trigger/action were added to the automation.
See Service Accounts if you need to be able to access connected service accounts besides the one configured in the automation editor.
When a Trigger or Action assembly returns an error, the following occurs:
- The automation stops its processing immediately
- If the automation's owner has configured it to report any error, an email alert is sent to the automation's owner based on their configured email delivery schedule
- An email alert is sent to the system admin based on their configured email delivery schedule
Errors can be triggered in the following ways:
- When a Fatal Error module's criteria is met
- When a HTTP Transaction module or OAuth Transaction module, or any of their variants, has the “halt assembly if error” setting enabled and the API either returns an HTTP status code >= 400 or no data can be returned due to network-level errors
- When any module returns an error due to misconfiguration, missing required data, or processing errors
The Turn Off Automation module can be placed within a Conditional module if a permanent error is detected such that it makes no sense to keep the automation running.
An example is an action that writes rows to a spreadsheet. If the spreadsheet no longer exists, the automation should be halted.
Triggers and Actions can display configuration settings in the Automation Editor:
Configuration settings are displayed for the corresponding Parameter modules placed into the trigger and action assemblies:
In this example, the end user must first choose a workspace and then select a project within the workspace. The List Asana Projects subassembly uses the selected workspace's id to fetch the projects for the selected workspace.
The Sequence number determines the display ordering of Parameter modules in the Automation Editor.