Quickstart
This quickstart has two parts. In part 1, you make an instruction automation without code. In part 2, you make a code automation with Type CLI.
Part 1: an instruction automation
Section titled “Part 1: an instruction automation”You need a Space with the connections that the job uses.
-
Open the Space and ask Type to make the automation. For example:
Every weekday at 9:00, read the issues that were opened in Linear yesterday and post a short summary in this Space.
-
Read the proposal. Check the schedule, the time zone, the destination, and the connections.
-
Open the automation from Automations in the sidebar. Select Test to run it one time in a private thread.
-
Read the test thread. Change the instructions if the result is not correct, then select Save and Test again.
-
Select Enable.
You can also select Create → Automation, then choose a Space. New automations that you make this way start paused.
Part 2: a code automation
Section titled “Part 2: a code automation”In this part, you make an automation that runs every hour and records the time in run history. Then you add a test and deploy it.
Before you start
Section titled “Before you start”- Code automations must be on for your workspace. They are in early access.
- You need a Space. You deploy the automation to it.
- Install Type CLI and log in:
curl -fsSL https://type.com/install.sh | shtype-cli auth login- Optional: install Bun to get types in your editor.
Make the automation
Section titled “Make the automation”-
Make a folder and the project file.
Terminal window mkdir hourly-check && cd hourly-checktype.json {"name": "Hourly check","entrypoint": "src/main.ts"} -
Write the code.
src/main.ts import type {AutomationContext,AutomationDeployment,RecurringEvent,} from "@type-dot-com/sdk/automations";export const deployment = {subscriptions: {hourly: {title: "Hourly check",description: "Record the scheduled time in run history",source: {kind: "recurring",schedule: { kind: "interval", everySeconds: 3600 },},},},} satisfies AutomationDeployment;export default class HourlyCheck {hourly(ctx: AutomationContext, event: RecurringEvent) {return ctx.setOutput({ checkedAt: event.scheduledAt });}}deployment.subscriptions.hourlyruns every 3,600 seconds.- The method
hourlyhas the same name as the subscription key. Type calls it on each run. ctx.setOutputshows a result in run history.
-
Add a test.
fixtures.json [{"name": "records the scheduled time","subscriptionId": "hourly","payload": { "scheduledAt": "2026-10-07T12:00:00.000Z" },"toolResponses": [],"expectedOutput": { "checkedAt": "2026-10-07T12:00:00.000Z" }}]Type runs this fixture at each deploy. If the output is different, the deploy fails.
-
Optional: add types for your editor.
Terminal window bun add @type-dot-com/sdk zod@4 neverthrow@8The CLI does not upload
package.jsonornode_modules. Type runs your code with its own SDK.
Deploy
Section titled “Deploy”type-cli automations deploy . --space <your-space>The CLI prints each stage:
validation: succeededfixtures [records the scheduled time]: succeededsubscription [hourly]: succeededactivation: succeededdeployment: succeededDeployment 3f6c2a4e-...: activeAutomation: atask_01k...The automation is now on. The first run starts within about a minute.
See the runs
Section titled “See the runs”type-cli automations history --space <your-space> --automation <automation-id>Each run shows its status and the output { "checkedAt": "..." }.
Change it
Section titled “Change it”Change everySeconds to 900 (every 15 minutes) and deploy again:
type-cli automations deploy . --space <your-space>Type updates the same automation. If a check fails, the old code keeps running.
Pause it
Section titled “Pause it”type-cli scheduled-actions disable <automation-id> --space <your-space>Next steps
Section titled “Next steps”- Respond to Slack Events: reply in a thread when a message matches.
- GitHub: act on pull requests and CI.
- Call Connected Apps and APIs: read and write data.
- How Code Automations Work: the run model, access, and guarantees.