automations_read
Arguments
ID!
required
The automation’s id.
Returns
An automation built in Developer › Automations: a trigger and the steps it runs. For email and SMS flows, use MarketingAutomation. To create or edit one, use a workspace (
createWorkspace); read guide/ in automationCatalog first.Show fields
Show fields
Boolean!
required
Whether the automation runs when its trigger fires. Change it with
updateAutomation.ID!
required
The id of this automation.
String!
required
The automation’s name.
Int
The latest published version; null until first published.
String!
required
The draft’s revision. Opaque; pass it to
publishAutomation as expectedRevision.required
Runs, newest first. Runs are deleted 30 days after they finish.Requires:
automations_readShow fields
Show fields
ArgumentsFields
String
Returns runs after this cursor.
Int
Returns the first N runs (max 100, default 25).
Only runs with one of these statuses.
required
The list of edges (each a node plus its pagination
cursor).Show fields
Show fields
String!
required
Opaque cursor for this item; pass to
after/before to page from here.required
The item at this edge.
required
The nodes in this page, without the edge/cursor wrapper — a convenience over
edges.Show fields
Show fields
required
The automation this run belongs to.Requires:
automations_readWhy the run failed; null unless
status is FAILED.ID!
required
The id of this run.
required
Where the run is in its lifecycle.
required
The steps the run executed, in order, with their inputs, outputs and effects.
Int!
required
The automation version the run is on. A waiting run that a publish moves to a newer version keeps reporting the old one until it resumes.
Pagination metadata for the current page.
Show fields
Show fields
String
Cursor of the last edge in this page; pass to
after to page forward.Boolean!
required
Whether more items exist after this page (drives forward pagination with
first/after).Boolean!
required
Whether more items exist before this page (drives backward pagination with
last/before).String
Cursor of the first edge in this page; pass to
before to page backward.String!
required
The draft as AutomationScript, Function code inline. To change it, open a workspace with
createWorkspace.String!
required
The draft’s trigger kind.
required
Which version runs already in flight continue on.
required
Published versions, newest first.Requires:
automations_readShow fields
Show fields
ArgumentsFields
String
Returns versions after this cursor.
Int
Returns the first N versions (max 100, default 25).
required
The list of edges (each a node plus its pagination
cursor).Show fields
Show fields
String!
required
Opaque cursor for this item; pass to
after/before to page from here.required
The item at this edge.
required
The nodes in this page, without the edge/cursor wrapper — a convenience over
edges.Pagination metadata for the current page.
Show fields
Show fields
String
Cursor of the last edge in this page; pass to
after to page forward.Boolean!
required
Whether more items exist after this page (drives forward pagination with
first/after).Boolean!
required
Whether more items exist before this page (drives backward pagination with
last/before).String
Cursor of the first edge in this page; pass to
before to page backward.Example
query {
automation(id: "...") {
createdAt
enabled
id
name
publishedVersion
revision
runs {
nodes {
finishedAt
id
startedAt
status
version
}
pageInfo { hasNextPage endCursor }
}
script
# ...
}
}