App components can also be used to extend rules, Asana’s native automation feature. Rules have two core features: triggers and actions. Triggers like user assigned or task created are set to automate actions like move task to section, etc. Actions can be customized with the rule action app component.
Try app components with our interactive UI builder
For hands on learning, we recommend using our interactive UI Builder to see how app component responses are generated.
A rule action allows users to customize actions triggered by Asana's rule engine. They function similarly to a modal form, as Asana requests a form definition from the app server. The app controls the form fields, handles
on_change events, and stores the inputs of the form. When a rule is created, Asana sends a request to the app server with the user-specified inputs. When the rule is triggered, Asana sends an event to the app server.
There is a current limit of 10 rule actions created per application.
Rule actions example app
To see an example app server written for rule actions, see our app-components-rule-action-example-app on GitHub.
You can include branching logic in your rule action forms to create a dynamic user experience. That is, forms can change according to how the user responds to specific questions.
Under the hood, branching is made possible by
on_change events. While a user is filling out a form, the app server can receive
on_change requests. These requests include what the user has changed, and allow the app server to respond with an updated form (e.g., with new fields). To take advantage of
on_change events, you may set a form field's
is_watched value to
true and an
on_change_callback endpoint to hit with updates.
on_submit events allow the form to be submitted once all required fields are completed. As such, this property should only be provided during the "final branch" of your form. If the
on_submit_callback property is omitted, the submission button will be disabled.
on_submit_callback property in the FormMetadata schema for an example.
|The Rule Action name visible to end users in the rule builder (e.g., "Create a Jira issue").
|Run action URL
|A URL that Asana will make a request to when the rule is triggered.
|Form metadata URL
|A URL that Asana will make a request to to display the configuration form.
View schemas related to rule actions here in the API reference.
Updated about 1 month ago