Skip to content
Changelog

Report a bug

Create and Manage Automations

Choose Create → Automation, then choose a Space. The automation opens as an artifact, next to documents and apps. You can also make one from the artifact panel of a conversation. New automations that you make this way start paused.

Open Automations in the sidebar to find and open automations again. The editor has the instructions, schedule, model settings, connections, destination channel, and run history. You can work with Type in the conversation of the artifact.

  • Save keeps the current enabled or paused state.
  • Enable and Pause are separate actions.
  • Save your changes before you use Test. Test starts a private test conversation. See Test Automations.
  • If someone else changes the automation while you edit it, reload before you save. Your draft stays visible until you discard it.

Existing scheduled automations become artifacts the first time that you open them. Their schedule, enabled state, instructions, and run history do not change. Automations that you have not opened continue to run as before.

To create, edit, restore, enable, pause, rename, or archive an automation, you need authoring access in the workspace and access to every destination Space. Private Spaces require membership; Sidekick is limited to its owner. Workspace admins do not automatically gain access to private Spaces. Changing destinations requires access to both the current and new Spaces. These checks also apply to Type AI and the CLI.

An authorized edit keeps the automation’s saved execution identity and connected accounts. Archiving stops future scheduled runs. Opening an older automation as an artifact does not change the credentials that the scheduler uses.

Automations do not support public publishing, document suggestions, or restoring document versions. Event-triggered automations keep their existing editors.

Open an automation, then select Version history in its header or menu. Select a version to review who saved it, when it was saved, and what changed. Expand the details to inspect its steps and code changes.

To return to an earlier implementation, select Restore this version, review the comparison with the current version, then select Restore. Save or discard unsaved edits first. You need permission to edit the automation, and archived automations cannot be restored.

Restoring saves a new version; it preserves the versions already in history. It restores the saved name, description, instructions, schedule, run settings, and code. The automation keeps its current enabled or paused state, connected accounts, destinations, and run history. Event checkpoints and processed events also remain unchanged, so restoration does not replay earlier events. Referenced skills and agent defaults remain live.

The restored implementation must pass current validation and access checks. If someone changes the automation before restoration finishes, refresh the history and review the comparison again. For automations created before version history was introduced, the first recorded edit retains the previous implementation as a baseline; older changes are not recoverable.

Describe the job in a thread. Type can propose the automation first, with its trigger, schedule, destination, and connections. Tell Type whether the new automation should start enabled or paused.

  • type-cli scheduled-actions list --space <space> lists scheduled automations. The list includes older automations that are not artifacts yet.
  • get <task-id> returns the definition, the artifact link when there is one, and an editVersion for later edits. Listing and reading do not convert an automation.
  • type-cli scheduled-actions open <task-id> --space <space> opens the artifact in your browser. It converts an older automation when necessary and keeps its task ID. Add --no-open --json to get the link without a browser.
  • Update, enable, and disable check the version that you read before the change. Pass --expected-version <editVersion> to reject a change if another person or agent edited the automation after your read. On a conflict, read the latest definition and review the changes before you try again.
  • delete <task-id> archives and disables the automation. It keeps the run history.

The CLI follows the existing automation permissions.

There are two ways to make a code automation:

MethodBest for
Type CLICode in a folder on your computer, version control, and fixtures.
Type AI in a SpaceShort automations. Describe what you want, and Type writes and deploys the code.

Both methods use the same deploy service and the same checks, and both make the same kind of automation. The source exports one automation({ deployment, output, stages }) definition. Class-based source is rejected.

Terminal window
type-cli automations deploy ./my-automation --space engineering

The CLI prints the deployment ID, then each deploy checkpoint as stage [key]: status:

Deployment 3f6c2a4e-8b1d-4c2a-9f0e-1a2b3c4d5e6f
deployment: started
validation: started
validation: succeeded
fixtures [records the scheduled time]: started
fixtures [records the scheduled time]: succeeded
subscription [hourly]: started
subscription [hourly]: succeeded
activation: started
activation: succeeded
deployment: succeeded
Deployment 3f6c2a4e-8b1d-4c2a-9f0e-1a2b3c4d5e6f: active
Automation: atask_01k...
CheckpointWhat Type does
validationTypechecks the source and reads the graph, the subscriptions, and the schemas.
fixtures [key]Tests each webhook adapter, then runs each fixture in fixtures.json. The key is the adapter key or the fixture name.
subscription [key]Prepares each subscription: its schedule, its event source, or its integration connection and webhook.
activationSaves the new revision and turns on its subscriptions in one step.
deploymentThe whole deploy. A failure between two checkpoints is reported here.

A failed checkpoint shows its message after a dash, and the command exits with an error. With --json, the command prints one JSON object on each line. See CLI Reference.

The final status is active or paused:

  • The first deploy of a folder enables the automation. The status is active.
  • A later deploy keeps the current enabled or paused state. If the automation is paused, the status is paused and the activation checkpoint says “Saved paused. Enable the automation explicitly when ready.”

To update the code, change the files and run the same command again. Type updates the same automation, because .type/project.json has the same project ID. The automation ID comes from the project ID and the Space, so a deploy of the same folder to another Space makes a separate automation. .type/deployment.json records the last deployment ID, the automation ID, the server, and the Space.

In a Space, describe the automation. For example:

