Manage the retrieval and deployment of automations.
Overview
Manage the retrieval and deployment of automations: a trigger plus a workflow of steps that runs when the trigger fires. Deploying automations as artifacts lets you keep them in source control and ship them in packages alongside the objects, configuration variables, and custom agents they depend on.
$ sked artifact automation <command>
Automations are available on the Skedulo Pulse Platform only, and the automations beta must be enabled for your team. See Learn about the automations beta.
If the automation commands are missing from your CLI, run sked artifacts update-descriptors to refresh the list of artifact types. If they are still missing, contact Skedulo support.
State file
The easiest way to produce a state file is to build the automation in the automation builder, then retrieve it with get. The file holds the trigger and the workflow definition:
{"metadata":{"type":"Automation"},"name":"sick-leave-find-cover","description":"Raise a Tempo task when sick leave is recorded.","status":"active","trigger":{"type":"recordModified","config":{"objectType":"Availabilities","operations":["Insert"],"filter":"current.IsAvailable == false AND current.Type == 'Sick'"}},"workflow":{"description":"Create a Tempo task for the leave.","definition":{"StartAt":"CreateTask","States":{"CreateTask":{"Type":"Task","Resource":"action:create-tempo-task","Arguments":{"title":"Sick leave recorded: find cover","description":"{% 'A resource has recorded sick leave from ' & $trigger.current.Start & ' to ' & $trigger.current.Finish & '. Find cover for their jobs in that window.' %}"},"End":true}}}}}
Field
Description
name
The automation’s name. Identifies it in get, delete, and upsert.
status
active or inactive. An automation deployed without a status is activated.
trigger.type
recordModified, event, recordTimeOffset, or scheduled. The shape of trigger.config depends on the type; see Triggers.
workflow.definition
The steps, as an Amazon States Language state machine. Each Task state names an action as action:<action-name> and passes its arguments in Arguments, with JSONata expressions in {% %}. See Actions.
[default: 900] Number of seconds to wait for the command to complete and display results to the terminal window.
No
--name=<value>
The name of the automation.
No
Global flags
Flag
Description
Required
--json
Format output as json.
No
Upsert
Description
Create or Update an automation from a state file. A deploy that omits status leaves an existing automation’s status unchanged, so redeploying does not reactivate one that was switched off in the web app.