Task Data Type
The Task object is passed as a parameter to the TaskInitiator callback functions as taskData
. Its shape is specified below:
type Task = {trigger: {appKey: string; // `appKey` of the trigger apptriggerKey: string; // `key` of the triggercredentialId: string; // `id` of the trigger CredentialinputParams: {// Trigger input parameters[param: string]: any;};};action: {appKey: string; // `appKey` of the action appactionKey: string; // `key` of the actioncredentialId: string; // `id` of the trigger CredentialinputParams: {// Action input parameters[param: string]: any;};};};
Upon successful execution of a one off Task, the resultData
property available on the onSuccess
callback will have the following shape:
type TaskResultData = {actionOutput: any;triggerOutput: any;};
For example, when using a third party trigger such as a Dropbox file
selection, the triggerOutput
will contain the relevant metadata necessary to
act upon.
// after successful execution of a task with a dropbox trigger source:triggerOutput: {file_name: "vegeta.svg",direct_media_link: "http://linkto.file",bytes: 9001// etc}