{ "$id": "automationDocument", "title": "Automation Document", "description": "An automation document based off the agendajs schema (http://agendajs.com) with all custom data residing in the 'data' property.", "type": "object", "properties": { "_id": { "$ref": "#/definitions/ObjectId" }, "name": { "$ref": "#/definitions/automationName" }, "nextRunAt": { "$ref": "#/definitions/schedulingDate" }, "repeatInterval": { "$ref": "#/definitions/repeatInterval" }, "data": { "$ref": "#/definitions/customData" } }, "required": [ "_id", "name", "data" ], "additionalProperties": true, "definitions": { "ObjectId": { "type": "string", "pattern": "^[0-9a-f]{24}$", "description": "Unique identifier of the automation" }, "automationName": { "type": "string", "minLength": 1, "examples": [ "My fancy automation name" ], "description": "Name of the automation. Two automations may not share the same name." }, "schedulingDate": { "type": "string", "format": "date-time", "description": "Agenda property defining the next time the automation will run. Stored as an ISO 8601 date." }, "repeatInterval": { "type": "string", "minLength": 1, "description": "Agenda property defining how often an automation will repeat. Stored in human interval time format (https://github.com/agenda/human-interval).", "examples": [ "1 hour", "1 day", "3 weeks", "2 months" ] }, "customData": { "type": "object", "description": "Custom data stored with an automation.", "properties": { "description": { "type": "string", "description": "A short description of the automation." }, "workflowId": { "$ref": "#/definitions/ObjectId", "description": "Unique Id of the workflow assigned to this automation." }, "formData": { "type": "object", "description": "Data object that usually corresponds with the automation's form." }, "groups": { "type": "array", "description": "Group Ids that are allowd to access this automation.", "items": { "$ref": "#/definitions/ObjectId" } } }, "required": [] }, "runWorkflowData": { "type": "object", "title": "options", "description": "Optional data when running an automation outside of a schedule (manually running an automation).", "properties": { "description": { "type": "string", "description": "Short description of the individual run of this automation. This data will be displayed in Job Manager." }, "formData": { "type": "object", "description": "Data object that usually corresponds with the automation's form." }, "groups": { "type": "array", "description": "Group Ids that are authorized to work the tasks in the job.", "items": { "$ref": "#/definitions/ObjectId" } } } } } }