> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# automationCheck

> Check an automation's definition as publishing would, without saving it, and return the types its expressions can use. For an editor that changes `Automation.definition` and saves it with `automationDraftUpdate`.

**Required scopes:** [`automations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-automations_read)

## Arguments

**definition** `[AutomationDefinitionInput!](/docs/api-reference/v3/reference/automations/automation-definition-input)` *required*

The whole definition to check.

**fields**

**edges** `[\[AutomationGraphEdgeInput!\]!](/docs/api-reference/v3/reference/automations/automation-graph-edge-input)` *required*

How runs move between the nodes, at most 1000.

**fields**

**from** `String!` *required*

`"trigger"` or the id of the step the run leaves.

**port** `String!` *required*

The port it leaves by, such as `next` or `true`.

**to** `String!` *required*

The id of the next step.

**entryCondition** `[JSON](/docs/api-reference/v3/reference/common/json)`

An expression a run must meet to start; omitted admits every run.

**name** `String!` *required*

The automation's name.

**rulesVersion** `String`

The checker rules to hold it to. Omitted: a saved automation keeps its own, and a new one gets the newest.

**steps** `[\[AutomationStepInput!\]!](/docs/api-reference/v3/reference/automations/automation-step-input)` *required*

The steps, at most 500.

**fields**

**code** `String`

A `core.function` step's TypeScript code; only that kind takes it.

**config** `[JSON!](/docs/api-reference/v3/reference/common/json)` *required*

The kind's settings, matching the `configJsonSchema` of this kind and version in `automationKinds`.

**description** `String`

A note on the step.

**disabled** `Boolean`

Skip the step when the automation runs.

**id** `String!` *required*

The step's id, unique in the automation.

**kind** `String!` *required*

The step kind, such as `core.wait`.

**kindVersion** `Int!` *required*

The version of the kind the config is written for.

**position** `[AutomationNodePositionInput](/docs/api-reference/v3/reference/automations/automation-node-position-input)`

Where it sits on the canvas.

**title** `String`

The step's name; omitted shows the kind's title.

**trigger** `[AutomationTriggerInput!](/docs/api-reference/v3/reference/automations/automation-trigger-input)` *required*

What starts a run.

**fields**

**config** `[JSON!](/docs/api-reference/v3/reference/common/json)` *required*

The kind's settings, matching the `configJsonSchema` of this kind and version in `automationKinds`.

**description** `String`

A note on the trigger.

**kind** `String!` *required*

The trigger kind, such as `core.schedule`.

**kindVersion** `Int!` *required*

The version of the kind the config is written for.

**position** `[AutomationNodePositionInput](/docs/api-reference/v3/reference/automations/automation-node-position-input)`

Where it sits on the canvas.

## Returns

**automationCheck** `[AutomationCheck!](/docs/api-reference/v3/reference/automations/automation-check)` *required*

An automation checked as publishing checks it, with the types its expressions can use.

**fields**

**diagnostics** `[\[AutomationDiagnostic!\]!](/docs/api-reference/v3/reference/automations/automation-diagnostic)` *required*

Its problems. Any ERROR blocks publishing.

**fields**

**code** `String!` *required*

A stable code, such as F0004. Read `diagnostics/<code>` in `automationCatalog`.

**fixes** `[\[AutomationFix!\]!](/docs/api-reference/v3/reference/automations/automation-fix)` *required*

Suggested fixes, best first.

**fields**

**definition** `[AutomationDefinition!](/docs/api-reference/v3/reference/automations/automation-definition)` *required*

The definition with the fix applied.

**needsInput** `Boolean!` *required*

It fills in a placeholder you should check first.

**title** `String!` *required*

What the fix does.

**message** `String!` *required*

What is wrong.

**path** `[String!]`

Where in that step it is, such as `["config", "seconds"]`; without a step, where in the definition. Null when it has no one place.

**rulesVersion** `String!` *required*

The rules version its code arrived in. An error from a version newer than the automation's is reported as a WARNING.

**severity** `[AutomationDiagnosticSeverity!](/docs/api-reference/v3/reference/automations/automation-diagnostic-severity)` *required*

How much it matters. ERROR blocks publishing.

**stepId** `String`

`"trigger"` or the id of the step it is on; null for the automation as a whole.

**entryContextType** `String`

The type `entryCondition` reads, defined in `typesSDL`.

**steps** `[\[AutomationStepAnalysis!\]!](/docs/api-reference/v3/reference/automations/automation-step-analysis)` *required*

Each step, in the definition's order.

**fields**

**contextType** `String`

The type expressions in the step read, defined in `typesSDL`. Null when the automation can't be typed.

**id** `String!` *required*

The step's id.

**outputType** `String`

The type later steps read from it under `steps`; null when it produces nothing.

**ports** `[\[AutomationPort!\]!](/docs/api-reference/v3/reference/automations/automation-port)` *required*

The ports its config gives it.

**fields**

**id** `String!` *required*

The port's id, as `AutomationEdge.port` names it.

**label** `String!` *required*

What editors show.

**summary** `String`

A one-line description of its settings.

**typesSDL** `String`

GraphQL SDL of every type the context and step outputs use. Null when the automation can't be typed, such as an unknown trigger.

## Example

```graphql theme={null}
query {
  automationCheck(definition: { ... }) {
    entryContextType
    typesSDL
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.