When someone posts “deploy failed” in #ops, reply in the thread with the runbook link.

Type writes the code and deploys it with the create_task tool. The result has a projectId.

Differences from the CLI:

  • The AI deploy has no fixtures. The first real event is the first test.
  • A new automation is enabled when the deploy succeeds, unless you ask Type to keep it paused.
  • The automation runs with its own saved identity and the connections of its Space. These can be narrower than the access that Type has in the thread. The deploy checks the access that the code needs.
  • With the CLI: change the folder and deploy again. Run the fixtures for the changed paths.
  • With Type AI: ask Type to change the automation. Type reads it with get_task, tests the new code’s entry stage with test_automation_code before saving it, then saves it with update_task. You don’t need to pause the automation to change or test it: saving keeps it on or paused as it was.

Rules for a new revision:

  • A successful deploy replaces the active revision.
  • A failed deploy keeps the active revision.
  • Only the person who created the automation can deploy to it.
  • A folder can have only one deploy in progress. Two automations in the same Space cannot have the same name.
  • If the automation was paused after a failure, a deploy is rejected until a member enables it. See Fix a failed code automation run.
  • Unchanged source reuses its earlier validation result. Fixtures run on every deploy.
  • Checkpoints stay if the subscription keys stay the same.
  • A run that started before the deploy finishes with the code and contracts that it started with, also through agent stages and retries.
  • Saving a new version of an automation that is on doesn’t pause it. New events run the new version. Events that were queued but hadn’t started run on the new version if it still subscribes to them; otherwise they’re dropped.
Terminal window
type-cli scheduled-actions disable <automation-id> --space <space> # pause; runs in progress stop at their next stage
type-cli scheduled-actions disable <automation-id> --space <space> --finish-runs # pause, let runs in progress finish
type-cli scheduled-actions enable <automation-id> --space <space> # resume
type-cli scheduled-actions archive <automation-id> --yes # archive
type-cli scheduled-actions delete <automation-id> --permanent --yes # delete permanently
  • Pausing stops new runs. By default, each run in progress stops at its next stage: an agent stage that is already running finishes its turn, the stage after it doesn’t start, and a running code stage’s result isn’t saved. Writes that a running stage already made can’t be undone.
  • To let runs in progress finish instead, choose Pause, let N runs finish in Type (when runs are in progress, Pause asks: Pause, let N runs finish or Pause and stop N runs), pass --finish-runs to the CLI, or pass stopRunningRuns: false to update_task and the API. They complete on their version, through their later stages and agent stages. --stop-runs and stopRunningRuns: true ask for the default explicitly.
  • Enabling does not require a test. But if a fixture tested a subscription and the tool or integration contracts that it used changed since, enabling fails with “Tool contracts changed for …; test this revision again before enabling”. Run type-cli automations test-code on the paused automation, then enable it.
  • Archiving disables the automation, stops its runs in progress, and keeps its configuration and run history. Permanent deletion removes the definition and keeps run records and delivered output. A code stage that is already running can still make writes.
  • Deleting an automation does not delete a shared webhook registration. Other automations can still use it.

To see what an automation did, read its runs:

Terminal window
type-cli automations history --space <space> --automation <automation-id>
type-cli automations history --space <space> --run <run-id> --include-activity

Type records the automation API version that the code was written for. Type sets it when code is saved: new code gets the current version. Settings edits keep the recorded version. A run keeps the source and contracts that it started with through agent stages and recovery, even if you deploy newer source while it waits. When the API changes, get_task and list_tasks mark older automations with automationUpgrade:

StatusMeaning
upgrade_availableThe automation still runs. Upgrade it when you next change the code.
unsupportedType no longer runs it. Its next run fails, and you cannot enable it until you upgrade the source.

Version 7 adds terminal agent stages and Slack agent entries. Staged source saved at versions 4 through 6 continues to run. To make an agent the final stage, omit onResult and save the updated source. In Slack-triggered automations with a fully accessible Slack connection, the last agent stage’s final response is posted once in the triggering thread. This applies to source saved at any supported version.

Class-based source does not run at any recorded version. Rewrite it as automation({ deployment, output, stages }), keep its trigger and checkpoint behavior, and test it before you enable it.

To upgrade, change the code for the current API, then deploy, or save the new code paused with update_task. Saving new code records the current version. You cannot set the version yourself.

If the CLI loses its connection, the deploy can still finish. Do not deploy again at once. Read the result:

Terminal window
type-cli automations deployment <deployment-id> --space <space> --follow

The deployment ID is in .type/deployment.json. Without --follow, the command reads the status one time. A deploy that does not activate in 10 minutes stops. The CLI waits 600 seconds by default; change this with --timeout. If the CLI stops waiting first, it prints the automations deployment command to follow the deploy.

Type can save a chart, a table, or a summary with an automation. Ask for a report when it helps you understand the results. An automation that does not need a report shows its activity, with no empty report.

  • Explore a report to filter, sort, or expand its data.
  • To change a report, select a part of it and describe the change in the chat next to it. A change to the presentation does not run the automation.
  • To hide a report at once, ask Type to remove it.
  • Type sends a report to another place only when you ask. Slack gets a version made for Slack messages, with images when necessary. Email gets a static report. You can explore a report only in Type.

In a code automation, a code stage saves a report with ctx.setVisualization(), and a one-sentence result with ctx.setSummary().