Workflow

The `Workflow` entity.

Definition

TypeScript
interface Workflow {
  id: string;
  workspaceId: string;
  name: string;
  description: string | null;
  entryNodeId: string | null;
  outputNodeId: string | null;
  inputSchema: any;
  outputSchema: any;
  createdBy: string;
  runtimeUserId: string | null;
  deletedAt: string | null;
  retentionTier: "short" | "medium" | "long" | "none" | null;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
workspaceIdstringrequired — Workspace that owns this workflow.
namestringrequired — Human-readable workflow name.
descriptionstring | nullrequired — Optional longer-form description.
entryNodeIdstring | nullrequired — Node where execution begins; null until the graph is assembled.
outputNodeIdstring | nullrequired — Node whose output becomes the workflow's return value when run as a typed sync function.
inputSchemaanyrequired — Zod-shaped schema describing the workflow's input contract. Null means untyped (unknown).
outputSchemaanyrequired — Zod-shaped schema describing the workflow's output contract. Null means untyped (unknown).
createdBystringrequired — User who created the workflow.
runtimeUserIdstring | nullrequired — Override the workspace default service user as the runtime caller when this workflow runs headlessly. Null = inherit workspace default. Workspace-admin-only to set; target user must be a member of the workspace.
deletedAtstring | nullrequired — ISO-8601 timestamp of soft-delete; null while active. Cleanup worker hard-deletes once deletedAt + retentionTier.days passes.
retentionTier"short" | "medium" | "long" | "none" | nullrequired — Retention tier snapshotted at delete time. short=7d, medium=30d, long=90d, none=never. Null while active.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last update.