Limiting Allowed Apps
By default, Rollout components list all supported apps and their actions and triggers when setting up an automation.
In order to limit the options, the allowedActions
and allowedTriggers
props can be passed to any component rendering Automation Form.
These prop accepts either an object defining all allowed options, or a callback which receives all options and returns the "filtered" options.
For example, to only allow Asana actions:
<AutomationCreator allowedActions={{ asana: true }} />
To only allow Asana's Create Task action:
<AutomationCreatorallowedActions={{asana: {createTask: true,},}}/>
To disable Asana and leave all other apps:
<AutomationCreatorallowedActions={(actions) => ({...actions,asana: false,})}/>
To disable Asana's Create Task action and leave all actions by other apps:
<AutomationCreatorallowedActions={(actions) => ({...actions,asana: {...actions.asana,createTask: false,},})}/>
To only allow triggers from your app, assuming your appKey
is myApp
:
<AutomationCreator allowedTriggers={{ myApp: true }} />