Automation Data Type

The Automation object is passed as a paramter to a number of callback functions. Its shape is specified below:

type Automation = {
id: string; // UUID of the Automation
active: boolean; // Whether the Automation is currently active
status: string; // Status of the Automation: Either INVALID, meaning the Automation is invalid and cannot be run, or READY, meaning the Automation is valid and can be run
userId: string; // ID of the corresponding user (passed in via JWT sub claim)
name: string; // Automation name
blueprintKey: string | null; // The blueprintKey in case of blueprint automation, or null
trigger: {
appKey: string; // `appKey` of the trigger app
triggerKey: string; // `key` of the trigger
credentialId: string; // `id` of the trigger Credential
inputParams: {
// Trigger input parameters
[param: string]: any;
};
};
action: {
appKey: string; // `appKey` of the action app
actionKey: string; // `key` of the action
credentialId: string; // `id` of the trigger Credential
inputParams: {
// Action input parameters
[param: string]: any;
};
};
customData: null | {
// Your custom data
[key: string]: any;
};
subscribeData: null | {
// Subscribe data
[key: string]: any;
};
};