Skip to main content
query

Requires write_automations access scope. Also: The app must have write access to automations and act on behalf of a user.

Returns a saved automation version. Without a version, returns the latest draft or the most recently published version if no draft exists.

•ID!
required

The ID of the automation to return.

•String

The automation version to return. Omit or use null to return the latest draft, or the most recently published version if no draft exists.


Was this section helpful?

•AutomationWorkflow

A version of an automation that runs tasks when a trigger event occurs. An automation can have a saved draft while another version is active. All versions share the same ID, name, and tags; configuration, note, and versionState describe the selected version.

Use automationWorkflowCreate to create a draft and automationWorkflowUpdate to edit it. Compare activeVersion with version to check whether this version is running.

Show fields
•[AutomationWorkflowValidationError!]!
non-null

Non-structural errors that prevent this automation version from activating. Results describe current readiness; activation validates again.

Show fields
•String

The version of the automation that's currently active, or null when the automation is inactive. This version is active only when it matches version.

•String

The Admin API version used by this automation version.

•JSON!
non-null

The steps, links, and custom fields (root.patched_fields) for this version, encoded as JSON. Includes __metadata.version for the configuration format. Name, tags, and note are returned as separate fields. Use this value as the replacement configuration in automationWorkflowUpdate. See the workflow configuration JSON Schema.

•DateTime!
non-null

The date and time when the automation was created.

•ID!
non-null

A globally-unique ID.

•String!
non-null

The automation name, shared by all versions.

•String

The note stored on this version. Null if no note is set.

•[String!]!
non-null

The automation tags, shared by all versions. An empty list if none are set.

•[AutomationTestEvent!]!
non-null

The automation's saved test events, newest first: at most 5 captured and 10 custom events. Test events belong to the automation, so every version returns the same list.

Show fields
•AutomationTrigger

The trigger of this version and the schema of its event payload. Null when the version has no trigger, has more than one, or its trigger task can't be found.

Show fields
•DateTime!
non-null

The date and time when the automation was last updated.

•[AutomationWorkflowValidationError!]!
non-null

Configuration errors for this version. These errors don't prevent saving or reading the automation. Non-structural blockers are returned in activationErrors.

Show fields
•String!
non-null

The identifier of this automation version. Draft edits and changes to name, tags, or note keep this identifier.

•AutomationWorkflowVersionState!
non-null

The definition state of this automation version, independent of activation.

Show enum values

Was this section helpful?