Workflow

Workflows, built from a description or edited step by step, and run from code.

brief = noclick.Workflow.create("Morning brief")
brief.build("Every day at 8, email me today's calendar").wait()
run = brief.run().wait()

Your keys read every workflow your account can open in the app, its own and those shared with it (access), and change, build and run the ones they can edit (one a team workspace's owner pays for is billed to them). NoClick's builder (the one in the app) builds and changes one from what you describe: a WorkflowBuild you wait on, which may stop to ask something first, and which can publish the workflow's app too. A run starts where its trigger does, with the inputs as the trigger's payload. A run started inside as_user (or with user=) is recorded for that user and counts toward their spend cap; its steps still use the app's connections.

A workflow's graph is also a handle you change directly: graph() reads its steps, each Step changes with one call (update, connect, ...), and edit() sends several changes as one batch that lands whole or not at all, refused with noclick.Conflict when the workflow moved on since the version you read. Every change is a version, listed by versions() and undone with restore(history_version=...).

class Workflow

A workflow built in the NoClick app: its trigger, steps and outputs. Run it with run(inputs); inputs names what its trigger takes. access is your account's: owner, editor or viewer (one shared with it); building, running, testing and publishing it take edit access, billed to whoever pays for it (a team workspace's owner; its app stays its owner's); pausing and deleting it take owning it and paying for it.

It's also a handle to its graph: graph() reads its steps whole, each Step changes with one call, and edit() sends several changes as one version, checked against the version you read (version) when you say so. Editing takes edit access, as the app's canvas does: an editor edits a workflow shared with it.

Attributes
idstr
namestr
descriptionstr | None
inputsdict[str, Any]

A JSON schema of what run takes: a form's fields, any object for a webhook, empty if nothing.

app_urlstr | None

Where to open it in the NoClick app.

accessstr

Your account's access: owner, editor or viewer.

folder_idstr | None

The folder of your account's it's in (Workflow.folders()); None at the top, and for one shared with you.

ownerdict[str, Any] | None

Who owns it, for one shared with you ({"name": ...}); None for your account's own. Read on a listing.

shared_atAny

When it was shared with you (Workflow.shared_with_me()).

previewdict[str, Any] | None

Its graph as a picture of it needs it, {nodes, edges} in its saved shape (Workflow.in_folder(..., preview=True)); None when not asked for.

step_typeslist[str]

What it's made of, at a glance, in a list too: at most four of its step types, its triggers first, then its agents (one on a coding harness as agent:<harness>, agent:codex), then the rest, never a note.

created_atAny
updated_atAny
stepslist[WorkflowStep]

Its steps in order, each with its settings, connection and trigger state (read with one workflow, not in a list).

edgeslist[dict[str, Any]]

How its steps are wired: {from, to, kind}, kind data or tools (a step an agent uses as a tool).

pausedbool

Whether a pause switched its triggers off.

readinessdict[str, Any]

Whether it's set up to run: status (needs_setup, waiting_for_input, input_observed, configured, paused when its triggers are all switched off, ...), what that status meaning is in a sentence, the issues in the way (a step whose last run failed among them), the warnings that don't stop it running (an agent's tool with no account connected), and unverified, the steps no run has completed yet, each {step, code, message}. An issue's code says whose move it is: missing_credentials waits on an account, left_for_user on a required setting the step leaves for its person to fill in, and invalid_config is a setting a run would refuse.

urlslist[dict[str, Any]]

The URLs it answers at: {kind, url, step, public}, kind endpoint, app (its published app) or mcp (a hosted MCP server).

latest_buildWorkflowBuild | None

The build create(..., instructions=...) or build() started here (None otherwise).

versionint | None

Its version as this handle last read or wrote it: what edit(if_version=...) checks against. Every change to its definition moves it on, and so do NoClick's own records of a trigger's registration. Reading it loads the workflow if nothing has yet.

last_editWorkflowEdit | None

What this handle's last edit did (None until one): its version, its summary, each op's results and each touched step's verdict.

createclassmethodasync

noclick.Workflow.create(
    name=None, *, instructions=None, description=None, questions=None, folder=None,
    organization_id=None, client=None
) -> Workflow

A new workflow in your account. With instructions NoClick's builder starts building it: wait on latest_build. A name your account already has raises noclick.Conflict (change that one with build); with none it takes the next free Untitled (Untitled, Untitled 2, ...), as the app names a blank one. questions="assume": the builder asks nothing, as build() takes it. folder (a WorkflowFolder or its id) files it there; organization_id makes it in a team workspace you're in, billed to whoever pays for it.

Parameters
namestr | Nonedefault None
instructionsstr | Nonedefault None
descriptionstr | Nonedefault None
questionsstr | Nonedefault None
folderWorkflowFolder | str | Nonedefault None
organization_idstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Workflow

The new workflow; latest_build is its build when instructions describe it.

Usage
brief = noclick.Workflow.create(
    "Morning brief", instructions="Every day at 8, email me today's calendar and unread emails",
)
result = brief.latest_build.wait(timeout=900)
print(result.summary, [step.name for step in result.steps])

from_nameclassmethod

noclick.Workflow.from_name(name, *, description=None, client=None) -> Workflow

A lazy reference to the workflow called name in the app. Two workflows with the same name raise noclick.Conflict on first use (rename one, or use from_id), and none raises noclick.NotFound (create makes one).

Given description, it gets the workflow, then sets its description when it differs, every time it runs; nothing else about the workflow is touched. Set it in a setup script or at startup, and take the bare handle in request handlers.

Parameters
namestrrequired
descriptionstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Workflow

A workflow that loads the first time it's used. Nothing is sent yet.

Usage

Refer to a workflow by name:

intake = noclick.Workflow.from_name("order-intake")
run = intake.run({"order_id": "o_1042"}).wait()
print(run.outputs)

Or get it and set its description:

intake = noclick.Workflow.from_name("order-intake", description="Files each new order in Linear.")
print(intake.description)

from_idclassmethod

noclick.Workflow.from_id(workflow_id, *, client=None) -> Workflow

A lazy reference to a workflow by id.

Parameters
workflow_idstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Workflow

A workflow that loads the first time it's used. Nothing is sent yet.

Usage
intake = noclick.Workflow.from_id("2e3a9296-1bf5-4088-a20d-7c31937380c4")
print(intake.name, intake.inputs)

getclassmethodasync

noclick.Workflow.get(workflow_id, *, client=None) -> Workflow

Load a workflow by id now; an unknown id raises noclick.NotFound.

Parameters
workflow_idstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Workflow

The workflow, loaded.

Usage
intake = noclick.Workflow.get("2e3a9296-1bf5-4088-a20d-7c31937380c4")
print(intake.name, intake.app_url)

listclassmethodasync

noclick.Workflow.list(
    *, q=None, search=None, limit=None, credential_id=None, client=None
) -> list[Workflow]

Your account's workflows, most recently changed first. q is a case-insensitive prefix of the name; search, text its name or description holds, in any case; credential_id keeps those whose steps use that connected account (Connection.credential_id).

Parameters
qstr | Nonedefault None
searchstr | Nonedefault None
limitint | None

Return at most this many.

(default None)
credential_idstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[Workflow]

Every matching workflow, fetched page by page (or the first limit).

Usage
for workflow in noclick.Workflow.list():
    print(workflow.name, workflow.updated_at)

list_pageclassmethodasync

noclick.Workflow.list_page(
    *, cursor=None, limit=None, q=None, search=None, credential_id=None, client=None
) -> Page

One page of workflows; pass next_cursor back as cursor.

Parameters
cursorstr | None

The next_cursor of the page before; omit it for the first page.

(default None)
limitint | None

Return at most this many.

(default None)
qstr | Nonedefault None
searchstr | Nonedefault None
credential_idstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Page

A page whose data holds the workflows and whose next_cursor is None on the last page.

Usage
page = noclick.Workflow.list_page(limit=25)
for workflow in page.data:
    print(workflow.name)

foldersclassmethodasync

noclick.Workflow.folders(
    *, organization_id=None, shared_with_me=False, client=None
) -> list[WorkflowFolder]

Your account's workflow folders, as the app's Automations page shows them: the ones it made in its own workspace, the shallowest first, then by name. A workflow's folder_id names the one it's in. organization_id: a team workspace your account's person is in, every folder there (a teammate's with access viewer); shared_with_me: the folders others shared with you.

Parameters
organization_idstr | Nonedefault None
shared_with_mebooldefault False
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[WorkflowFolder]

Each folder, with its parent_id (None at the top) and its workflow_count.

Usage
for folder in noclick.Workflow.folders():
    print("  " * folder.depth + folder.name, folder.workflow_count)

in_folderclassmethodasync

noclick.Workflow.in_folder(
    folder, *, organization_id=None, preview=False, client=None
) -> WorkflowFolderListing

The workflows of one folder (a WorkflowFolder, its id, or None for the top) as the app's Automations page lists them, most recently changed first, each with its owner (None for your account's own). preview=True adds each one's preview. In a team workspace with organization_id.

Parameters
folderWorkflowFolder | str | Nonerequired
organization_idstr | Nonedefault None
previewbooldefault False
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowFolderListing

The workflows, and how many shared with you your plan left out.

Usage
for workflow in noclick.Workflow.in_folder(None, preview=True).workflows:
    print(workflow.name, len(workflow.preview["nodes"]))

shared_with_meclassmethodasync

noclick.Workflow.shared_with_me(*, client=None) -> list[Workflow]

The workflows others shared with your account's person, newest share first, each with its access, owner (who shared it) and shared_at.

Parameters
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[Workflow]

Each workflow shared with you.

Usage
for workflow in noclick.Workflow.shared_with_me():
    print(workflow.name, workflow.owner["name"], workflow.access)

update_folderclassmethodasync

noclick.Workflow.update_folder(
    folder, *, name=None, description=None, parent=_KEEP, organization_id=None,
    client=None
) -> WorkflowFolder

Rename one of your account's folders, change its line, or move it into another of its folders (parent: a WorkflowFolder, its id, or None for the top), as the app's rename and drag do. A folder never goes into itself or one inside it.

Parameters
folderWorkflowFolder | strrequired
namestr | Nonedefault None
descriptionstr | Nonedefault None
parentWorkflowFolder | str | object | Nonedefault _KEEP
organization_idstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowFolder

The folder as it is now.

Usage
noclick.Workflow.update_folder(reports, name="Weekly reports", parent=None)

create_folderclassmethodasync

noclick.Workflow.create_folder(
    name, *, description=None, parent=None, organization_id=None, client=None
) -> WorkflowFolder

A new folder in your account's workspace, at the top or in parent (a WorkflowFolder or its id), as the app makes one. A name parent's folders already have raises noclick.Conflict, naming that folder (folder_id).

Parameters
namestrrequired
descriptionstr | Nonedefault None
parentWorkflowFolder | str | Nonedefault None
organization_idstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowFolder

The new folder.

Usage
reports = noclick.Workflow.create_folder("Reports")
weekly = noclick.Workflow.create_folder("Weekly", parent=reports)
noclick.Workflow.from_name("Morning brief").move_to(weekly)

delete_folderclassmethodasync

noclick.Workflow.delete_folder(
    folder, *, organization_id=None, client=None
) -> WorkflowFolder

Delete one of your account's folders (a WorkflowFolder or its id), as the app does: the workflows in it move to its parent (the top, for one at the top) and the folders in it go with it, their workflows moving to the top. No workflow is deleted.

Parameters
folderWorkflowFolder | strrequired
organization_idstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowFolder

The folder as it was.

Usage
for folder in noclick.Workflow.folders():
    if folder.workflow_count == 0:
        noclick.Workflow.delete_folder(folder)

move_toasync

workflow.move_to(folder, *, organization_id=None) -> Workflow

Move it into one of your account's folders (a WorkflowFolder or its id), or out to the top with None, as dragging it does in the app. It takes what changing it takes: owning it and paying for it.

Parameters
folderWorkflowFolder | str | Nonerequired
organization_idstr | Nonedefault None
Returns
Workflow

