> ## 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.

# AutomationPublishResult

> The outcome of `publishAutomation`.

**Required scopes:** [`automations_write`](/docs/api-reference/v3/reference/scopes#scope-automations_write)

**automation** *required*

The automation after the call.

**fields**

**createdAt** *required*

When the automation was created.

**enabled** `Boolean!` *required*

Whether the automation runs when its trigger fires. Change it with `updateAutomation`.

**id** `ID!` *required*

The id of this automation.

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

The automation's name.

**publishedVersion** `Int`

The latest published version; null until first published.

**revision** `String!` *required*

The draft's revision. Opaque; pass it to `publishAutomation` as `expectedRevision`.

**runs** *required*

Runs, newest first. Runs are deleted 30 days after they finish.

**Requires:** [`automations_read`](/docs/api-reference/v3/reference/scopes#scope-automations_read)

**fields**

**Arguments**

**after** `String`

Returns runs after this cursor.

**first** `Int`

Returns the first N runs (max 100, default 25).

**status**

Only runs with one of these statuses.

**Fields**

**edges** *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** *required*

Pagination metadata for the current page.

**script** `String!` *required*

The draft as AutomationScript, Function code inline. To change it, open a workspace with `createWorkspace`.

**triggerKind** `String!` *required*

The draft's trigger kind.

**updatedAt** *required*

When the automation was last changed.

**versionStrategy** *required*

Which version runs already in flight continue on.

**versions** *required*

Published versions, newest first.

**Requires:** [`automations_read`](/docs/api-reference/v3/reference/scopes#scope-automations_read)

**fields**

**Arguments**

**after** `String`

Returns versions after this cursor.

**first** `Int`

Returns the first N versions (max 100, default 25).

**Fields**

**edges** *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** *required*

Pagination metadata for the current page.

**diagnostics** *required*

Why an INVALID publish was refused, with positions in the automation's script.

**fields**

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

A stable code, such as E0101.

**column** `Int`

1-based column on that line.

**fixes** *required*

Suggested fixes, best first.

**fields**

**edits** *required*

The edits, in order.

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

True when the edits insert a placeholder you must fill in before committing.

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

What the fix does.

**line** `Int`

1-based line in the document, when it has one.

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

What is wrong.

**severity** *required*

How much it matters.

**risks** *required*

What publishing does that needs acknowledging.

**fields**

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

RUNS\_MOVE, RUNS\_END, RUNS\_MOVE\_AT\_NEXT\_WAIT, PREVIEW\_TRUNCATED or PREVIEW\_UNAVAILABLE.

**details** *required*

Counts behind the message.

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

What would happen.

**runs** *required*

What publishing does to runs in progress.

**fields**

**atNextWait** `Int!` *required*

Runs that move, or are cancelled, at their next wait.

**ending** `Int!` *required*

Runs cancelled because the step they're on was removed or changed kind.

**moving** `Int!` *required*

Runs that continue on the new version.

**staying** *required*

PINNED runs, which stay on their version.

**fields**

**count** `Int!` *required*

Runs on it.

**version** `Int!` *required*

The version.

**truncated** `Boolean!` *required*

Too many runs to count them all; the counts are a floor.

**status** *required*

What happened.

**version** `Int`

The version published, when PUBLISHED.


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