Automation Management
Update, enable, disable, and delete automations after they are created.
备注
The userInstance refers to ESPRMUser from User Sign in.
What This Module Does ?
List, inspect, and change existing automations via ESPAutomation instances and user-level queries.
Use this after Automation creation—for toggling, editing events/actions, or deleting.
Not for creating automations — see Automation.
Expected outcome: Automations are updated, enabled/disabled, or removed without recreating them.
Common Workflows
Fetch, disable, update, re-enable
const automation = await userInstance.getAutomationDetail("automation_id");
await automation.enable(false);
await automation.updateName("Updated name");
await automation.enable(true);
List all automations
let response = await userInstance.getAutomations();
while (response.hasNext) {
response = await response.fetchNext();
}
Partial update
await automation.update({
name: "Updated name",
enabled: true,
events: [/* ... */],
actions: [/* ... */],
});
Granular helpers
await automation.updateName("New name");
await automation.updateEvents(events, "and");
await automation.updateActions(actions);
await automation.setRetrigger(true);
Delete
await automation.delete();