This workflow, read again (folder_id is the folder it's in now).

Usage
brief = noclick.Workflow.from_name("Morning brief")
brief.move_to(noclick.Workflow.create_folder("Reports"))
brief.move_to(None)   # back to the top

forkasync

workflow.fork(*, name=None, organization_id=None) -> Workflow

A copy of it, your account's own, as the app's Copy makes one: none of the accounts its steps used, none of its runs, a per_user variable emptied for you to fill. Named name, else "Copy of" its name; in a team workspace with organization_id.

Parameters
namestr | Nonedefault None
organization_idstr | Nonedefault None
Returns
Workflow

The copy, in full.

Usage
mine = noclick.Workflow.from_name("Their brief").fork(name="My brief")

graphasync

workflow.graph() -> WorkflowGraph

Read its definition whole: its name, description and settings, every step with its settings as stored (never a secret), its notes and edges, at its current version.

Returns
WorkflowGraph

The WorkflowGraph; this handle's version is now its.

Usage
brief = noclick.Workflow.from_name("Morning brief")
graph = brief.graph()
for step in graph.steps:
    print(step.id, step.type, step.name, step.settings)
print(graph.edges, graph.version)

variablesasync

workflow.variables() -> WorkflowVariables

Read its variables with their values, which graph() and every other read hold back (settings_withheld, variables_withheld).

For the workflow's owner and the teammates who can edit it: signed in, or with one of their account's own secret keys that names the workflows:variables scope (a key with every scope, *, holds it only when it's named too) and acts for no user. Anyone else raises noclick.PermissionDenied: someone who only views the workflow, a user's session, an app's code, an agent or an MCP connection. Writing a variable stays its owner's. A step reads a variable as {{vars.name}} without this call.

Returns
WorkflowVariables

The WorkflowVariables: its definitions whole, the graph's own variables, and values by name.

Usage
owner = noclick.Client(api_key="nk_live_...")   # a key that names workflows:variables
brief = noclick.Workflow.from_name("Morning brief", client=owner)
for name, value in brief.variables().values.items():
    print(name, "is set" if value else "is empty")

stateasync

workflow.state(*, step=None) -> WorkflowState

Read what its State step keeps (step, else its first), as its interfaces read it.

Parameters
stepstr | Nonedefault None
Returns
WorkflowState

The WorkflowState: values by key, and the step_id keeping them.

Usage
counter = noclick.Workflow.from_name("Visit counter")
print(counter.state().values.get("visits", 0))

set_stateasync

workflow.set_state(key, value, *, step=None) -> WorkflowState

Set one key its State step keeps (step, else its first), as its interfaces do; None takes the key out. Takes edit access to the workflow.

Parameters
keystrrequired
valueAnyrequired
stepstr | Nonedefault None
Returns
Usage
counter = noclick.Workflow.from_name("Visit counter")
counter.set_state("visits", 0)

setupasync

workflow.setup() -> WorkflowSetup

Read what the workflow needs from its person before it can run: the accounts to connect, the values only they know and the variables an agent step's shell asked for, derived from the workflow as it stands. Code that builds without a person reads this and connects or fills in each item itself; a build's result carries it too (setup).

Returns
WorkflowSetup

The WorkflowSetup: its items, whether it's ready, and the setup request still waiting on the person.

Usage
brief = noclick.Workflow.from_name("Morning brief")
for item in brief.setup().items:
    print(item["kind"], item["label"])

lend_connectionasync

workflow.lend_connection(connection) -> dict[str, Any]

Let this workflow's automatic runs, which go as its owner, use a connection of your account's own (credential:<id>) that its owner's runs can't, as the app does when a member of its team workspace picks their own account on a step: it reaches this workflow alone, and no one else reads its secret, but anyone who can edit the workflow can make it act as you. Your own workflow's steps need no lend.

Parameters
connectionstrrequired
Returns
dict[str, Any]

lent, with what to tell the person (notice: title, detail), or false when there was nothing to lend (yours already, lent before, or one its owner's runs reach).

Usage
shared = noclick.Workflow.from_name("Team digest").lend_connection("credential:...")
print(shared["lent"], (shared["notice"] or {}).get("title"))

take_back_connectionasync

workflow.take_back_connection(connection) -> dict[str, Any]

Take back a connection of yours lent to this workflow's runs (lend_connection): they can't use it from now on.

Parameters
connectionstrrequired
Returns
dict[str, Any]

withdrawn: whether it was lent.

Usage
noclick.Workflow.from_name("Team digest").take_back_connection("credential:...")

request_setupasync

workflow.request_setup(*, via='auto') -> WorkflowSetup

Send what the workflow needs to the account's owner as ONE request: one message and one page, where they connect each app and fill in each value, each part landing on the workflow as they give it. An app the account holds exactly one working connection of is connected at once, asking nobody. The same list already waiting isn't sent again (sent is None); a different one replaces it. Needs the workflows and humans scopes, acting for the whole account.

Args: via: How it reaches the owner: "auto" (the app they last texted NoClick on, else email), or a list of web, email, whatsapp, imessage, sms.

Parameters
viaAnydefault 'auto'
Returns
WorkflowSetup

The WorkflowSetup as setup() reads it, with sent: the request's operation (its request naming delivered_via), or None.

Usage
brief = noclick.Workflow.from_name("Morning brief")
done = brief.request_setup()
print("sent" if done.sent else "nothing new to ask", [i["label"] for i in done.items])

step

workflow.step(step_id) -> Step

A handle to one of its steps by id. Nothing is sent: an edit through it names the step by its id, and its fields load from the graph the first time you read one (a step that isn't there raises noclick.NotFound then, or when an edit names it).

Parameters
step_idstrrequired
Returns
Usage
brief = noclick.Workflow.from_name("Morning brief")
brief.step("summarize").connect("send_summary")

add_stepasync

workflow.add_step(
    type, *, operation=None, settings=None, name=None, id=None, position=None,
    secrets=None, left_for_user=None
) -> Step

Add a step of type (automation-gmail, agent, trigger-cron) doing operation with settings, as one edit. id names it (made from its type when left out); without position it's laid out beside the rest. It's judged as the app's builder judges one: a type, operation or value that can't be is refused with noclick.InvalidRequest naming it, and a setting it can't run without yet is in its verdict. A trigger's schedule or webhook registers once it's added. An agent step's secrets and the settings left_for_user (a value only its person knows, left for them to fill in) are as Step.update takes them.

Parameters
typestrrequired
operationstr | Nonedefault None
settingsdict[str, Any] | Nonedefault None
namestr | Nonedefault None
idstr | Nonedefault None
positionPosition | Nonedefault None
secretsAnydefault None
left_for_userAnydefault None
Returns
Step

The new Step, with its verdict and what the edit said about it (notes).

Usage
brief = noclick.Workflow.from_name("Morning brief")
send = brief.add_step(
    "automation-gmail", operation="send_email_message", name="Send the summary",
    settings={"to": "team@acme.com", "subject": "Today", "body": "{{ $('summarize').text }}"},
)
brief.step("summarize").connect(send)
print(send.id, send.verdict)

updateasync

workflow.update(
    *, name=None, description=None, settings=None, display_metadata=None,
    interface=None
) -> Workflow

Change its name, description or settings (by top-level key; only its owner changes those, and NoClick's own are refused). A field you leave out is never touched. display_metadata replaces what the app shows of it (its canvas's viewport), never a version; interface its Interface tab's layout as the app draws it, part of its graph.

Parameters
namestr | Nonedefault None
descriptionstr | Nonedefault None
settingsdict[str, Any] | Nonedefault None
display_metadatadict[str, Any] | Nonedefault None
interfacedict[str, Any] | Nonedefault None
Returns
Workflow

This workflow; it loads again the next time you read a field.

Usage
brief = noclick.Workflow.from_name("Morning brief")
brief.update(name="Team brief", description="Emails the team the day's calendar at 8.")

add_noteasync

workflow.add_note(
    content, *, id=None, color=None, near=None, direction=None, after=None,
    before=None, width=None, height=None
) -> Step

Put a note on the canvas: near some steps (direction: above, the default, below, left or right), or over a stretch of them from after to before. color is the app's 0 to 20; width and height its size.

Parameters
contentstrrequired
idstr | Nonedefault None
colorint | Nonedefault None
nearSequence[Any] | Nonedefault None
directionstr | Nonedefault None
afterAnydefault None
beforeAnydefault None
widthint | Nonedefault None
heightint | Nonedefault None
Returns
Step

The note: a Step of type stickyNote (its text is settings["content"]).

Usage
brief = noclick.Workflow.from_name("Morning brief")
note = brief.add_note("Runs at 8 on weekdays; edit the schedule in its trigger.", near=["every_morning"])
print(note.id)

moveasync

workflow.move(step, position) -> Step

Move a step (or a note) on the canvas to (x, y) (or {"x", "y"}). Where things sit is never a version of its own.

Parameters
stepAnyrequired
positionPositionrequired
Returns
Step

The step, at its new position.

Usage
brief = noclick.Workflow.from_name("Morning brief")
brief.move("send_summary", (640, 120))

edit

workflow.edit(
    *, if_version=None, include_graph=False, source=None, origin=None, settle=False
) -> EditBatch

Collect several edits and send them as one batch when the with block ends: they're applied in order and land as one version, or none of them do. With if_version (a version you read: version, graph().version, or the last edit's) the batch is refused with noclick.Conflict when the workflow moved on since, and the error carries the workflow as it stands (graph and version), so your code decides again from what's there. include_graph=True has the answer carry the workflow as written, read as graph() reads it.

A batch that can't be undone from its versions alone (one that removes a step holding an app, conversations or files) may be held for the account's owner when an agent, a connected app or a deployed app's code sends it: it raises noclick.ApprovalRequired, nothing of it has landed, and NoClick applies it once they approve: its operation settles then, with the batch's answer. The workflow one of your agents runs on is edited as its canvas edits it: the agent follows its prompt, harness and model, its own step stays (removing it raises noclick.InvalidRequest naming the agent), and a key that couldn't change the agent can't change it this way either.

source="canvas" says the edits are a canvas's saves, as the app's canvas sends them: each setting update_step sends replaces that setting whole and is kept as written (never rewritten nor refused for its value; the step's verdict says it isn't ready), an edge joins the handles it names, a connection sits under the slot it's given (one the step takes), and they join the canvas session's version (saves within five minutes of its first, whoever made them). origin is a name the sender gives itself (letters, digits, - and _, up to 64; a canvas tab's own id): what the workflow's open canvases hear of the write names it, so the canvas that sent it knows the change is its own.

settle=True waits, up to 30 seconds, for what the batch sets going (a trigger's registration: its webhook, its schedule, its inbox; a removed step's teardown) before the answer: result.settled says whether it finished in time, the graph (with include_graph) carries what it wrote on the steps (a trigger's webhook_url), and result.unregistered names, by step, why each trigger it left unregistered can't be yet.

Parameters
if_versionint | Nonedefault None
include_graphbooldefault False
sourcestr | Nonedefault None
originstr | Nonedefault None
settlebooldefault False
Returns
EditBatch

An EditBatch to use as a context manager (async with in async code); its result is the WorkflowEdit once the block ends.

Usage

Add a step and wire it in, both or neither:

brief = noclick.Workflow.from_name("Morning brief")
with brief.edit() as e:
    post = e.add_step("automation-slack", operation="send_message_to_channel",
                      settings={"channel": "#team", "text": "{{ $('summarize').text }}"})
    e.connect("summarize", post)
print(e.result.summary)

Read, decide, then change only if nothing changed in between, and decide again if it did:

brief = noclick.Workflow.from_name("Morning brief")
graph = brief.graph()
for attempt in range(3):
    send = graph.step("Send the summary")
    try:
        with brief.edit(if_version=graph.version) as e:
            e.update_step(send, settings={"cc": ["ops@acme.com", *send.settings.get("cc", [])]})
        break
    except noclick.Conflict as changed:
        graph = changed.graph   # the workflow as it stands; decide again from it

settleasync

workflow.settle(*, include_graph=False) -> WorkflowEdit

Wait, up to 30 seconds, for what earlier edits set going (their triggers' registrations, removed steps' teardowns), changing nothing, as an edit with settle=True waits for its own.

Parameters
include_graphbooldefault False
Returns
WorkflowEdit

A WorkflowEdit: settled (whether it finished in time), unregistered (by step, why each trigger left unregistered can't be yet) and, with include_graph, the workflow as that left it.

Usage
brief = noclick.Workflow.from_name("Morning brief")
with brief.edit() as e:
    e.add_step("trigger-webhook", id="hook", name="Order placed")
print(brief.settle(include_graph=True).graph.step("hook").settings["webhook_url"])

versionsasync

workflow.versions(*, limit=20, named=False, recent=False) -> list[WorkflowVersion]

Its versions, newest first, kept 90 days (a named one for good): each one's number, where it came from, who made it and what changed. named=True lists only the named ones, its checkpoints; recent=True only its latest unnamed ones to go back to (never the one it's at), each with its step_count, as the app's Versions list offers them.

Parameters
limitint | None

Return at most this many.

(default 20)
namedbooldefault False
recentbooldefault False
Returns
list[WorkflowVersion]

The first limit versions (20 by default; None for all of them), fetched page by page.

Usage
brief = noclick.Workflow.from_name("Morning brief")
for version in brief.versions(limit=10):
    print(version.version, version.source, version.summary, version.created_at)

name_versionasync

workflow.name_version(
    label, *, note=None, history_version=None, if_version=None
) -> WorkflowVersion

Name a version of its history, keeping it for good while it has a name: the version it's at now (a checkpoint, as the app saves one; if_version refuses it with noclick.Conflict when the workflow moved on since you read it), or the one history_version names, or another name for a named one. No later change joins a named version. Naming the version it's at now when it has a name already raises noclick.Conflict naming it (label). Restore it with restore(history_version=...). A name someone else gave is changed only by them or the workflow's owner.

Parameters
labelstrrequired
notestr | Nonedefault None
history_versionint | Nonedefault None
if_versionint | Nonedefault None
Usage
brief = noclick.Workflow.from_name("Morning brief")
saved = brief.name_version("Before the Slack change", note="Sends at 8.")
brief.step("send_summary").update(settings={"channel": "#team"})
brief.restore(history_version=saved.history_version)   # back to it

unname_versionasync

workflow.unname_version(history_version) -> WorkflowVersion

Take a version's name away (a checkpoint deleted): it's kept 90 days from its last write then, as any version. Only who named it or the workflow's owner takes it away.

Parameters
history_versionintrequired
Returns
WorkflowVersion

The WorkflowVersion, its label None.

Usage
brief = noclick.Workflow.from_name("Morning brief")
for version in brief.versions(named=True, limit=None):
    if version.label.startswith("tmp"):
        brief.unname_version(version.history_version)

versions_pageasync

workflow.versions_page(*, cursor=None, limit=None, named=False) -> Page

One page of its versions, newest first; pass next_cursor back as cursor.

Parameters
cursorstr | None

The next_cursor of the page before; omit it for the first page.

(default None)
limitint | None

Return at most this many.

(default None)
namedbooldefault False
Returns
Page

A page whose data holds the versions and whose next_cursor is None on the last page.

Usage
brief = noclick.Workflow.from_name("Morning brief")
page = brief.versions_page(limit=50)
while True:
    for version in page.data:
        print(version.version, version.summary)
    if page.next_cursor is None:
        break
    page = brief.versions_page(limit=50, cursor=page.next_cursor)

version_atasync

workflow.version_at(history_version) -> WorkflowVersion

One version of its history, by its history_version, with the definition it holds. A version it doesn't have (kept 90 days) raises noclick.NotFound.

Parameters
history_versionintrequired
Returns
WorkflowVersion

The WorkflowVersion; its graph is the workflow as it was: its name, description, settings and steps.

Usage
brief = noclick.Workflow.from_name("Morning brief")
before = brief.version_at(11)
print(before.graph.name, [step.name for step in before.graph.steps])

buildasync

workflow.build(instructions=None, *, publish=None, questions=None) -> WorkflowBuild

Change the workflow by describing the change; NoClick's builder makes it, reading the workflow as it stands. publish=True then puts its app live (or pass {"subdomain": "morrow", "title": ...}; publish() and unpublish() publish without a change). One build at a time: another in progress raises noclick.Conflict. A change costs AI usage, as building in the app does.

What the builder can't decide it asks the person whose build it is (you as the account's owner, or the user your key acts for): each input of its question is a human request NoClick sends them, which any client answers. questions="assume" asks nothing: the builder decides, and its summary and the workflow's readiness say what it assumed and what's missing.

Parameters
instructionsstr | Nonedefault None
publishbool | dict[str, Any] | Nonedefault None
questionsstr | Nonedefault None
Returns
WorkflowBuild

A WorkflowBuild: wait() gives the WorkflowBuildResult (its steps, and what was published), and next_question() returns anything it asks first.

Usage
brief = noclick.Workflow.from_name("Morning brief")
result = brief.build("Also post the brief to #team on Slack").wait(timeout=900)
print(result.summary)

builderasync

workflow.builder() -> WorkflowBuilder

Where the workflow's builds are talked through: the account's builder agent and the conversation this workflow's builds share (read it as any agent conversation: Agent.from_id(agent_id).history(conversation)), and its build under way or waiting on a question.

Returns
WorkflowBuilder

A WorkflowBuilder: agent_id and conversation are None where your builds aren't the agent's (a user's key, an app's code), or it was never made; build is None when nothing is building.

Usage
found = noclick.Workflow.from_name("Morning brief").builder()
if found.agent_id:
    print(noclick.Agent.from_id(found.agent_id).history(found.conversation))

draftasync

workflow.draft(
    steps, *, mode='full', field=None, instructions=None, write=True
) -> Operation

Have NoClick's drafter (the builder's own) pick steps' operations and fill their settings, the steps together. Each step is a Step, its id, or {"id": ..., "goal": ...}: its goal says what it's for (the drafter reads it, and a drafted step keeps it). mode is full (pick each step's operation and fill its settings; a step drafts against the operation each step it reads was given), operation (pick only the operation), fields (fill the settings of the operation a step has) or field (fill the one setting field names). instructions say what the workflow does. A step the workflow doesn't have, a note, a step that provides an agent its tools or a setting it doesn't have raises noclick.InvalidRequest before anything runs. What's drafted lands as one version of the workflow, written as an edit with your key is; the drafter never connects an account. write=False drafts the same and writes nothing: the result's edits are the edits a write would make, for you to apply as your own change (edit() takes them as they are). It costs its AI usage, at cost, written or not.

Parameters
stepsSequence[Any]required
modestrdefault 'full'
fieldstr | Nonedefault None
instructionsstr | Nonedefault None
writebooldefault True
Returns
Operation

An operation (kind workflow.draft) that reports each step as it lands (progress); wait() gives the WorkflowDraftResult, each step's verdict among it, or raises when no step could be drafted.

Usage
brief = noclick.Workflow.from_name("Morning brief")
with brief.edit() as batch:
    batch.add_step("automation-gmail", id="fetch")
    batch.add_step("automation-slack", id="post")
    batch.connect("fetch", "post")
drafted = brief.draft([{"id": "fetch", "goal": "Read today's unread email"},
                       {"id": "post", "goal": "Post a summary to #team"}]).wait()
for step_id, step in drafted.steps.items():
    print(step_id, step["operation"], step["unfilled"], step["references"])

publishasync

workflow.publish(*, subdomain=None, title=None) -> WorkflowBuild

Put the workflow's app live as it now stands, at subdomain (morrow is morrow.noclick.app; omitted, the address it has).

Parameters
subdomainstr | Nonedefault None
titlestr | Nonedefault None
Returns
WorkflowBuild

A WorkflowBuild whose result's published holds the app's url.

Usage
site = noclick.Workflow.from_name("Morrow Bakehouse site")
print(site.publish(subdomain="morrow").wait().published["url"])

unpublishasync

workflow.unpublish() -> WorkflowBuild

Take the workflow's app down, to the trash: its public URL stops answering. For 30 days its address stays its own, and restoring it (or publish()) brings it back there with the same key.

Returns
WorkflowBuild

A WorkflowBuild; its result's published says unpublished, with the trash_id that restores it and until when (restorable_until).

Usage
done = noclick.Workflow.from_name("Morrow Bakehouse site").unpublish().wait()
noclick.TrashItem.from_id(done.published["trash_id"]).restore()

pauseasync

workflow.pause(reason=None) -> Workflow

Switch off each of its triggers that's on, with reason beside them in the app: nothing starts it on its own until you resume(). Runs from code still start.

Parameters
reasonstr | Nonedefault None
Returns
Workflow

This workflow, read again (paused is True).

Usage
digest = noclick.Workflow.from_name("Hourly digest")
digest.pause("Too noisy over the weekend")

resumeasync

workflow.resume() -> Workflow

Switch back on each trigger a pause switched off (never one turned off by hand).

Returns
Workflow

This workflow, read again.

Usage
noclick.Workflow.from_name("Hourly digest").resume()

restoreasync

workflow.restore(*, history_version=None, if_version=None) -> Workflow

Bring the workflow back from the trash (within 30 days of delete()); its schedules and webhooks register again.

With history_version, put that version of its history back instead (versions() lists them): its graph, name, description and settings, as a new version of its own (source restore), so it's undone by restoring the one before it. if_version (the workflow's version you read) refuses it with noclick.Conflict, carrying the workflow as it stands, when the workflow moved on since. One that takes away a step holding an app, conversations or files may be held for the account's owner, as a batch is (noclick.ApprovalRequired).

Parameters
history_versionint | Nonedefault None
if_versionint | Nonedefault None
Returns
Workflow

This workflow. Out of the trash it's read again; after a version's restore, version is the new one, last_edit says what it did (restored_from, summary) and its fields load again the next time you read one.

Usage

Out of the trash:

noclick.Workflow.from_id("2e3a9296-1bf5-4088-a20d-7c31937380c4").restore()

Undo the last change, unless something changed since you looked:

brief = noclick.Workflow.from_name("Morning brief")
now = brief.graph().version
latest, before = brief.versions(limit=2)
brief.restore(history_version=before.history_version, if_version=now)
print(brief.last_edit.summary)   # restored version 11

deleteasync

workflow.delete() -> None

Move the workflow to the trash: its schedules and webhooks stop now, and restore() brings it back within 30 days.

Returns

Nothing.

Usage
noclick.Workflow.from_name("Old digest").delete()

delete_for_goodasync

workflow.delete_for_good() -> None

Delete a workflow in your account's trash for good, as the app's Trash does: its runs, files, tables and published apps go with it, and nothing restores it. Move it to the trash with delete() first.

Returns

Nothing.

Usage
for workflow in noclick.Workflow.trashed():
    workflow.delete_for_good()

trashedclassmethodasync

noclick.Workflow.trashed(*, client=None) -> list[Workflow]

Your account's workflows in the trash, the newest deleted first, as the app's Trash lists them: each one's raw holds its deleted_at and purge_after, when it's deleted for good unless restore() brings it back first.

Parameters
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[Workflow]

Each workflow in the trash.

Usage
for workflow in noclick.Workflow.trashed():
    print(workflow.name, workflow.raw["purge_after"])

runasync

workflow.run(
    inputs=None, *, from_step=None, only=False, manual=None, user=...,
    idempotency_key=None
) -> Operation

Start a run with inputs (checked against inputs, the workflow's schema; a mismatch raises noclick.InvalidRequest naming the field). What would stop the run is refused before anything runs: a step with no account connected raises noclick.NeedsConnection, and a workflow that can't start from code (several triggers and no Run trigger, or only events an integration pushes) or isn't set up noclick.ActionRequired.

from_step (a Step or its id) runs that step and what comes after it instead, the steps before it giving the outputs they last stored, as the app's Run from here does; with only=True that step alone. A run from a step takes no inputs, unless it's a trigger that does. A step that provides an agent its tools has no run of its own (noclick.InvalidRequest, details["reason"] tool_provider).

manual runs it as the app's Run button does ({} for a plain one): no trigger has to start runs from code (one no event fired gives its no-event placeholder), its setup isn't judged up front, and inputs go to the trigger or form step it starts at. Its keys: steps (only these run), forward_only (False: the steps before from_step run again too), settings (one-run settings by step id, nothing saved), outputs_from (a step id to the run whose stored output stands in for it) and background. Someone it's shared with to view may run it so as saved, giving values only to a trigger.

Parameters
inputsdict[str, Any] | Nonedefault None
from_stepAnydefault None
onlybooldefault False
manualdict[str, Any] | Nonedefault None
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
idempotency_keystr | None

Makes a retried create safe: the same key returns the first result. Generated when omitted.

(default None)
Returns
Operation

An operation whose .wait() gives the finished WorkflowRun, or raises the run's error if it failed.

Usage

Run it and wait for the outputs:

intake = noclick.Workflow.from_name("order-intake")
run = intake.run({"order_id": "o_1042", "rush": True}).wait(timeout=300)
print(run.outputs["summary"])

Record the run for a user, and make a retried request safe:

intake = noclick.Workflow.from_name("order-intake")
op = intake.run({"order_id": "o_1042"}, user="acme", idempotency_key="order-o_1042")
print(op.id)   # resume anywhere with noclick.Operation.from_id(op.id).wait()

Try one step again on what came in last, nothing after it:

intake = noclick.Workflow.from_name("order-intake")
run = intake.run(from_step="summarize", only=True).wait()

test_runsasync

workflow.test_runs() -> list[WorkflowTestRun]

The test runs the workflow offers, as its Test Run screen lists them: for each trigger an agent comes after, the staged situations NoClick offers for it (under the names the workflow gave them, with its edits to their messages, less the ones it removed) and the runs it authored (edit().add_test_run). Empty for a workflow with no trigger a test can stage. Reading them costs nothing.

Returns
list[WorkflowTestRun]

Each WorkflowTestRun, in the order rehearse finds them: its key and name (either names it to rehearse), the trigger it stages on and its staged message.

Usage
inbox = noclick.Workflow.from_name("Support inbox")
for run in inbox.test_runs():
    print(run.name, run.trigger["label"], run.message.get("title"))
test = inbox.rehearse(inbox.test_runs()[0].key).wait()

rehearseasync

workflow.rehearse(
    test_run=None, *, trigger=None, body=None, title=None, author=None, handle=None,
    scenario=None, user=...
) -> Operation

A test run of the workflow, as the app's Test Run plays one: a staged event arrives at one of its triggers and the agents it reaches take a real turn (their models, instructions and tools) while a simulated world answers every tool call, so nothing is sent, no account is touched and its connections needn't be connected yet (its agents' model connections must be). The steps after an agent that would reach an account never run.

test_run plays one the workflow offers, by its name or key, as its Test Run screen lists them (test_runs() reads them): a staged situation for one of its triggers, or one authored for it (edit().add_test_run). Or stage a message you type on trigger (a trigger Step, its id or its type): body, with title, author and handle. scenario says what the simulated world is like, in place of the staged situation's own. One the workflow doesn't offer raises noclick.NotFound naming the ones it does. Billed as the app's Test Run is; an account has up to 10 queued or running at once (noclick.QuotaExceeded past that).

Parameters
test_runstr | Nonedefault None
triggerAnydefault None
bodystr | Nonedefault None
titlestr | Nonedefault None
authorstr | Nonedefault None
handlestr | Nonedefault None
scenariostr | Nonedefault None
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Returns
Operation

The run's operation (kind workflow.rehearse); .wait() gives the WorkflowRehearsal: the agent's reply and the tool_calls it made with what the world answered.

Usage
inbox = noclick.Workflow.from_name("Support inbox")
test = inbox.rehearse("Refund request").wait()
print(test.reply)
for call in test.tool_calls:
    print(call["tool"], call["arguments"])

# A message of your own, on the trigger step support_email:
test = inbox.rehearse(trigger="support_email", body="My order 1042 never came.",
                      title="Where is order 1042?", author="ana@example.com").wait()

runsasync

workflow.runs(
    *, status=None, limit=20, user_filter=None, user=..., source=None, trigger=None,
    waiting=None, search=None
) -> list[WorkflowRun]

Recent runs, newest first, however they started (your code, its endpoint, a schedule, the app). Outside as_user you read runs recorded for your account; user_filter reads your users'. Narrow them by status, by how they started (source: api, endpoint, app, schedule, trigger), by the kind of event that started them (trigger: webhook, email, call, agent, shared_link, error), to those that wait (waiting=True) or that don't (False), and by text in their error (search, any case).

Parameters
statusstr | Sequence[str] | Nonedefault None
limitint | None

Return at most this many.

(default 20)
user_filterAny

Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.

(default None)
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
sourcestr | Sequence[str] | Nonedefault None
triggerstr | Sequence[str] | Nonedefault None
waitingbool | Nonedefault None
searchstr | Nonedefault None
Returns
list[WorkflowRun]

The first limit matching runs (20 by default; None for all of them).

Usage
intake = noclick.Workflow.from_name("order-intake")
for run in intake.runs(status="failed", user_filter=noclick.ALL_USERS):
    print(run.started_at, run.source, run.error)
for run in intake.runs(trigger="email", waiting=True):
    print(run.id, "waits on", run.waiting_on)

runs_pageasync

workflow.runs_page(
    *, cursor=None, limit=None, status=None, user_filter=None, user=..., source=None,
    trigger=None, waiting=None, search=None
) -> Page

One page of runs, newest first: runs()'s filters, a page at a time (limit up to 100); pass next_cursor back as cursor for the next.

Parameters
cursorstr | None

The next_cursor of the page before; omit it for the first page.

(default None)
limitint | None

Return at most this many.

(default None)
statusstr | Sequence[str] | Nonedefault None
user_filterAny

Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.

(default None)
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
sourcestr | Sequence[str] | Nonedefault None
triggerstr | Sequence[str] | Nonedefault None
waitingbool | Nonedefault None
searchstr | Nonedefault None
Returns
Page

A page whose data holds the runs and whose next_cursor is None on the last page.

Usage
intake = noclick.Workflow.from_name("order-intake")
page = intake.runs_page(status="failed", limit=50)
while page.next_cursor:
    page = intake.runs_page(status="failed", limit=50, cursor=page.next_cursor)

connectionsasync

workflow.connections() -> list[WorkflowConnectionInfo]

The accounts its steps use, by name and owner: what the canvas shows beside each step. Metadata only, never a value; a collaborator reads the owner's and the ones lent to the workflow.

Returns
list[WorkflowConnectionInfo]

Each account's id, name, credential_type, whether it's yours, and its owner's name if not.

Usage
for account in noclick.Workflow.from_name("order-intake").connections():
    print(account.name, "yours" if account.owned_by_me else account.owner_name)

get_runasync

workflow.get_run(run_id, *, detail=None) -> WorkflowRun

One run, with what each step did (steps: status, error and output, in order). While it runs, each step reads as it moves (running, then how it ended with its output); noclick.watch says when, with a workflow_run change naming the run (change step when a step moved, run when it started or ended). detail="steps" also reads each step as it ran (its type, operation, error_action and an agent's tool_calls) and the graph the run ran.

Parameters
run_idstrrequired
detailstr | Nonedefault None
Returns
WorkflowRun

The WorkflowRun; an unknown id raises noclick.NotFound.

Usage
intake = noclick.Workflow.from_name("order-intake")
failed = intake.runs(status="failed", limit=1)[0]
for step in intake.get_run(failed.id).steps:
    print(step.name, step.status, step.error)

run_inputsasync

workflow.run_inputs(run_id) -> RunInputs

What came in to a coding harness's reply, the run that recorded it: such a run never fired its trigger, so each delivery it answered (hidden from runs()) comes with what its steps output, the newest 15, never a secret.

Parameters
run_idstrrequired
Returns
RunInputs

The RunInputs: each delivery's run_id and steps (RunStep), and total.

Usage
intake = noclick.Workflow.from_name("support-agent")
came = intake.run_inputs(intake.runs(limit=1)[0].id)
for delivery in came.inputs:
    print(delivery["run_id"], [step.output for step in delivery["steps"]])

stop_runasync

workflow.stop_run(run_id, *, user=...) -> WorkflowRun

Stop a run that's running, however it started, as the app's stop does: the step it's on stops at once and nothing after it runs. A run from code is its operation's cancel (the operation reads canceled). Takes what starting one takes; inside as_user (or with user=) only that user's runs.

Parameters
run_idstrrequired
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Returns
WorkflowRun

The run once it stopped (or as it stands after a few seconds). A run that already ended raises noclick.Conflict, as does any other that waits with nothing running (an approval, a delay).

Usage
intake = noclick.Workflow.from_name("order-intake")
for run in intake.runs(status="running"):
    print(intake.stop_run(run.id).status)   # failed

get_stepasync

workflow.get_step(step_id) -> Step

One of its steps read alone, whole (GET /v1/workflows/{id}/steps/{step_id}), as graph() reads every step: its settings as stored, never a secret (withheld names, by path, what was left out). No step by that id raises noclick.NotFound.

Parameters
step_idstrrequired
Returns
Step

The Step, loaded.

Usage
hook = noclick.Workflow.from_name("order-intake").get_step("hook")
print(hook.type, hook.settings, hook.withheld)

check_readinessasync

workflow.check_readiness() -> WorkflowReadinessCheck

Whether it's set up to run, with the evidence that's judged on, as the app's setup check shows it: what readiness says, then the inputs its triggers last received, which are registered, the deadlines its alarm steps watch and the recipients its agents' tools are held to.

Usage
check = noclick.Workflow.from_name("order-intake").check_readiness()
print(check.status, [o["step"] for o in check.observations])

warm_sandboxesasync

workflow.warm_sandboxes() -> dict[str, int]

How many of your sandboxes are up for each of this workflow's agent steps (one per conversation whose sandbox is warm), as the app's canvas badges them.

Returns
dict[str, int]

Each agent step's id with a sandbox up, to its count.

Usage
print(noclick.Workflow.from_name("support desk").warm_sandboxes())   # {"helper": 2}

templateasync

workflow.template() -> WorkflowTemplate

This workflow's place in NoClick's template library: whether it's published, its page, and the draft saved for it before it is.

Usage
listing = noclick.Workflow.from_name("order-intake").template()
print(listing.public_url if listing.published else listing.draft_title)

save_templateasync

workflow.save_template(*, title=None, description=None) -> WorkflowTemplate

Keep a draft title and description for this workflow's template, before (or between) publishing it. Takes what pausing it takes: the account owns and pays for it.

Parameters
titlestr | Nonedefault None
descriptionstr | Nonedefault None
Returns
Usage
noclick.Workflow.from_name("daily-digest").save_template(title="Daily digest")

publish_templateasync

workflow.publish_template(*, title, description=None) -> WorkflowTemplate

Put this workflow in NoClick's template library under title (its page at /workflow/<slug>), or change its title and description there. It must be shared publicly first (noclick.Share.create): a template's page is that share's.

Parameters
titlestrrequired
descriptionstr | Nonedefault None
Returns
WorkflowTemplate

The WorkflowTemplate, published, with its public_url.

Usage
listed = noclick.Workflow.from_name("daily-digest").publish_template(title="Daily digest")
print(listed.public_url)

unpublish_templateasync

workflow.unpublish_template() -> WorkflowTemplate

Take this workflow out of the template library; its public share stays as it is.

Returns
WorkflowTemplate

The template as it stands now, unpublished.

Usage
noclick.Workflow.from_name("daily-digest").unpublish_template()

share_test_runasync

workflow.share_test_run(snapshot, *, title=None) -> dict[str, str]

Share a finished Test Run as a read-only page anyone with its url reads, as the app's Test Run screen's Share does: snapshot is what the screen showed of the run (its scenario, rows, reply and the like; only those display fields are kept). Nothing runs or bills through the page. Takes what pausing the workflow takes.

Parameters
snapshotdict[str, Any]required
titlestr | Nonedefault None
Returns
dict[str, str]

{"id", "url"}: the page's id and address.

Usage
page = noclick.Workflow.from_name("lead-flow").share_test_run(snapshot, title="Direct lead")
print(page["url"])

preview_expressionasync

workflow.preview_expression(
    expression, *, samples=None, primary_input=None, user=...
) -> ExpressionPreview

What an expression gives outside any one step (an interface block's, say), evaluated as a run evaluates it: against samples (each step's output by step id, vars the workflow's variables), else against what every step last stored (never a secret), with primary_input as $json. Changes nothing. A step's own setting previews with Step.preview_expression.

Parameters
expressionstrrequired
samplesdict[str, Any] | Nonedefault None
primary_inputAnydefault None
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Returns
ExpressionPreview

The ExpressionPreview; an expression that fails has ok False and its error.

Usage
flow = noclick.Workflow.from_name("order-intake")
print(flow.preview_expression("$('hook').items.length").preview)   # 2

run_countsasync

workflow.run_counts(*, user_filter=None, user=...) -> WorkflowRunCounts

How many runs runs() lists: in all, by_status (and how many of the running ones are waiting), by_source and by_trigger. Outside as_user you count the runs recorded for your account; user_filter counts your users'.

Parameters
user_filterAny

Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.

(default None)
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Usage
counts = noclick.Workflow.from_name("order-intake").run_counts()
print(counts.total, counts.by_status["failed"], counts.by_source)

latest_outputsasync

workflow.latest_outputs(*, steps=None, full=False, user=...) -> LatestOutputs

Each step's latest output, whatever run it's from, as the app's canvas shows the workflow when it opens: cut short as a run's steps are unless full, never a secret. steps reads only those steps' (each a Step or its id). Inside as_user (or with user=) only that user's runs are read.

Parameters
stepsSequence[Any] | Nonedefault None
fullbooldefault False
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Returns
LatestOutputs

The LatestOutputs: outputs by step id, with what each withheld.

Usage
latest = noclick.Workflow.from_name("order-intake").latest_outputs()
print(latest.outputs["hook"]["order_id"], latest.withheld.get("hook"))

approvalsasync

workflow.approvals(*, status=None, limit=20) -> list[WorkflowApproval]

Its Approval steps, newest first: those its runs wait at (status="pending"), and those approved, declined or expired. NoClick asks your account's owner to answer each; your code answers one with a key naming approvals:answer (approval.approve(), approval.decline()).

Parameters
statusstr | Nonedefault None
limitint | None

Return at most this many.

(default 20)
Returns
list[WorkflowApproval]

The first limit (20 by default, at most 100), each a noclick.WorkflowApproval.

Usage
invoices = noclick.Workflow.from_name("Invoices")
for approval in invoices.approvals(status="pending"):
    print(approval.title, approval.values)

endpointasync

workflow.endpoint(*, public=None) -> WorkflowEndpoint

The workflow's HTTP endpoint, turned on if it wasn't. public=True lets a publishable key call it from a web page, with per-visitor rate limits; public=False requires a secret key again; leave it out to keep what it is.

Parameters
publicbool | Nonedefault None
Returns
WorkflowEndpoint

The endpoint: its url, whether it's public, and the method to call it with.

Usage
intake = noclick.Workflow.from_name("order-intake")
endpoint = intake.endpoint(public=True)
print(endpoint.method, endpoint.url, endpoint.public)

AgentLinkThread

class AgentLinkThread

A visitor's thread with the agent (AgentLink.thread): its conversation's id and its messages, oldest first.

Attributes
conversationstr
messageslist[dict[str, Any]]

WorkflowRun

class WorkflowRun

One run of a workflow. status is running (a run waiting on an approval or a delay too: waiting_on says on what, approval, delay or for a run from code agent_turn; None while it runs on), succeeded or failed (error says why). outputs holds what its final steps produced (each step that finished with nothing after it running), by step name. source is how it started: api, endpoint, schedule, trigger (an event) or app; for a trigger run, trigger names the kind of event: webhook (a delivery to one of its trigger steps, a webhook's or an app's event), email, call, agent (an agent's turn), shared_link or error (it handled another run's failure). inputs and operation_id are set for a run started from code. steps says what each step did, read with one run (Workflow.get_run); empty in a list.

Attributes
idstr
workflow_idstr | None
statusstr
inputsdict[str, Any]
outputsdict[str, Any]
errorstr | None
sourcestr | None
user_idstr | None
operation_idstr | None
started_atAny
finished_atAny
stepslist[RunStep]
rawdict[str, Any]

The response JSON exactly as the API sent it.

triggerstr | None
waiting_onstr | None
graphdict[str, Any] | None

Read with get_run(id, detail="steps"): the graph the run ran, as graph() reads one (no secret).

RunStep

class RunStep

What one step did in a run: status is succeeded, failed (error says why) or skipped; output is what it produced, with long lists and text cut short and never a secret (withheld names, by path, what was left out). Step.output reads it whole.

Attributes
idstr
namestr
statusstr
errorstr | None
outputAny
withheldlist[str]
typestr | None

Read with get_run(id, detail="steps"): its type and operation in the graph the run ran.

operationstr | None
error_actiondict[str, Any] | None

The fix its error offers (a reconnect, adding funds), where it has one.

tool_callslist[dict[str, Any]]

An agent step's tool calls in the run, oldest first, as /v1/logs shows one.

StepOutput

class StepOutput

What one step produced in one run (Step.outputs, Step.output). run_id is the run's id (Workflow.get_run reads a run from code by it), source how it started (as WorkflowRun.source says it), status the step's there (succeeded, failed with error, skipped). A trigger's deliveries are its outputs too: no_event marks a manual run's placeholder for one that got no event. iteration is set for one iteration of a step that runs in a loop.

A listing gives a one-line preview (path=value pairs); one read gives the output, with long text and lists cut short (truncated) unless read full, or the part at path. Never a secret: withheld names, by path, what was left out (a request's Authorization header, a key, a token).

Attributes
step_idstr
run_idstr
workflow_idstr | None
iterationint | None
sourcestr | None
statusstr | None
errorstr | None
created_atAny
no_eventbool
previewstr | None
outputAny
pathstr | None
fullbool
truncatedbool
withheldlist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowEndpoint

class WorkflowEndpoint

The URL a workflow answers at: send method (POST) with the inputs as a JSON body, and the run's outputs come back (a run longer than 30 seconds answers 202 with its operation). A public endpoint also takes a publishable key (nk_pub_...) that lists it, so a web page can call it; otherwise it needs a secret key.

Attributes
urlstr
publicbool
methodstr
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowBuild

class WorkflowBuild(Operation)

A build of a workflow from a description (kind workflow.build). It's an Operation: wait() returns the WorkflowBuildResult, or raises why the build failed.

While it builds, step is building. When the builder needs something it's awaiting_human (step asking) and question says what: each input is a human request NoClick sent the person whose build it is, and the build goes on once they answer; or answer it all now with answer(). wait() stops at a question it hasn't shown you, raising noclick.AnswerRequired with it; called again, it waits through that question for its answer. next_question() returns as soon as there is one.

Attributes
workflow_idstr | None
conversationstr | None

The conversation of the builder agent the build runs in (Workflow.builder()); None for a build it doesn't run.

questionBuildQuestion | None

What the build waits on (None unless it's asking).

next_questionasync

workflow_build.next_question(timeout=None) -> BuildQuestion | None

Block until the build asks something (its question) or finishes (None: wait() gives the result).

Parameters
timeoutfloat | Nonedefault None
Returns
BuildQuestion | None

The question to answer, or None once the build is done.

Usage
build = noclick.Workflow.from_name("Morning brief").build("Also post it to #team on Slack")
while (question := build.next_question(timeout=600)) is not None:
    build.answer({question.inputs[0]["id"]: "#team"})
print(build.wait().summary)

answerasync

workflow_build.answer(
    values=None, *, message=None, skip=False, secret_values=None
) -> WorkflowBuild

Answer the question the build waits on, all at once, by input id: the build goes on now. Each value answers its input's human request as your key; those you leave unanswered are withdrawn. A choice, words, or for a credential input a connection's ref or name; an env input's values go in secret_values ({input id: {KEY: value}}), kept as the account's secret and never shown to a model. An account or a secret takes a key acting for the whole account. message tells the builder anything else, skip=True goes on without answering.

Parameters
valuesdict[str, Any] | Nonedefault None
messagestr | Nonedefault None
skipbooldefault False
secret_valuesdict[str, dict[str, str]] | Nonedefault None
Returns
WorkflowBuild

This build, running again.

Usage
build = noclick.Workflow.from_name("Morning brief").build("Send it on Slack too")
question = build.next_question()
if question:
    build.answer({"channel": "#team"}, message="Keep it under five lines")
print(build.wait().steps)

WorkflowBuilder

class WorkflowBuilder

Where a workflow's builds are talked through (Workflow.builder()).

Attributes
workflow_idstr
agent_idstr | None

The account's builder agent, whose conversation conversation this workflow's builds share; None where the caller's builds aren't the agent's, or it was never made.

conversationstr | None
buildWorkflowBuild | None

The workflow's build under way or waiting on a question, else None.

rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowBuildResult

class WorkflowBuildResult

A finished build: what the builder says it did (summary), the workflow's steps as they now stand, and, when it published the workflow's app, published ({state, url}: state is published, renamed or unpublished; unpublished, its trash_id restores it until restorable_until).

Beside the builder's words, facts no model wrote: whether it built anything (False: the workflow is as it was, whatever summary says), the version it ended on (what edit(if_version=...) takes), its readiness as Workflow.readiness reads it (status, meaning, issues, warnings, unverified), and each step's verdict by step id (verdicts: config_valid, validation_error, missing_required, left_for_user and references, as an edit answers them). references lists, across the workflow, each read of another step's output that gets no value, said in a sentence (message): {step, field, source, key, known_keys, message} for a key the source step's known output lacks (a run reads nothing there and still succeeds, so a test run never shows it), or {step, field, source, reference, missing, near, message} for a step the workflow doesn't have; a step whose output nothing has shown isn't judged. sent_back counts the times the build went back to the builder for settings the run engine rejects or reads that get no value (at most 2) before it finished. A fact NoClick couldn't read is None and named in unread: then nothing says the workflow is ready.

Attributes
workflow_idstr | None
summarystr | None
stepslist[WorkflowStep]
app_urlstr | None
publisheddict[str, Any] | None
builtbool | None
versionint | None
readinessdict[str, Any] | None
verdictsdict[str, dict[str, Any]] | None
referenceslist[dict[str, Any]] | None
sent_backint
unreadlist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowDraftResult

class WorkflowDraftResult

A finished draft: the workflow's version once the drafted steps were written (one version of its history, history_version; changed false when the drafter changed nothing), a summary of what changed, and for each step it drafted (steps, by id) the verdict an edit answers (config_valid, validation_error, missing_required, left_for_user, references) beside drafted, its operation, the settings it wrote, the ones it left for a person (unfilled: a choice read from the connected account, a value only they know; a required one reads as left_for_user until it's filled in) and, for a step it couldn't draft (left as it was), its error.

A draft asked not to write (draft(..., write=False)): written is false, version the one it was judged on, changed whether writing it would change the workflow, and edits the update_step edits a write would make, which edit() takes as they are, each step's own in its changes ({operation?, settings?}, None for nothing); a secret the drafter set is left out of them and named in its step's withheld.

Attributes
workflow_idstr
modestr
versionint | None
history_versionint | None
changedbool
summarystr | None
stepsdict[str, dict[str, Any]]
writtenbool
editslist[dict[str, Any]]
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowStep

class WorkflowStep

One step of a workflow, as the app shows it: its name, its kind (type, like automation-gmail or trigger-cron) and the operation it does there (None for a step with one thing to do).

Read with one workflow, a step also says whether it's enabled, its settings (never a secret; long values cut short), its connection (None for a step that takes no account, else {attached, healthy, hint}: healthy is None when NoClick can't tell) and, for a trigger, its trigger state ({error, paused_reason, next_run}; None for any other step).

Attributes
idstr
namestr
typestr
operationstr | None
enabledbool
settingsdict[str, Any]
connectiondict[str, Any] | None
triggerdict[str, Any] | None

WorkflowApproval

class WorkflowApproval

An Approval step a run of one of your workflows waits at (or waited at), as its owner sees it.

Attributes
idstr
workflow_idstr
workflow_namestr | None
run_idstr

The run that waits at it (workflow.get_run(run_id)).

stepstr

The Approval step's id in the workflow.

titlestr | None

What it asks, as the step's title says it.

fieldslist[dict[str, Any]]

Its form's fields, each with name, type, label, description, required and options.

valuesdict[str, Any]

The form's values by field name: as the run asked, then as it was answered.

statusstr
created_atAny
expires_atAny

When the approver it waits on must answer by (7 days after it was asked, unless the step's expires_in_s says otherwise; an escalation gives the next approver theirs).

approverdict[str, Any]

Who it waits on (or waited on last): kind owner, person (with email), user (user_id), agent (agent_id) or code: the step's approver, else your account's, else the owner.

on_timeoutstr | None

What happens if they don't answer by expires_at: decline (the run ends) or escalate (the next approver up answers it, finally the owner).

decided_atAny
decided_bystr | None

Who decided: owner (signed in, or from NoClick's link or the web chat), person (a person or user named approver, from the link NoClick emailed them), agent (an agent named approver), code or app (someone who may edit the workflow, in the NoClick app); None while it waits.

decided_by_keydict[str, Any] | None

The key whose code decided (key_id, key_name); None otherwise.

decided_by_agentdict[str, Any] | None

The agent named approver that decided (agent_id, name); None otherwise.

notestr | None

What whoever decided wrote with it.

sent_tolist[str]

Where NoClick sent the owner its link: whatsapp, imessage, email, or web (a card in the chat they were watching).

from_idclassmethod

noclick.WorkflowApproval.from_id(
    workflow, approval_id, *, client=None
) -> WorkflowApproval

A lazy reference to one of a workflow's Approval steps by its id (an event's data["id"]).

Parameters
workflowAnyrequired
approval_idstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowApproval

The approval; it loads the first time it's used.

Usage
approval = noclick.WorkflowApproval.from_id(event.data["workflow_id"], event.data["id"])
print(approval.title, approval.values)

listclassmethodasync

noclick.WorkflowApproval.list(
    workflow, *, status=None, limit=None, client=None
) -> list[WorkflowApproval]

A workflow's Approval steps, newest first: the first 20, or the first limit (at most 100), with status one of pending, approved, declined or expired. Read as your account, with a key holding workflows or approvals:answer.

Parameters
workflowAnyrequired
statusstr | Nonedefault None
limitint | None

Return at most this many.

(default None)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[WorkflowApproval]

Each approval as its owner sees it.

Usage
for approval in noclick.WorkflowApproval.list("2e3a9296-...", status="pending"):
    print(approval.title, approval.values, approval.expires_at)

approveasync

workflow_approval.approve(*, note=None, values=None) -> WorkflowApproval

Approve it from your own code, with one of your account's secret keys that names the approvals:answer scope: the run goes on down the step's approved branch, once, with values (by field name) as the form's values where you give them. Refused with noclick.PermissionDenied for a key without the scope or one acting for a user, noclick.Conflict once it was answered, and noclick.Expired once it lapsed unanswered.

Parameters
notestr | Nonedefault None
valuesdict[str, Any] | Nonedefault None
Returns
WorkflowApproval

This approval, answered: status is approved, decided_by is code.

Usage
approval = noclick.WorkflowApproval.from_id(workflow_id, approval_id)
approval.approve(note="Checked the invoice.", values={"amount": "420"})

declineasync

workflow_approval.decline(*, note=None, values=None) -> WorkflowApproval

Decline it from your own code, as approve answers it: the run goes on down the step's rejected branch.

Parameters
notestr | Nonedefault None
valuesdict[str, Any] | Nonedefault None
Returns
WorkflowApproval

This approval, answered: status is declined.

Usage
for approval in noclick.Workflow.from_name("Invoices").approvals(status="pending"):
    approval.decline(note="Invoices wait for Monday's review.")

WorkflowRehearsal

class WorkflowRehearsal

A workflow's test run, as the app's Test Run plays one: a staged event arrived at one of its triggers (trigger: {step_id, type, name}) and the agents it reached took a real turn while a simulated world answered every tool call, so nothing was sent and no account was touched. test_run is the run it played ({key, name, custom}; None for a message you typed). reply is the agent's closing words; tool_calls the calls it made, each with its tool, arguments and the result the world answered (and outbound, the message it would have sent, for a call that carries one); transcript the run step by step (role assistant steps, its text, and tool steps; a coding harness's own shell and file steps carry source harness). scenario is the world it ran in, note says when it wrote nothing or what it did to act was simulated, and cost_usd is what it cost you.

Attributes
workflow_idstr | None
test_rundict[str, Any] | None
triggerdict[str, Any] | None
replystr
tool_callslist[dict[str, Any]]
transcriptlist[dict[str, Any]]
scenariostr | None
notestr | None
cost_usdfloat | None
operation_idstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowTestRun

class WorkflowTestRun

A test run a workflow offers (Workflow.test_runs), as its Test Run screen lists it: a staged situation for one of its triggers, or one the workflow authored (custom; edit().add_test_run). key and name each name it to rehearse. trigger is what it stages on ({type, label, operation}: the trigger step's type, the type's name in the app and the step's operation), and message the staged message as the run would stage it (title, body, and where it has them author, handle, meta and time): an offered situation's with the workflow's edits, an authored run's own.

Attributes
keystr
namestr
custombool
triggerdict[str, Any]
messagedict[str, Any]
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowGraph

class WorkflowGraph

A workflow's definition as it was read, at version: its name, description and settings (its variables, its Test Runs and the rest), its steps (each a Step you can change), its notes (steps of type stickyNote) and its edges.

Each edge is {id, from, to, kind, handle}: kind data, or tools for a step wired into an agent as its tools; handle names which output of from it leaves (None for its only one).

A secret is never read back, and writing a step or the settings back without one keeps it: withheld names, by step id, the paths of the settings left out (api_key, auth.password, headers[0].value), settings_withheld those of the workflow's own settings (variable_definitions[1].value: a variable's value, whatever its name; one with no value yet reads as blank, so you can tell which still need one), and variables_withheld the graph's own variables. The graph a noclick.Conflict carries holds the steps and edges alone: its name, description, settings and settings_withheld are None.

An edge into a step with several inputs names which in target_handle (a code step's state). display_metadata is what the app shows of the workflow (its canvas's viewport, the step open in its panel), read with graph(): never part of a version. access is what you may do with it (owner, editor or viewer) and agent the agent whose own flow it is ({id, name, yours}, yours when it's your account's own), both read with graph().

Attributes
workflow_idstr
versionint
namestr | None
descriptionstr | None
settingsdict[str, Any] | None
settings_withheldlist[str] | None
stepslist[Step]
noteslist[Step]
edgeslist[dict[str, Any]]
withhelddict[str, list[str]]
variables_withheldlist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

display_metadatadict[str, Any] | None
accessstr | None
agentdict[str, Any] | None

step

workflow_graph.step(ref) -> Step

One of its steps or notes, by id, else by its name in the app.

Parameters
refstrrequired
Returns
Step

The step. None by that id or name raises noclick.NotFound; a name two steps share raises noclick.Conflict (name it by id).

Usage
graph = noclick.Workflow.from_name("Morning brief").graph()
send = graph.step("Send the summary")
print(send.id, send.settings)

Step

class Step

One step of a workflow's graph: its trigger, an app's operation, an agent, a note. Workflow.graph() reads them all; Workflow.step(id) is a handle to one by id that loads the first time you read a field.

Its fields are as stored: type (automation-gmail, agent, trigger-cron), its name in the app, the operation it does, whether it's enabled, its settings (never a secret: withheld names the ones left out), its connections (each slot's connected account, by id), where it sits (position) and the output it gives on test runs instead of running (mock_output). A note on the canvas is a step of type stickyNote (its text is settings["content"]), listed in WorkflowGraph.notes.

Each method is one edit, applied as its own version: the step comes back as written, with what the edit said about it (notes) and whether it's ready to run (verdict). To change several things at once, or only if the workflow hasn't changed since you read it, use Workflow.edit().

Attributes
idstr

Its id in the workflow, which edits name it by.

workflowWorkflow

The workflow it's a step of.

typestr

What kind of step it is: automation-gmail, agent, trigger-cron, stickyNote for a note.

namestr | None

Its name in the app (None when it has none and the app shows its type).

operationstr | None

What it does, one of its type's operations (None for a step with one thing to do).

enabledbool

Whether it runs: a step switched off (update(enabled=False)) is passed over.

settingsdict[str, Any]

Its settings, by field name, as stored (a secret is never read back: see withheld).

connectionsdict[str, str]

The accounts connected to it: each slot (a connection type, like gmail_oauth) to the id of the account connected there, which the connection holding it names as its credential_id. set_connection changes them.

positiondict[str, float] | None

Where it sits on the canvas: {"x", "y"}.

mock_outputAny

What it outputs on test runs instead of running (mock()), or None.

withheldlist[str]

The settings left out of settings because they hold a secret (a key, a token, a password), each by its path: api_key, auth.password, headers[0].value. An update that leaves them out keeps them.

verdictdict[str, Any] | None

Whether it's ready to run, as the last edit through this handle that touched it judged: config_valid, and when it isn't, validation_error, missing_required and left_for_user (the required settings it leaves for its person to fill in, a value only they know: they wait on that person and are never part of the error); an agent's agent_credential_hint; and references (see references). None until an edit judged it (a read doesn't).

referenceslist[dict[str, Any]]

Each read of another step's output in its settings ({{ $('x').key }}) that won't resolve at run time, as the last edit through this handle that touched it judged: {field, step, key, known_keys} for a key x's output isn't known to have (known_keys: what it has, from what x declares, its latest output in this workflow, or what your account's own runs of its type showed), or {field, step, reference, missing, near} for a step x the workflow doesn't have (near: the one it likely means). A read of a step whose output nothing has shown yet isn't judged. Empty when every read resolves, or before an edit judged it.

notesdict[str, Any]

What the last edit through this handle answered for its change, beyond the step's id: changed for an update, the edge for a connect, and anything the edit did on its own, such as resolutions (a value it resolved, like a model's full id), harness_switch (an agent moved to another harness, with the settings that went with the old one), coerced_values or stripped_trigger_refs.

optionsasync

step.options(
    field, *, settings=None, search=None, page_token=None, type=None, connection=None
) -> StepOptions

The choices field takes, as the app's dropdown lists them: read from the account the step connects to (a Google account's spreadsheets, a Slack workspace's channels) by the step's own lookup, with its settings as saved and settings laid over them (what a list that depends on another reads, like the tabs of a spreadsheet you haven't saved yet). search narrows them where the service can search. A page at a time: pass page_token= its next_page_token. A connection whose owner reviews its calls holds the lookup for them (noclick.ApprovalRequired). A step the workflow doesn't hold yet (one a canvas added and hasn't saved) lists its choices by its type (automation-slack), and connection (a connection's ref or id) names the account to read from in place of the one the step holds. Takes read access to the workflow: whoever can change it reads through the step's account as a run does, anyone else only through an account that's theirs to use.

Parameters
fieldstrrequired
settingsdict[str, Any] | Nonedefault None
searchstr | Nonedefault None
page_tokenstr | Nonedefault None
typestr | Nonedefault None
connectionstr | Nonedefault None
Returns
StepOptions

The StepOptions: options (each a StepOption), next_page_token and withheld.

Usage
sheet = noclick.Workflow.from_name("Morning brief").step("read_sheet")
for choice in sheet.options("spreadsheet_id").options:
    print(choice.value, choice.label)
tabs = sheet.options("sheet_name", settings={"spreadsheet_id": "1AbCdEf"})

valueasync

step.value(field, *, settings=None) -> StepValue

A widget's value on the step, as the app loads it beside the step's settings: a trigger's address, minted and registered where its events come from (webhook_url), an app's event subscription (subscription_status), the files in a filesystem step's volume (file_browser), an alarm's schedules (active_alarms), an MCP step's hosted link (hosted_url). settings are laid over the step's saved ones. One that mints or registers something changes the account, and takes what changing the workflow takes; one that only reads (a list, an id from the step's account) takes read access. A hosted MCP link's URL is its capability, so no MCP connection loads it.

Parameters
fieldstrrequired
settingsdict[str, Any] | Nonedefault None
Returns
StepValue

The StepValue: value, or values where it fills several settings at once, and withheld.

Usage
hook = noclick.Workflow.from_name("Order intake").step("hook")
print(hook.value("webhook_url").values["webhook_url"])

updateasync

step.update(
    *, settings=None, name=None, operation=None, enabled=None, secrets=None,
    left_for_user=None
) -> Step

Change its settings, name or operation, or switch it off or on. settings merge into what it has (a nested object merges, any other value replaces, and None takes that setting out, a secret included); a field you leave out is never touched. An agent given another model on another harness drops the old harness's own settings and connections, as the app does (notes["harness_switch"] says what went). Values are judged as a run judges them: one that can't be is refused with noclick.InvalidRequest naming the field, and nothing changes.

secrets (an agent step's) are the account's own secrets in its shell's environment on every run, noclick.Secret objects or their names, replacing the ones it had ([] takes them all off). Only a key acting for the whole account of the workflow's owner gives a step one, and an agent's own tools as your approval settings let them (attach_connection, allowed by default); any other caller keeps or drops what it was given. Their values never show in a read of the workflow, nor to the agent's model.

left_for_user names settings to leave for the step's person to fill in: a value only they know (their own address, number or URL). Each is cleared and noted on the step, so a required one reads left_for_user in the step's verdict and the workflow's readiness, never an invalid setting, until it's given a value; giving it one takes it off the note. It's how code or an agent that builds a workflow says "this one is yours" without making a value up. A name that isn't one of the step's settings, or one given a value in the same call, is refused. A value that only stands in for one (YOUR_PHONE_NUMBER, <your website url>) is refused too, naming this instead.

Parameters
settingsdict[str, Any] | Nonedefault None
namestr | Nonedefault None
operationstr | Nonedefault None
enabledbool | Nonedefault None
secretsAnydefault None
left_for_userAnydefault None
Returns
Step

This step as written, with notes and verdict.

Usage
brief = noclick.Workflow.from_name("Morning brief")
send = brief.step("send_summary")
send.update(settings={"to": "team@acme.com", "subject": "Today"}, name="Email the team")
print(send.verdict)   # {"config_valid": True}
brief.step("summarize").update(secrets=["warehouse"])

alert = noclick.Workflow.from_name("Site monitor").step("text_me")
alert.update(left_for_user=["to_number", "from_number"])   # only its owner knows these
print(alert.verdict["left_for_user"])                      # ['to_number', 'from_number']

patchasync

step.patch(field, patch) -> Step

Change part of one long text setting (an agent's instructions, a step's code) with a patch: @@ lines naming text that's there, then - lines to remove and + lines to add. Text the patch names that isn't there is refused.

Parameters
fieldstrrequired
patchstrrequired
Returns
Step

This step as written.

Usage
writer = noclick.Workflow.from_name("Morning brief").step("writer")
writer.patch("system_prompt", "@@ Keep it short.\n-Keep it short.\n+Keep it under five lines.")

removeasync

step.remove() -> None

Take the step out of the workflow, with its edges. A trigger's schedule or webhook stops with it. Removing a step that holds an app, conversations or files deletes them for good, so it may be held for the account's owner (noclick.ApprovalRequired), as a batch is (Workflow.edit).

Usage
noclick.Workflow.from_name("Morning brief").step("old_digest").remove()

connectasync

step.connect(other, *, kind='data', handle=None, target_handle=None) -> Step

Wire this step into other (a Step or its id). kind="data" runs other after it with its output; kind="tools" makes its operations tools of other, an agent (or an MCP step). handle names which of this step's outputs, for a step with several (an iteration's loop), and target_handle which of other's inputs (a code step's state). Connecting what's already connected changes nothing.

Parameters
otherAnyrequired
kindstrdefault 'data'
handlestr | Nonedefault None
target_handlestr | Nonedefault None
Returns
Step

This step; notes holds the edge (edge_id, kind).

Usage
brief = noclick.Workflow.from_name("Morning brief")
brief.step("summarize").connect("send_summary")
brief.step("linear").connect("triage_agent", kind="tools")

disconnectasync

step.disconnect(other, *, handle=None) -> Step

Remove the edge from this step to other (a Step or its id); one that isn't there raises noclick.InvalidRequest.

Parameters
otherAnyrequired
handlestr | Nonedefault None
Returns
Step

This step.

Usage
noclick.Workflow.from_name("Morning brief").step("summarize").disconnect("send_summary")

set_connectionasync

step.set_connection(connection, *, slot=None) -> Step

Connect an account to the step: one of the account's own connections, as a noclick.Connection (connected in the app, credential:<id>, or a named one), its ref or id, or a named connection's name; the step takes the account it holds. Its slot is the account's own type unless slot names it. connection=None with slot takes the account in that slot off. One of a user's connections, one holding no working account, or one your account may not use is refused (noclick.InvalidRequest naming it), as is one of a type the step doesn't take; a caller that doesn't act for the whole account (a user's key, an app's code) only keeps one the workflow already uses. An agent's own tools attach your account's own connections in your account's own workflows, never another member's, a user's or one held for someone else, as your approval settings let them (attach_connection: allowed by default; asked, the edit waits for the owner's yes, noclick.ApprovalRequired).

Parameters
connectionAnyrequired
slotstr | Nonedefault None
Returns
Step

This step, its connections as written.

Usage
brief = noclick.Workflow.from_name("Morning brief")
gmail = noclick.Connection.from_id("credential:9b2a1c5e-7d9f-4a31-8f6d-3f1d2c4b8a7e")
brief.step("send_summary").set_connection(gmail)
brief.step("post").set_connection("work-slack")  # a named connection, by its name

mockasync

step.mock(output) -> Step

Have the step give output on test runs instead of running (no email sent, no API called), so the steps after it can be tried.

Parameters
outputAnyrequired
Returns
Step

This step, its mock_output set.

Usage
brief = noclick.Workflow.from_name("Morning brief")
brief.step("read_calendar").mock({"events": [{"title": "Standup", "start": "09:00"}]})

unmockasync

step.unmock() -> Step

Have the step run for real on test runs again.

Returns
Step

This step.

Usage
noclick.Workflow.from_name("Morning brief").step("read_calendar").unmock()

runasync

step.run(*, only=False, user=..., idempotency_key=None) -> Operation

Run the workflow from this step: it and what comes after it (only=True: it alone), the steps before it giving the outputs they last stored. Workflow.run(from_step=...) says more.

Parameters
onlybooldefault False
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
idempotency_keystr | None

Makes a retried create safe: the same key returns the first result. Generated when omitted.

(default None)
Returns
Operation

An operation whose .wait() gives the finished WorkflowRun.

Usage
summarize = noclick.Workflow.from_name("order-intake").step("summarize")
print(summarize.run(only=True).wait().outputs)

outputsasync

step.outputs(*, search=None, limit=10, user=...) -> list[StepOutput]

What the step produced, run by run, newest first, each a StepOutput with its run, how that run started, the step's status there and a one-line preview. A trigger's deliveries are its outputs (no_event marks a manual run's placeholder). search keeps those holding the text (any case), reading 100 at a time. Inside as_user (or with user=) only the runs recorded for that user are read.

Parameters
searchstr | Nonedefault None
limitint | None

Return at most this many.

(default 10)
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Returns
list[StepOutput]

The newest limit (10 by default; None for every one).

Usage
hook = noclick.Workflow.from_name("order-intake").step("hook")
for out in hook.outputs(search="o_1042"):
    print(out.created_at, out.source, out.preview)

outputasync

step.output(run_id, *, path=None, full=False, iteration=None, user=...) -> StepOutput

What the step produced in one run (run_id, as outputs() or Workflow.runs() name it): its output, long text and lists cut short unless full, or only the part at path (payload.items[0].id, as a preview names it). iteration reads one iteration of a step that runs in a loop. Never a secret (withheld); a path to one raises noclick.InvalidRequest, as does a path that isn't there (naming what is).

Parameters
run_idstrrequired
pathstr | Nonedefault None
fullbooldefault False
iterationint | Nonedefault None
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Returns
StepOutput

The StepOutput; a run the step stored nothing in raises noclick.NotFound.

Usage
hook = noclick.Workflow.from_name("order-intake").step("hook")
latest = hook.outputs(limit=1)[0]
print(hook.output(latest.run_id, path="items[0].sku").output)

preview_expressionasync

step.preview_expression(expression, *, samples=None, user=...) -> ExpressionPreview

What an expression in one of the step's settings gives, evaluated as a run evaluates it (what goes inside {{ }}, like $('hook').order_id or $json.items.length), as the app's editor previews it while you type. It's evaluated against what every other step last stored (never a secret, so an expression reaching one finds nothing there), or against samples, each step's output by step id (vars the workflow's variables). $json is the step's one input's output, when it has one. Changes nothing.

Parameters
expressionstrrequired
samplesdict[str, Any] | Nonedefault None
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Returns
ExpressionPreview

The ExpressionPreview; an expression that fails has ok False and its error.

Usage
note = noclick.Workflow.from_name("order-intake").step("summarize")
print(note.preview_expression("$('hook').items.length").preview)   # 2

hosted_mcpasync

step.hosted_mcp(*, tools=False, user=...) -> HostedMcpStatus

How an MCP step's hosted link stands: whether it's made (exists) and active, and the last request a client made of it (client_name, last_method, tool_count, first_tools_at, seconds_since_seen; liveness_available False when that couldn't be read, never "no client yet"). With tools, what the link serves now (tools_ready, the first few names in tools_sample), resolved from the stored graph: ask once and keep it. Never the link itself.

Parameters
toolsbooldefault False
userAny

Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).

(defaults to the current user)
Usage
link = noclick.Workflow.from_name("crm-tools").step("mcp").hosted_mcp(tools=True)
print(link.tools_ready, link.client_name or "no client yet")

clear_stateasync

step.clear_state() -> ClearedStepState

Forget what the step keeps between runs, as the app's Clear state does: its state (an RSS step's seen items, a State step's values) and its conversations (an agent step's threads), so its next run starts fresh. Clearing an agent step deletes its conversations for good: a deletion, which through MCP waits for your account's owner (preview it with POST /v1/delete_previews). Takes what changing the workflow takes, and always acts for your account, never one of your users: an agent step's threads are every user's.

Returns
ClearedStepState

How many state records and conversations were deleted.

Usage
feed = noclick.Workflow.from_name("news digest").step("rss")
print(feed.clear_state().state_rows_deleted)   # 1

conversationsasync

step.conversations(*, limit=100) -> list[StepConversation]

Your chats with this agent step, most recently active first, as the app's chat history lists them. Each is the person's who had it: another member's chats with the same step aren't yours to read, and a key acting for one of your users has none.

Parameters
limitint

Return at most this many.

(default 100)
Returns
list[StepConversation]

Up to limit StepConversation (100 at most).

Usage
helper = noclick.Workflow.from_name("support desk").step("helper")
for chat in helper.conversations():
    print(chat.conversation, chat.title)

conversationasync

step.conversation(conversation) -> StepConversation

One of your chats with this agent step, with its messages as the app's chat stores and draws them (a trigger's event with its output, a reply with its steps), oldest first. A turn whose run died before saying so is ended first.

Parameters
conversationstrrequired
Returns
StepConversation

The StepConversation; one that isn't yours raises noclick.NotFound.

Usage
thread = noclick.Workflow.from_name("support desk").step("helper").conversation("orders")
print(thread.messages[-1]["message"])

delete_conversationasync

step.delete_conversation(conversation) -> None

Delete one of your chats with this agent step, for good, as the app's chat history does. Through MCP it's a deletion that waits for your account's owner (preview it with POST /v1/delete_previews).

Parameters
conversationstrrequired
Usage
noclick.Workflow.from_name("support desk").step("helper").delete_conversation("orders")

decide_proposalasync

step.decide_proposal(conversation, proposal_id, decision) -> None

Answer a change this agent step proposed to its own workflow in one of your chats (the card its prompt_builder tool shows): "approved" or "dismissed". The verdict is kept in the conversation and the agent hears it on its next turn; approving takes edit access to the workflow (the change itself is a build you start).

Parameters
conversationstrrequired
proposal_idstrrequired
decisionstrrequired
Usage
helper = noclick.Workflow.from_name("support desk").step("helper")
helper.decide_proposal("__interface_chat__", "a1b2c3d4e5f6", "dismissed")

messageasync

step.message(
    text='', *, conversation=None, attachments=None, model=None, idempotency_key=None
) -> Operation

Say something to this agent step in one of your chats, as the app's chat does: a run from the step (what comes after it runs too, on the workflow as saved) whose turn is text, handed to the agent as written (a {{ }} in it is text). conversation names the chat (a new key starts one; omitted, the app's chat's own), attachments are uploaded files it reads with it (each {resource_id, url, name, mime_type, size_bytes}) and model the model this turn runs on. Someone the workflow is shared with to view may say something too.

Parameters
textstrdefault ''
conversationstr | Nonedefault None
attachmentsSequence[Mapping[str, Any]] | Nonedefault None
modelstr | Nonedefault None
idempotency_keystr | None

Makes a retried create safe: the same key returns the first result. Generated when omitted.

(default None)
Returns
Operation

The run's operation: .wait() gives the finished WorkflowRun; the reply is in the conversation (Step.conversation).

Usage
helper = noclick.Workflow.from_name("support desk").step("helper")
helper.message("Where's order 1042?", conversation="orders").wait()
print(helper.conversation("orders").messages[-1]["message"])

shareasync

step.share() -> ShareLink

Turn on this agent step's public chat page, or read it if it's on, as the app's Share does: anyone with the link chats with the step, no account needed, each visitor in their own conversations, on your credits. Only the workflow's owner may.

Returns
ShareLink

The ShareLink: its url, and disable() and rotate() to turn it off or change it.

Usage
link = noclick.Workflow.from_name("support desk").step("helper").share()
print(link.url)   # https://noclick.com/a/...

workspaceasync

step.workspace(conversation=None) -> StepWorkspace

The files on one of this agent step's conversations' workspace, as the app's chat shows them: what the step's sandbox mounts for conversation (a wired filesystem step, else the conversation's own /workspace). Anyone who opens the workflow reads it; a conversation with none (conversation omitted) lists nothing.

Parameters
conversationstr | Nonedefault None
Returns
StepWorkspace

The StepWorkspace: its files, and an upload_url when you may change the workflow.

Usage
helper = noclick.Workflow.from_name("support desk").step("helper")
for file in helper.workspace("orders").files:
    print(file.path, file.url)

delete_workspace_fileasync

step.delete_workspace_file(path, *, conversation=None) -> None

Delete one file from a conversation's workspace, as the app's chat does; a missing file does nothing. Takes what changing the workflow takes.

Parameters
pathstrrequired
conversationstr | Nonedefault None
Usage
noclick.Workflow.from_name("support desk").step("helper").delete_workspace_file(
    "out/report.md", conversation="orders")

appasync

step.app() -> StepPublication

Read this interface step's app as it stands. Takes read access to the workflow.

Returns
StepPublication

The StepPublication: state published (at its url), unpublished (in the trash, which trash_id restores until restorable_until, back at the subdomain it kept) or not_published, and the apps_domain a first publish puts it on.

Usage
page = noclick.Workflow.from_name("Morrow Bakehouse site").step("page")
print(page.app().state)   # "published"

check_addressasync

step.check_address(subdomain) -> PublishAddress

Check whether this interface step's app may be published (or renamed) at subdomain: free, or the address it already holds; never one another app holds. Changes nothing.

Parameters
subdomainstrrequired
Returns
PublishAddress

The PublishAddress: available, else the reason it isn't.

Usage
page = noclick.Workflow.from_name("Morrow Bakehouse site").step("page")
if page.check_address("morrow").available:
    page.publish("morrow")

publishasync

step.publish(subdomain=None, *, title=None) -> StepPublication

Put this interface step's app live as the app's canvas does, with no build: at subdomain the first time (morrow is morrow.noclick.app); again, the saved edits at the address it has (a subdomain other than its own raises noclick.Conflict: rename_app moves it). An app in the trash comes back where it was. Its pages carry the account's one key for it. Takes what changing the workflow takes, and through MCP deploy, as Workflow.publish does.

Parameters
subdomainstr | Nonedefault None
titlestr | Nonedefault None
Returns
StepPublication

The StepPublication: state published, the app's url, its project_id and subdomain, and the release (deployment_id).

Usage
site = noclick.Workflow.from_name("Morrow Bakehouse site").step("page")
print(site.publish("morrow").url)   # https://morrow.noclick.app

rename_appasync

step.rename_app(subdomain) -> StepPublication

Move this interface step's app to subdomain, publishing no edits; its old address stops answering.

Parameters
subdomainstrrequired
Returns
StepPublication

The StepPublication: state renamed, the new url and where it was (previous_url).

Usage
noclick.Workflow.from_name("Morrow Bakehouse site").step("page").rename_app("morrow-bakery")

unpublishasync

step.unpublish() -> StepPublication

Take this interface step's app down, to the trash: its public URL stops answering and its page's key stops working. For 30 days its address stays its own, and restoring it (or publish()) brings it back there with the same key. One not published changes nothing.

Returns
StepPublication

The StepPublication: state unpublished, where it answered (previous_url) and the trash_id that restores it until restorable_until.

Usage
gone = noclick.Workflow.from_name("Morrow Bakehouse site").step("page").unpublish()
noclick.TrashItem.from_id(gone.trash_id).restore()

StepOption

class StepOption

One choice a step's setting takes, as the app's dropdown lists it: its value (what the setting takes), its label and what the service says beside it (metadata: an icon, a count, None for none).

Attributes
valueAny
labelAny
metadatadict[str, Any] | None

StepOptions

class StepOptions

A page of the choices a step's field takes (Step.options). next_page_token reads the next page; withheld names, by path, a choice or a part of one left out because it held a secret.

Attributes
fieldstr
optionslist[StepOption]
next_page_tokenstr | None
withheldlist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

StepPublication

class StepPublication

What Step.publish, Step.rename_app and Step.unpublish left of an interface step's app: its state (published, renamed or unpublished) and url, as a build's published names them; the app itself (project_id, a noclick.Project's id, and its subdomain); the release a publish made (deployment_id); where it answered before a rename or an unpublish (previous_url); and, unpublished, the trash entry that restores it (trash_id) until restorable_until.

Attributes
workflow_idstr
step_idstr
actionstr
statestr
urlstr | None
project_idstr | None
subdomainstr | None
deployment_idstr | None
previous_urlstr | None
trash_idstr | None
restorable_untilAny
apps_domainstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

PublishAddress

class PublishAddress

What Step.check_address found: whether the interface step's app may go at subdomain (available), else reason; apps_domain is the domain it's on.

Attributes
subdomainstr
availablebool
reasonstr | None
apps_domainstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowState

class WorkflowState

What a workflow's State step keeps: its values by key, and the step_id keeping them (None, and nothing kept, in a workflow with no State step).

Attributes
workflow_idstr
step_idstr | None
valuesdict[str, Any]
rawdict[str, Any]

The response JSON exactly as the API sent it.

StepValue

class StepValue

A widget's value on a step (Step.value): value, or values where it fills several of the step's settings at once (a trigger's address, whether it's registered, why not). withheld names, by path, what was left out because it held a secret (a webhook's signing secret, a signed upload link).

Attributes
fieldstr
valueAny
valuesdict[str, Any] | None
withheldlist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

EditBatch

class EditBatch

The edits Workflow.edit() collects: each method queues one, and the with block's end sends them as one batch, applied in order as one version, or not at all (an op that can't apply raises noclick.InvalidRequest naming it, and nothing of the batch lands). A block that raises sends nothing.

Steps are named by Step or by id; a step add_step queues has its id already, so later edits in the batch can name it. After the block, result is the WorkflowEdit.

  • Works as a context manager: with or async with.
Attributes
opslist[dict[str, Any]]

The edits queued so far, as the API takes them (a connection given as an object is resolved when sent).

resultWorkflowEdit | None

What the batch did, once it was sent (None before, or when nothing was queued).

add_step

edit_batch.add_step(
    type, *, operation=None, settings=None, name=None, id=None, position=None,
    secrets=None, left_for_user=None
) -> Step

Queue a new step of type (automation-gmail, agent, trigger-cron), doing operation with settings. id names it (made from its type when left out); without position it's laid out beside the rest. An agent step's secrets and the settings left_for_user are as Step.update takes them.

Parameters
typestrrequired
operationstr | Nonedefault None
settingsdict[str, Any] | Nonedefault None
namestr | Nonedefault None
idstr | Nonedefault None
positionPosition | Nonedefault None
secretsAnydefault None
left_for_userAnydefault None
Returns
Step

The step, whose id later edits in the batch can name. Its fields load once the batch is sent.

Usage
brief = noclick.Workflow.from_name("Morning brief")
with brief.edit() as e:
    post = e.add_step("automation-slack", operation="send_message_to_channel", name="Post it",
                      settings={"channel": "#team", "text": "{{ $('summarize').text }}"})
    e.connect("summarize", post)
    e.set_connection(post, "work-slack")

update_step

edit_batch.update_step(
    step, *, settings=None, name=None, operation=None, enabled=None, secrets=None,
    left_for_user=None
) -> None

Queue a change to a step, as Step.update makes it (secrets and left_for_user too).

Parameters
stepAnyrequired
settingsdict[str, Any] | Nonedefault None
namestr | Nonedefault None
operationstr | Nonedefault None
enabledbool | Nonedefault None
secretsAnydefault None
left_for_userAnydefault None
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.update_step("send_summary", settings={"subject": "Today"}, enabled=True)
    e.update_step("summarize", secrets=["warehouse"])
    e.update_step("text_me", left_for_user=["to_number"])

patch_step

edit_batch.patch_step(step, field, patch) -> None

Queue a patch to one long text setting of a step, as Step.patch makes it.

Parameters
stepAnyrequired
fieldstrrequired
patchstrrequired
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.patch_step("writer", "system_prompt", "@@ Keep it short.\n-Keep it short.\n+Keep it brief.")

remove_step

edit_batch.remove_step(step) -> None

Queue taking a step (or a note) out, with its edges.

Parameters
stepAnyrequired
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.remove_step("old_digest")

connect

edit_batch.connect(
    source, target, *, kind='data', handle=None, target_handle=None, id=None
) -> None

Queue an edge from source into target, as Step.connect makes it (kind="tools" wires source into an agent as its tools). id names the edge (made for it when left out), as a canvas names its own.

Parameters
sourceAnyrequired
targetAnyrequired
kindstrdefault 'data'
handlestr | Nonedefault None
target_handlestr | Nonedefault None
idstr | Nonedefault None
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.connect("every_morning", "summarize")

disconnect

edit_batch.disconnect(source, target, *, handle=None, id=None) -> None

Queue removing the edge from source into target (id: the one edge of that id, when two join them).

Parameters
sourceAnyrequired
targetAnyrequired
handlestr | Nonedefault None
idstr | Nonedefault None
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.disconnect("summarize", "send_summary")

set_connection

edit_batch.set_connection(step, connection, *, slot=None) -> None

Queue connecting an account to a step, as Step.set_connection does (connection=None with slot takes one off).

Parameters
stepAnyrequired
connectionAnyrequired
slotstr | Nonedefault None
Usage
gmail = noclick.Connection.from_id("credential:9b2a1c5e-7d9f-4a31-8f6d-3f1d2c4b8a7e")
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.set_connection("send_summary", gmail)

mock_step

edit_batch.mock_step(step, output) -> None

Queue giving a step output on test runs instead of running it.

Parameters
stepAnyrequired
outputAnyrequired
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.mock_step("read_calendar", {"events": []})

unmock_step

edit_batch.unmock_step(step) -> None

Queue having a step run for real on test runs again.

Parameters
stepAnyrequired
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.unmock_step("read_calendar")

update_workflow

edit_batch.update_workflow(
    *, name=None, description=None, settings=None, display_metadata=None,
    interface=None
) -> None

Queue a change to the workflow's own fields, as Workflow.update makes it. display_metadata replaces what the app shows of it (its canvas's viewport, the step open in its panel; 16 KB at most): never a version, nor a change anyone is told of. interface replaces its Interface tab's layout as the app draws it (each block's place on the grid, the tabs' order; 256 KB at most): part of its graph, so a version.

Parameters
namestr | Nonedefault None
descriptionstr | Nonedefault None
settingsdict[str, Any] | Nonedefault None
display_metadatadict[str, Any] | Nonedefault None
interfacedict[str, Any] | Nonedefault None
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.update_workflow(description="Emails the team the day's calendar at 8.")

move

edit_batch.move(step, position, *, width=None, height=None) -> None

Queue moving a step (or a note) on the canvas, to (x, y), and for one drawn at a size (a note) giving it width and height. Moving things is never a version of its own.

Parameters
stepAnyrequired
positionPositionrequired
widthfloat | Nonedefault None
heightfloat | Nonedefault None
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.move("send_summary", (640, 120))

layout

edit_batch.layout() -> None

Queue laying every step out again, as the app's Tidy up does.

Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.layout()

add_note

edit_batch.add_note(
    content, *, id=None, color=None, near=None, direction=None, after=None,
    before=None, width=None, height=None, position=None
) -> Step

Queue a note on the canvas, as Workflow.add_note makes it (position: where it sits, instead of beside steps).

Parameters
contentstrrequired
idstr | Nonedefault None
colorint | Nonedefault None
nearSequence[Any] | Nonedefault None
directionstr | Nonedefault None
afterAnydefault None
beforeAnydefault None
widthint | Nonedefault None
heightint | Nonedefault None
positionPosition | Nonedefault None
Returns
Step

The note, a step of type stickyNote whose id later edits can name.

Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.add_note("Runs at 8 on weekdays.", near=["every_morning"])

define_variable

edit_batch.define_variable(name, *, value='', description=None, per_user=False) -> None

Queue defining a workflow variable: a value its steps read as {{vars.name}}, changed in one place. per_user=True asks each person who copies the workflow for their own. Only the workflow's owner defines one.

Parameters
namestrrequired
valuestrdefault ''
descriptionstr | Nonedefault None
per_userbooldefault False
Usage
with noclick.Workflow.from_name("Morning brief").edit() as e:
    e.define_variable("team_email", value="team@acme.com", description="Who gets the brief")

add_test_run

edit_batch.add_test_run(
    trigger, name, body, *, title=None, author=None, handle=None
) -> None

Queue a Test Run: a message staged on trigger (a trigger step wired into an agent, by step or id, or its type) that the app's Test Run plays to the agent. Only the workflow's owner adds one.

Parameters
triggerAnyrequired
namestrrequired
bodystrrequired
titlestr | Nonedefault None
authorstr | Nonedefault None
handlestr | Nonedefault None
Usage
with noclick.Workflow.from_name("Support inbox").edit() as e:
    e.add_test_run("support_email", "Refund request", "Hi, I'd like a refund for order 1042.",
                   title="Refund for order 1042", author="ana@example.com")

WorkflowEdit

class WorkflowEdit

What an edit did: the workflow's version once it and what it set in motion were written (a trigger's registration writes too), to edit on from; whether its definition changed (moving things on the canvas changes none); the version of its history it landed in (history_version, what version_at and restore name: a version of its own, which this key's next edits join for five minutes from its first; a layout-only edit is none); a summary of what changed; each op's results in order (an added step's id, and what the edit did on its own: resolutions, harness_switch, coerced_values, stripped_trigger_refs, http_auth_credential_hint); and, for each step an op touched, whether it's ready to run (steps: config_valid, validation_error, missing_required, left_for_user, agent_credential_hint, and references: each read of another step's output that won't resolve, as Step.references reads them). graph is the workflow as written, read as Workflow.graph() reads it, when the edit asked for it; restored_from names the version of its history a restore put back. warnings say what an edit did that won't work as it may look: a read in a touched step's settings that gets no value (each of its references, in a sentence), and a workspace member's own connection given to a team workflow's step, which its owner's automatic runs can't use. An edit sent with settle also says whether what it set going finished in time (settled) and, by step, why each trigger it left unregistered can't be registered yet (unregistered).

Attributes
workflow_idstr
versionint
history_versionint | None
changedbool
summarystr | None
resultslist[dict[str, Any]]
stepsdict[str, dict[str, Any]]
graphWorkflowGraph | None
restored_fromint | None
warningslist[str]
settledbool | None
unregistereddict[str, str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowVersion

class WorkflowVersion

One version of a workflow's history: its own number (history_version, what version_at and restore take, fixed once given), the workflow's version its latest write left, where the change came from (source: api, canvas, builder, mcp, coordinator, deploy, restore, baseline, the workflow as it was before its history began, or checkpoint, one saved in the app before its history was kept, numbered below 1), who began it (author: {user_id, key_id}, None for the baseline) and everyone who wrote into it (authors, its author first), a summary and each of its changes, and for a restore the version of the history it put back (restored_from). A named version (a checkpoint: Workflow.name_version) has its label and note, who named it (labeled_by: {user_id}) and when (labeled_at), and is kept for good while it has a name.

Saves in the app's canvas within five minutes of a session's first are one version, whoever made them. Any other change (from your code, the builder, an MCP client, NoClick's assistant, a restore) is a version of its own, which only the same key's next changes from the same place join, within five minutes of its first; so updated_at is its latest write. graph is the whole definition it holds, its name, description and settings with its steps, read with Workflow.version_at (None in a list): a restore puts all of it back. Its steps are as they were then, and changing one changes the workflow's step of that id as it is now.

Attributes
workflow_idstr
history_versionint
versionint
sourcestr
authordict[str, Any] | None
authorslist[dict[str, Any]]
summarystr | None
changeslist[str]
restored_fromint | None
created_atAny
updated_atAny
graphWorkflowGraph | None
labelstr | None
notestr | None
labeled_bydict[str, Any] | None
labeled_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

step_countint | None

How many steps it holds (notes aside), on a version versions(recent=True) lists; None otherwise.

WorkflowVariables

class WorkflowVariables

A workflow's variables with their values, which no other read of it carries, as they were at version: definitions are its variables as its settings hold them, in their order (each {name, value, description, per_user}; per_user: asked of each new owner when the workflow is copied, and read here like any other), and variables the graph's own by name, as its Set variable steps last wrote them. values is what {{vars.name}} reads: the two together, the graph's own winning.

Attributes
workflow_idstr
versionint | None
definitionslist[dict[str, Any]]
variablesdict[str, Any]
rawdict[str, Any]

The response JSON exactly as the API sent it.

valuesdict[str, Any]

Each variable's value by name: a definition's when it has one, the graph's own over it.

WorkflowSetup

class WorkflowSetup

What a workflow needs from its person before it can run (Workflow.setup()), derived from it as it stands: items, each a dict whose kind is connect (an app to connect, once for every step that needs it: app, label, steps, reconnect), setting (a value only the person knows: its step, the setting's name, label, type and options) or secret (the keys an agent step's shell asked for, kept as the secret name). ready is true when there's nothing. request is the setup request still waiting on the person (its id, operation_id and each part's status), else None; sent the request request_setup() just sent, else None.

Attributes
workflow_idstr
readybool
itemslist[dict[str, Any]]
requestdict[str, Any] | None
sentdict[str, Any] | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowFile

class WorkflowFile

A file one of your workflows keeps: what a step or an interface uploaded or produced. url reads it until url_expires_at; list again for a fresh one. Tables are apart (WorkflowTable).

You read the files of each workflow Workflow.get reads: your account's own, those shared with it, and the ones its agents run on. They're the account's: acting for one of your users, it's refused. An app's own code reads only those of a workflow its code made, named with workflow.

Attributes
idstr
namestr
workflowdict[str, Any]

The workflow that keeps it: {id, name, step_types}. step_types is what it's made of, at a glance: at most four of its step types, its triggers first, then its agents, then the rest in the order it holds them (['trigger-cron', 'agent:codex', 'automation-hubspot']); an agent on a coding harness is agent:<harness>. Only step types and harness names, never a step's settings.

accessstr

Your account's access to that workflow: owner, editor or viewer. Deleting takes owner or editor.

step_idstr | None

The step that keeps it, when one does.

typestr

What it holds: image, video, audio, document or file.

mime_typestr | None
size_bytesint
urlstr | None

A link that reads the file until url_expires_at (an hour after it's listed), naming nothing of where it's stored: a picture, PDF, sound or video opens in place, anything else downloads. None for a file with nothing stored yet.

url_expires_atAny
upload_urlstr | None

Only on a file create made: where its bytes go, in one PUT whose Content-Type is its mime_type and whose length is its size_bytes, until upload_expires_at.

upload_expires_atAny
permanent_urlstr | None

Only on a file create made: where it reads for good once uploaded, which a step or a message may carry. Anyone holding it reads the file.

created_atAny
updated_atAny

from_idclassmethod

noclick.WorkflowFile.from_id(file_id, *, client=None) -> WorkflowFile

A handle to one of your workflows' files by id: nothing is read (delete() it, or get it to read it).

Parameters
file_idstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowFile

The WorkflowFile, its fields read only by get.

Usage
noclick.WorkflowFile.from_id("6f1c...").delete()

getclassmethodasync

noclick.WorkflowFile.get(file_id, *, client=None) -> WorkflowFile

One of your workflows' files by id, as list shows it.

Parameters
file_idstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowFile

The WorkflowFile, its url good for an hour.

Usage
menu = noclick.WorkflowFile.get("6f1c...")
print(menu.name, menu.url)

createclassmethodasync

noclick.WorkflowFile.create(
    workflow, name, *, size_bytes, mime_type=None, step_id=None, type=None,
    client=None
) -> WorkflowFile

Make a file of workflow (a Workflow or its id) to upload: put its bytes to upload_url in one PUT. size_bytes is at most 100 MB; type (image, video, audio, document, file) is read from mime_type when left out. Takes edit access to the workflow.

Parameters
workflowAnyrequired
namestrrequired
size_bytesintrequired
mime_typestr | Nonedefault None
step_idstr | Nonedefault None
typestr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowFile

The WorkflowFile with its upload_url and permanent_url.

Usage
data = open("menu.pdf", "rb").read()
menu = noclick.WorkflowFile.create(noclick.Workflow.from_name("Cafe site"), "menu.pdf",
                                   size_bytes=len(data), mime_type="application/pdf")
httpx.put(menu.upload_url, content=data, headers={"Content-Type": "application/pdf"})

listclassmethodasync

noclick.WorkflowFile.list(
    *, workflow=None, organization_id=None, limit=None, client=None
) -> list[WorkflowFile]

The files your workflows keep, most recently changed first: every workflow Workflow.get reads, or one (workflow, a Workflow or its id). An app's own code names a workflow its code made.

Parameters
workflowAnydefault None
organization_idstr | Nonedefault None
limitint | None

Return at most this many.

(default None)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[WorkflowFile]

Every file, fetched page by page (or the first limit), each with a link good for an hour.

Usage
intake = noclick.Workflow.from_name("Order intake")
for file in noclick.WorkflowFile.list(workflow=intake):
    print(file.name, file.workflow["name"], file.url)

list_pageclassmethodasync

noclick.WorkflowFile.list_page(
    *, workflow=None, organization_id=None, cursor=None, limit=None, client=None
) -> Page

One page of the files your workflows keep; pass next_cursor back as cursor.

Parameters
workflowAnydefault None
organization_idstr | Nonedefault None
cursorstr | None

The next_cursor of the page before; omit it for the first page.

(default None)
limitint | None

Return at most this many.

(default None)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Page

A page whose data holds the files and whose next_cursor is None on the last page.

Usage
page = noclick.WorkflowFile.list_page(organization_id="none", limit=25)
print([file.name for file in page.data])

deleteasync

workflow_file.delete() -> None

Delete the file for good: its record and what it stored, with no trash to restore it from. A step that reads it by its id finds nothing there. Takes edit access to its workflow, never one of your agents runs on (noclick.PermissionDenied otherwise: change that through the agent).

Usage
for file in noclick.WorkflowFile.list(workflow=noclick.Workflow.from_name("Order intake")):
    if file.name.endswith(".tmp"):
        file.delete()

WorkflowTable

class WorkflowTable

A table one of your workflows keeps rows in (a Table step's, an interface's). Read its rows with rows(), never by querying the database it names (database_id): how a workflow lays its tables out there may change. You read the tables of the workflows you read their files of (WorkflowFile).

Attributes
idstr
namestr
workflowdict[str, Any]

The workflow that keeps it: {id, name, step_types}. step_types is what it's made of, at a glance: at most four of its step types, its triggers first, then its agents, then the rest in the order it holds them (['trigger-cron', 'agent:codex', 'automation-hubspot']); an agent on a coding harness is agent:<harness>. Only step types and harness names, never a step's settings.

accessstr

Your account's access to that workflow: owner, editor or viewer. Deleting takes owner or editor.

step_idstr | None

The step that keeps it, when one does.

row_countint | None

How many rows it holds.

database_idstr | None

The database of your account's its rows are kept in (noclick.Database.from_id); None until they move there.

created_atAny
updated_atAny

from_idclassmethod

noclick.WorkflowTable.from_id(table_id, *, client=None) -> WorkflowTable

A handle to one of your workflows' tables by id: nothing is read (its rows, or delete() it).

Parameters
table_idstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Usage
noclick.WorkflowTable.from_id("8a2e...").delete()

createclassmethodasync

noclick.WorkflowTable.create(
    workflow, name, *, step_id=None, client=None
) -> WorkflowTable

Make an empty table of workflow (a Workflow or its id), as an interface or a Table step does. Takes edit access to the workflow.

Parameters
workflowAnyrequired
namestrrequired
step_idstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Usage
signups = noclick.WorkflowTable.create(noclick.Workflow.from_name("Signups"), "Signups")
signups.add_rows([{"email": "ada@example.com"}])

add_rowsasync

workflow_table.add_rows(rows) -> int

Add rows at its end, in order, each an object of at most 1 MB as JSON; more than 10,000 go in as several calls. Takes edit access to its workflow.

Parameters
rowslist[dict[str, Any]]required
Returns
int

How many rows went in.

Usage
[signups] = noclick.WorkflowTable.list(workflow=noclick.Workflow.from_name("Signups"))
signups.add_rows([{"email": "ada@example.com"}, {"email": "grace@example.com"}])

update_rowasync

workflow_table.update_row(row_id, data) -> None

Replace one row's data with data. Takes edit access to its workflow.

Parameters
row_idstrrequired
datadict[str, Any]required
Usage
[signups] = noclick.WorkflowTable.list(workflow=noclick.Workflow.from_name("Signups"))
first = signups.rows(limit=1)[0]
signups.update_row(first.id, {**first.data, "confirmed": True})

remove_rowsasync

workflow_table.remove_rows(row_ids) -> int

Take rows out by id, for good; one it doesn't hold is passed by. Takes edit access to its workflow.

Parameters
row_idslist[str]required
Returns
int

How many rows went.

Usage
[signups] = noclick.WorkflowTable.list(workflow=noclick.Workflow.from_name("Signups"))
signups.remove_rows([row.id for row in signups.rows() if not row.data.get("email")])

listclassmethodasync

noclick.WorkflowTable.list(
    *, workflow=None, organization_id=None, limit=None, client=None
) -> list[WorkflowTable]

The tables your workflows keep, most recently changed first: every workflow Workflow.get reads, or one (workflow, a Workflow or its id). An app's own code names a workflow its code made.

Parameters
workflowAnydefault None
organization_idstr | Nonedefault None
limitint | None

Return at most this many.

(default None)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[WorkflowTable]

Every table, fetched page by page (or the first limit).

Usage
for table in noclick.WorkflowTable.list(workflow=noclick.Workflow.from_name("Signups")):
    print(table.name, table.row_count)

list_pageclassmethodasync

noclick.WorkflowTable.list_page(
    *, workflow=None, organization_id=None, cursor=None, limit=None, client=None
) -> Page

One page of the tables your workflows keep; pass next_cursor back as cursor.

Parameters
workflowAnydefault None
organization_idstr | Nonedefault None
cursorstr | None

The next_cursor of the page before; omit it for the first page.

(default None)
limitint | None

Return at most this many.

(default None)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Page

A page whose data holds the tables and whose next_cursor is None on the last page.

Usage
page = noclick.WorkflowTable.list_page(limit=25)
print([table.name for table in page.data])

rows_pageasync

workflow_table.rows_page(*, cursor=None, limit=None) -> RowsPage

One page of its rows in the order they were added (limit, 1 to 10,000; 100 when left out); pass next_cursor back as cursor.

Parameters
cursorstr | None

The next_cursor of the page before; omit it for the first page.

(default None)
limitint | None

Return at most this many.

(default None)
Returns
RowsPage

A page whose data holds each TableRow, whose next_cursor is None on the last page and whose total_count is how many rows the table holds.

Usage
[signups] = noclick.WorkflowTable.list(workflow=noclick.Workflow.from_name("Signups"))
page = signups.rows_page(limit=500)
print([row.data["email"] for row in page.data])

rowsasync

workflow_table.rows(*, limit=None) -> list[TableRow]

Its rows in the order they were added.

Parameters
limitint | None

Return at most this many.

(default None)
Returns
list[TableRow]

Every row, read 10,000 at a time (or the first limit).

Usage
[signups] = noclick.WorkflowTable.list(workflow=noclick.Workflow.from_name("Signups"))
emails = [row.data["email"] for row in signups.rows()]

deleteasync

workflow_table.delete() -> None

Delete the table and every row in it for good, with no trash to restore it from. A step or an interface that reads or adds to it fails on its next run. Takes edit access to its workflow, never one of your agents runs on (noclick.PermissionDenied otherwise).

Usage
[scratch] = noclick.WorkflowTable.list(workflow=noclick.Workflow.from_name("Scratch"))
scratch.delete()

AgentStepWorkspace

class AgentStepWorkspace

One of your conversations with an agent step of a workflow, as a place its files are kept: what Step.workspace(conversation) reads. You list those of your own conversations with the agent steps of every workflow Workflow.get reads (never a share link's visitors', nor an agent's workflow: an agent keeps one workspace, agent.workspace()). They're your people's, never one of your users': acting for one, it's refused.

Attributes
workflowdict[str, Any]

The workflow the step is in: {id, name, step_types}, as WorkflowFile.workflow names it.

step_idstr
step_namestr

The agent step's name in the app.

modelstr | None

The model the conversation last ran on.

conversationstr

The conversation, as Step.workspace takes it.

titlestr
last_activityAny

listclassmethodasync

noclick.AgentStepWorkspace.list(
    *, organization_id=None, limit=None, client=None
) -> list[AgentStepWorkspace]

Your conversations' workspaces with agent steps, most recently active first, as Resources lists them; organization_id narrows to a team workspace's workflows ("none": those in no workspace).

Parameters
organization_idstr | Nonedefault None
limitint | None

Return at most this many.

(default None)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[AgentStepWorkspace]

Each one (or the first limit).

Usage
for place in noclick.AgentStepWorkspace.list():
    print(place.step_name, place.title, [f.path for f in place.files().files])

filesasync

agent_step_workspace.files() -> Any

Its files, as Step.workspace(conversation) reads them.

Returns
Any

The StepWorkspace: its files, and an upload_url when you may change the workflow.

Usage
[place] = noclick.AgentStepWorkspace.list(limit=1)
for file in place.files().files:
    print(file.path, file.url)

Share

class Share

Who one of your resources is shared with, and what they may do with it.

Attributes
idstr
resource_typestr
resource_idstr
with_str

user (a person, by email), organization (a team workspace) or public (anyone with url).

accessstr

view or edit.

namestr | None

Who it's with, as the app names them.

emailstr | None
user_idstr | None
organization_idstr | None
pendingbool

A person without an account yet: they get it once they make one.

urlstr | None

A public share's page.

created_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

resource_namestr | None

The resource's name and who shared it, on a share read alone (retrieve).

shared_by_namestr | None

retrievestaticasync

noclick.Share.retrieve(share_id, *, client=None) -> Share

One share, for the person it's with (watch's share change says something was shared with you) or someone who manages the resource's shares: with the resource's resource_name and who shared it, shared_by_name.

Parameters
share_idstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Usage
share = noclick.Share.retrieve(share_id)
print(f"{share.shared_by_name} shared {share.resource_name} ({share.access})")

liststaticasync

noclick.Share.list(resource, *, resource_type=None, client=None) -> list[Share]

Who resource (a Workflow, or any resource's id with its resource_type) is shared with. Only someone who manages its shares reads them.

Parameters
resourceAnyrequired
resource_typestr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[Share]

Each share, with whom (with_, name) and what it allows (access).

Usage
for share in noclick.Share.list(noclick.Workflow.from_name("Order intake")):
    print(share.name, share.access, share.pending)

createstaticasync

noclick.Share.create(
    resource, *, email=None, organization_id=None, public=False, access='view',
    resource_type=None, client=None
) -> Share

Share resource with a person by email (they're told; someone without an account gets it once they make one), a team workspace (organization_id), or, for a workflow, anyone with the link (public, always to view). Sharing again with the same one changes its access (view or edit).

Parameters
resourceAnyrequired
emailstr | Nonedefault None
organization_idstr | Nonedefault None
publicbooldefault False
accessstrdefault 'view'
resource_typestr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Share

The share.

Usage
noclick.Share.create(noclick.Workflow.from_name("Order intake"), email="sam@example.com", access="edit")

updateasync

share.update(access, *, client=None) -> Share

Change what it allows (view or edit).

Parameters
accessstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Share

The share as it is now.

Usage
[share] = noclick.Share.list(noclick.Workflow.from_name("Order intake"))
share.update("view")

deleteasync

share.delete(*, client=None) -> None

End it: whoever it was with stops seeing the resource (sharing it again gives it back).

Parameters
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Usage
for share in noclick.Share.list(noclick.Workflow.from_name("Order intake")):
    if share.pending:
        share.delete()

leavestaticasync

noclick.Share.leave(resource, *, resource_type=None, client=None) -> bool

Stop seeing something shared with you: your own share of it goes.

Parameters
resourceAnyrequired
resource_typestr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
bool

False when there was none to drop (it reaches you through a team workspace or a shared folder).

Usage
noclick.Share.leave("6f1c…", resource_type="workflow")

accept_invitestaticasync

noclick.Share.accept_invite(token, *, client=None) -> ShareInviteAccepted

Join a workflow through its invite link's token, signed in: you get the link's access to it, as a share of your own. Accepting again changes nothing.

Parameters
tokenstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
ShareInviteAccepted

The workflow's id and name, and whether the session's token should be refreshed to see it.

Usage
joined = noclick.Share.accept_invite(token)
print(joined.workflow_id, joined.workflow_name)

ShareInviteAccepted

class ShareInviteAccepted

The workflow an invite link joined you to (Share.accept_invite).

Attributes
workflow_idstr
workflow_namestr | None
refresh_sessionbool

The session's token should be refreshed for it to see the workflow.

TableRow

class TableRow

One row of a table: its id, its position (index, from 0 in the order rows were added) and its data, the object as it was written.

Attributes
idstr
indexint
datadict[str, Any]
created_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

RowsPage

class RowsPage(Page)

One page of a table's rows; pass next_cursor back as cursor for the next (None = the last page). total_count is how many rows the table holds.

Attributes
total_countint

step_types

noclick.step_types(query=None, *, kind=None, limit=None, client=None) -> list[StepType]

Every kind of step a workflow can hold, NoClick's own first, then the integrations most used first; with query, those it finds by name or by what they do, the best first, as the app's builder searches. kind="trigger" keeps the types a run starts from (a trigger step, or one with a trigger operation), kind="tool" those an agent uses as its tools; any other raises noclick.InvalidRequest. A listing leaves out each operation's description and the settings schema: step_type() reads them. Needs the workflows scope.

Parameters
querystr | Nonedefault None
kindstr | Nonedefault None
limitint | None

Return at most this many.

(default None)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[StepType]

Each type's type (what workflow.add_step takes), label, kinds, operations (each with whether it's a trigger and needs_account) and connection, fetched page by page (or the first limit).

Usage

Find the step for a job, and add it:

[send] = noclick.step_types("send an email", limit=1)
brief = noclick.Workflow.from_name("Morning brief")
brief.add_step(send.type, operation=send.operations[0].name)

Or every way a run can start:

for kind in noclick.step_types(kind="trigger"):
    starts = [op.name for op in kind.operations if op.trigger] or ["(the step itself)"]
    print(kind.type, starts)

step_type

noclick.step_type(
    name, *, kind=None, query=None, operation=None, client=None
) -> StepType

One step type, each operation with its description (its triggers first), and its schema: what a step's settings take, as the app's canvas draws its form from it. name is the type as a workflow's graph names it (automation-gmail, agent); an unknown one raises noclick.NotFound naming the nearest. A type can be large (Stripe holds 491 operations): kind ("trigger" or "action"), query (the operations its words fit, the best first) and operation (one name, or several) keep only some, and the schema only their settings; operations_total still counts them all. An operation the type doesn't have raises noclick.InvalidRequest. Needs the workflows scope.

Parameters
namestrrequired
kindstr | Nonedefault None
querystr | Nonedefault None
operationstr | list[str] | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
StepType

The type, with its schema (None for a type that takes no settings).

Usage

Read a type's operations and settings:

gmail = noclick.step_type("automation-gmail")
send = next(op for op in gmail.operations if op.name == "send_email_message")
print(send.description, gmail.connection.credential_types)
print(list(gmail.schema["$defs"]))

Or what starts a workflow in a large one, then one operation's settings:

stripe = noclick.step_type("automation-stripe", kind="trigger", query="payment failed")
failed = noclick.step_type("automation-stripe", operation=stripe.operations[0].name)
print(failed.operations_total, list(failed.schema["$defs"]))

StepType

class StepType

A kind of step a workflow can hold: one of step_types().

Attributes
typestr

What workflow.add_step takes, as a workflow's graph names it: automation-slack, agent, trigger-cron.

labelstr | None

Its name in the app (Slack, AI Agent, Schedule).

descriptionstr | None
categorystr | None

The section the app lists an integration under (communication, crm-sales); None for NoClick's own.

kindslist[str]

What a step of it can be in a workflow: trigger (a run starts from it: trigger below, or one of its operations) and tool (an agent uses its operations as tools).

triggerbool

Whether a step of it starts runs whatever its operation (a trigger step: a schedule, a webhook, a form).

operationslist[StepTypeOperation]

Each operation once, its triggers first, in the order the app lists them; empty for a type that has none (trigger-run). A read narrowed by kind, query or operation holds only those it kept.

connectionStepTypeConnection | None

The accounts it connects to; None for a type whose settings take none.

retireddict[str, Any] | None

Why its service is gone and since when (reason, since), or None while it works. A listing leaves retired types out; step_type() still reads one, since a step saved on it still loads and runs.

schemadict[str, Any] | None

The JSON Schema of a step's settings, as the app's canvas draws its form from it (properties.config, a member per operation where it has several, with the canvas's x- and ui: extensions). None in a listing, and for a type that takes no settings.

rawdict[str, Any]

The response JSON exactly as the API sent it.

operations_totalint | None

How many operations the type has in all, whatever a read kept; None in a listing.

check_step_settings

noclick.check_step_settings(name, settings, *, client=None) -> StepSettingsCheck

Whether settings of the step type name would run, as a run judges them (a form's, saved or not): nothing is read or written. Needs the workflows scope.

Parameters
namestrrequired
settingsdict[str, Any]required
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Usage
check = noclick.check_step_settings("log", {"message": "Hello"})
if not check.valid:
    print(check.errors)

StepSettingsCheck

class StepSettingsCheck

Whether settings of a step type would run (check_step_settings): valid, the errors in the way, and the set of settings they meet (satisfied_set, default; None when none).

Attributes
step_typestr
validbool
errorslist[Any]
satisfied_setstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

RunInputs

class RunInputs

What came in to a coding harness's reply (Workflow.run_inputs): each delivery it answered (inputs, the newest 15, each {"run_id", "steps"} with what its steps output, never a secret), and total, every delivery it answered.

Attributes
inputslist[dict[str, Any]]
totalint

WorkflowTemplate

class WorkflowTemplate

A workflow's place in NoClick's template library (Workflow.template): whether it's published, its title, slug, description and page (public_url) when it is, and the draft_title and draft_description saved for it before it's published. Its page opens by its link; nothing lists it.

Attributes
publishedbool
titlestr | None
slugstr | None
descriptionstr | None
public_urlstr | None
draft_titlestr | None
draft_descriptionstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

TemplateVote

class TemplateVote

A person's vote on a published template (template_vote, vote_on_template): theirs (vote: 1, -1 or None) and the template's counts.

Attributes
slugstr
voteint | None
upvote_countint
downvote_countint
rawdict[str, Any]

The response JSON exactly as the API sent it.

template_vote

noclick.template_vote(slug, *, client=None) -> TemplateVote

Your vote on the published template at slug, and its counts.

Parameters
slugstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
TemplateVote

Your vote (None for none) and the template's up and down counts.

Usage
print(noclick.template_vote("daily-digest").upvote_count)

vote_on_template

noclick.vote_on_template(slug, vote, *, client=None) -> TemplateVote

Vote on the published template at slug: 1 up, -1 down, or None to take your vote back. A person's own: a call acting for one of your users has none.

Parameters
slugstrrequired
voteint | Nonerequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
TemplateVote

Your vote as it stands now, and the template's counts with it.

Usage
noclick.vote_on_template("daily-digest", 1)

StepTypeOperation

class StepTypeOperation

One operation a step of the type runs: what operation= takes.

Attributes
namestr
labelstr | None
descriptionstr | None

What it does; None in a listing (step_type() reads it).

triggerbool

Whether it starts runs (a trigger operation, x-is-trigger) rather than acting when a run reaches it.

needs_accountbool

Whether running it needs an account connected to the step: False when it runs on NoClick's key with no account (web search, public data) or the type takes none; True otherwise, also when the need depends on its settings.

rawdict[str, Any]

The response JSON exactly as the API sent it.

StepTypeConnection

class StepTypeConnection

The accounts a step of the type connects to (step.set_connection).

Attributes
neededbool

Whether every operation needs one, so a step of it can't run without.

integrationstr | None

Its name in Connection.integrations() (integration= when you make a connection for it), or None for a step whose account isn't connected there (an agent's model key).

credential_typeslist[str]

The credential types its settings take, as a step's connections names them.

rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowFolder

class WorkflowFolder

One of your account's workflow folders, as the app's Automations page shows it: Workflow.folders() lists them, Workflow.create_folder() makes one and workflow.move_to() files a workflow in one.

Attributes
idstr
namestr
descriptionstr | None
parent_idstr | None

The folder it's in; None at the top.

depthint

How deep it sits: 0 at the top, 10 at most.

workflow_countint

How many workflows are in it (not counting its folders').

created_atAny
updated_atAny
rawdict[str, Any]

The response JSON exactly as the API sent it.

accessstr

owner for one your account made; viewer for a teammate's in a team workspace, or one shared with you.

ownerdict[str, Any] | None

Who shared it with you ({"name": ...}); None for your account's own.

shared_atAny

When it was shared with you; None for your account's own.

WorkflowFolderListing

class WorkflowFolderListing

A folder's workflows as the app's Automations page lists them (Workflow.in_folder()).

Attributes
workflowslist[Workflow]
hidden_shared_countint

Workflows shared with you that your plan has no room for, left out.

planstr | None

The plan that room is judged by (free, member, ...); None when the API didn't say.

WorkflowConnectionInfo

class WorkflowConnectionInfo

An account one of a workflow's steps uses, as the canvas names it (workflow.connections()): its name and type, and who it belongs to. Never a value.

Attributes
idstr

The credential's id, as the step holds it.

namestr
credential_typestr
owned_by_mebool

Whether it's your own account (else a collaborator's, lent to this workflow, or its owner's).

owner_namestr | None

Who it belongs to when it isn't yours.

rawdict[str, Any]

The response JSON exactly as the API sent it.

workflow_examples

noclick.workflow_examples(
    query=None, *, limit=None, client=None
) -> list[WorkflowExample]

NoClick's own example workflows, the ones its builder studies before it builds, most recently changed first; with query, the ones it finds by name, what they're for and their text, the best first. A listing leaves each one's text and workflow out: workflow_example() reads them. Needs the workflows scope.

Parameters
querystr | Nonedefault None
limitint | None

Return at most this many.

(default None)
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[WorkflowExample]

Each example's name, description, whether it has guidance text and a workflow, and what that's made of (step_types), fetched page by page (or the first limit).

Usage

Find the examples for a job, and read the best one whole:

[best] = noclick.workflow_examples("post new form answers to Slack", limit=1)
example = noclick.workflow_example(best.id)
print(example.text)
for node in example.graph["nodes"]:
    print(node["type"], node["config"].get("operation"))

workflow_example

noclick.workflow_example(example_id, *, client=None) -> WorkflowExample

One of NoClick's example workflows whole: its guidance text and its workflow's graph. An id that names none raises noclick.NotFound. Needs the workflows scope.

Parameters
example_idstrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
WorkflowExample

The example, with its text and graph (each None where it has none).

Usage
example = noclick.workflow_example("6f1c2e9a-3b7d-4f0e-9a51-2d8c4b7e1a03")
print(example.description, example.step_types)

WorkflowExample

class WorkflowExample

One of NoClick's example workflows: one of workflow_examples().

Attributes
idstr
namestr
descriptionstr | None

What it's for, and when it applies.

has_textbool

Whether it holds guidance text, and a workflow.

has_workflowbool
step_typeslist[str]

What its workflow is made of, at a glance, as Workflow.step_types says it: its triggers first, then its agents, then the rest.

updated_atAny
textstr | None

Its guidance, in Markdown; None in a listing (workflow_example() reads it).

graphdict[str, Any] | None

Its workflow as workflow.graph() reads a workflow's (nodes, each with its type and config, and edges), without the connections or test outputs of the account it was made in, never a secret; None in a listing and for one that's guidance only.

rawdict[str, Any]

The response JSON exactly as the API sent it.

step_output_shape

noclick.step_output_shape(name, *, operation=None, client=None) -> StepOutputShape

What a step of type name outputs (its operation's, for a type with several), learned from your account's own runs: the fields a later step's settings can reference, as the app's canvas offers them. Needs the workflows scope.

Parameters
namestrrequired
operationstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
StepOutputShape

The StepOutputShape; an unknown type raises noclick.NotFound naming the nearest.

Usage
found = noclick.step_output_shape("automation-hubspot", operation="get_contact")
print(list((found.shape or {}).get("properties", {})))

StepOutputShape

class StepOutputShape

What a step of a type outputs, as your account's own runs and events of it showed it (and those of people in a workspace with you), never another account's: shape, its fields' names and types, with suggested_refs, the few references worth offering first (None until they're made). shape is None until your first run or event of it.

Attributes
typestr
operationstr
shapedict[str, Any] | None
suggested_refslist[Any] | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowRunCounts

class WorkflowRunCounts

How many runs Workflow.runs lists (Workflow.run_counts): the total, by_status (running, succeeded, failed, each there even at 0), waiting (how many of the running ones wait on an approval, a delay or an agent's turn), by_source (api, endpoint, schedule, trigger, app: only those with runs) and by_trigger (the kinds of event that started the runs a trigger did: webhook, email, …, only those with runs). A run from code counts once, however many executions it spans.

Attributes
workflow_idstr
totalint
by_statusdict[str, int]
by_sourcedict[str, int]
rawdict[str, Any]

The response JSON exactly as the API sent it.

waitingint
by_triggerdict[str, int]

LatestOutputs

class LatestOutputs

Each step's latest output, whatever run it's from (Workflow.latest_outputs): outputs by step id, each cut short as a run's steps are unless read full (truncated names the steps cut), never a secret (withheld: each step's paths left out). A step that never stored one isn't in outputs. last_runs: how each step's latest run ended, as the app's canvas marks it beside the step; a step never run isn't in it.

Attributes
workflow_idstr
outputsdict[str, Any]
withhelddict[str, list[str]]
fullbool
truncatedlist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

last_runsdict[str, StepLastRun]

StepLastRun

class StepLastRun

How a step's latest run ended (LatestOutputs.last_runs): its status (succeeded, failed, skipped), when it finished_at, its error.

Attributes
statusstr
finished_atAny
errorstr | None

ExpressionPreview

class ExpressionPreview

What an expression gives (Step.preview_expression): ok, with the value's kind (object, array, string, number, boolean, null), an object's keys and a short preview; or ok False with the error.

Attributes
okbool
kindstr | None
keyslist[str] | None
previewstr | None
errorstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

ClearedStepState

class ClearedStepState

What Step.clear_state forgot: how many of its state records and of its conversations were deleted.

Attributes
step_idstr
state_rows_deletedint
conversations_deletedint
rawdict[str, Any]

The response JSON exactly as the API sent it.

step_type_options

noclick.step_type_options(
    name, field, *, connection=None, settings=None, workflow_id=None, search=None,
    page_token=None, client=None
) -> StepTypeOptions

The choices a step of type name lists for field (the name its loader takes, a setting's x-dynamic-options.field_name), for no step of a workflow: a picker outside a step's form. Read through connection, an account you may use (its ref or credential id), with settings what the list depends on; workflow_id names the workflow the choices are for. A step's own dropdown is Step.options. Needs the workflows scope.

Parameters
namestrrequired
fieldstrrequired
connectionstr | Nonedefault None
settingsdict[str, Any] | Nonedefault None
workflow_idstr | Nonedefault None
searchstr | Nonedefault None
page_tokenstr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
Usage
page = noclick.step_type_options("automation-slack", "channel", connection="credential:7c1...")
print([o["label"] for o in page.options])

StepTypeOptions

class StepTypeOptions

A page of a step type's choices for one field (step_type_options): each of options is {value, label, metadata}; pass next_page_token back as page_token. withheld names, by path, a choice or a part of one left out because it held a secret.

Attributes
typestr
fieldstr
optionslist[dict[str, Any]]
next_page_tokenstr | None
withheldlist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.

WorkflowReadinessCheck

class WorkflowReadinessCheck

A workflow's readiness with the evidence it's judged on (Workflow.check_readiness): its status, what that meaning is, the issues in the way, warnings and unverified steps (each {step, code, message}), then each trigger's latest real input (observations: step, at, trigger, run_status), the triggers registered where their events come from (registered_steps), each missing-update check's deadline (deadline_watches) with the alarm steps that keep them (alarm_steps), and the recipients an agent's tools are held to (destinations). An input observed is history: it doesn't show the next one will arrive.

Attributes
statusstr
meaningstr
issueslist[dict[str, Any]]
warningslist[dict[str, Any]]
unverifiedlist[dict[str, Any]]
observationslist[dict[str, Any]]
registered_stepslist[str]
deadline_watcheslist[dict[str, Any]]
alarm_stepslist[str]
destinationslist[dict[str, Any]]
rawdict[str, Any]

The response JSON exactly as the API sent it.

StepConversation

class StepConversation

One of your chats with an agent step, as Step.conversations lists them: its conversation key (what reads it, and what Step.message names), title, preview, turns, when it was last active, the model it last ran on, and whether a share link's visitor had it (shared). messages is set on one read with Step.conversation: the thread as the app's chat stores and draws it, oldest first.

Attributes
conversationstr
titlestr
previewstr
turnsint
last_activitystr | None
agent_modelstr | None
sharedbool
messageslist[dict[str, Any]] | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

StepWorkspace

class StepWorkspace

The files on one of an agent step's conversations' workspace (Step.workspace), as the app's chat shows them: files, each with a download link good for an hour; workspace, where its sandbox mounts it (None for a conversation that has none); whether it exists yet; and for whoever may change the workflow upload_url, a link that takes files into it (POST a file's bytes to it with &path=<name>).

Attributes
fileslist[WorkspaceFile]
workspacestr | None
existsbool
truncatedbool
upload_urlstr | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

BuildQuestion

class BuildQuestion

What a build waits on. Each of inputs is {id, label, type, description, options?, request_id?}: request_id is the human request that asks it, which NoClick sent the person whose build it is (sent_to) and any client answers (its page, a chat's card, their texts, POST /v1/humans/requests/{id}/answer); the build goes on once each is answered. Or answer them all at once with build.answer({id: value}), which goes on now: an input of type credential takes a connection's ref or name, one of type env its values in secret_values (both with a key acting for the whole account). answer_url is a page anyone holding it answers on.

Attributes
idstr | None
titlestr | None
inputslist[dict[str, Any]]
answer_urlstr | None
answerable_from_codebool
rawdict[str, Any]

The response JSON exactly as the API sent it.

sent_tolist[str]

SavedOutput

class SavedOutput

An output saved under a name, kept by step type: read beside every step of that type on any workflow your account opens, your account's own first (mine), then those made public or shared with it. Reading them takes what opening the workflow takes; saving, renaming and deleting take what changing it takes, and renaming or deleting one also takes being its owner or holding a share that may edit it. A key held to one of your users raises noclick.PermissionDenied.

Attributes
idstr
workflow_idstr
namestr
step_typestr
outputdict[str, Any]
visibilitystr
owner_idstr | None
minebool
created_atdatetime | None
updated_atdatetime | None
rawdict[str, Any]

The response JSON exactly as the API sent it.

listclassmethodasync

noclick.SavedOutput.list(workflow_id, step_type, *, client=None) -> list[SavedOutput]

The outputs saved for steps of step_type, read on the workflow workflow_id: your account's own first, newest first, then those made public or shared with it.

Parameters
workflow_idstrrequired
step_typestrrequired
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
list[SavedOutput]

Each saved output, whole.

Usage
for saved in noclick.SavedOutput.list(workflow_id, "automation-shopify"):
    print(saved.name)

createclassmethodasync

noclick.SavedOutput.create(
    workflow_id, *, step_type, name, output, visibility=None, client=None
) -> SavedOutput

Save an output of a step of the workflow workflow_id under a name (visibility user, the default, or public). Raises noclick.PlanRequired once the step type keeps as many as your plan allows.

Parameters
workflow_idstrrequired
step_typestrrequired
namestrrequired
outputdict[str, Any]required
visibilitystr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
SavedOutput

The saved output.

Usage
noclick.SavedOutput.create(workflow_id, step_type="automation-shopify", name="A paid order", output=out)

updateasync

saved_output.update(*, name=None, visibility=None, client=None) -> SavedOutput

Rename it, or make it public or your account's own (user) again.

Parameters
namestr | Nonedefault None
visibilitystr | Nonedefault None
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Returns
SavedOutput

It, as it stands after the change.

Usage
saved.update(visibility="public")

deleteasync

saved_output.delete(*, client=None) -> None

Delete it, with its shares.

Parameters
clientClient | None

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

(default None)
Usage
saved.delete()

HostedMcpStatus

class HostedMcpStatus

How an MCP step's hosted link stands (Step.hosted_mcp). liveness_available False means the client's side couldn't be read just now: unknown, never "no client". tools_ready is None unless asked for (tools) or when the graph wouldn't resolve.

Attributes
existsbool
activebool
liveness_availablebool
client_namestr | None
last_methodstr | None
tool_countint | None
first_tools_atfloat | None
seconds_since_seenfloat | None
tools_readyint | None
tools_samplelist[str]
rawdict[str, Any]

The response JSON exactly as the API sent it.