TaskInitiator
Description#
This component allows for a user to configure and execute a one off task.
Tasks do not require automations to be configured, and are not repeatable.
Import#
import { TaskInitiator } from "@rollouthq/connect-react";
Usage#
Here's a basic usage example:
<TaskInitiatorprefilled={{trigger: {appKey: "dropbox",triggerKey: "fileSelected",},}}onTaskSuccess={({ taskData, resultData }) => {}}/>
Props#
prop | type | required | Description |
---|---|---|---|
onTaskSuccess | ({ taskData, resultData }) => Promise<void> | false | A callback to call when a task executes successfully. Available in the callback are the submitted properties taskData of TaskData shape and the action's execution resultData . |
onTaskError | ({ taskData, error }) => Promise<void> | false | A callback to call when a task fails to execute. Available in the callback are the original taskData and the thrown error . |
prefilled | object | false | Data that can be prefilled for the trigger. Please see the section on creating automations. |
variableMenuActivator | string | false | Customizes the text that triggers variable list in text editor. |