Skip to content
Changelog

Report a bug

Quickstart

This quickstart has two parts. In part 1, you make an instruction automation without code. In part 2, you deploy a code automation with Type CLI.

You need a Space with the connections that the job uses.

  1. Open the Space and ask Type to make the automation:

    Every weekday at 9:00, read the issues that were opened in Linear yesterday and post a short summary in this Space. Keep it paused until I test it.

  2. Check what Type made: the schedule, the time zone, the destination, and the connections.

  3. Open the automation from Automations in the sidebar, and select Test. The test runs once in a private thread.

  4. Read the test thread. If the result is wrong, change the instructions, select Save, and test again.

  5. Select Enable.

You can also select Create → Automation and choose a Space. Automations that you make this way start paused.

You make an automation that runs every hour and records the scheduled time. Then you test it and deploy it.

Install Type CLI and log in:

Terminal window
curl -fsSL https://type.com/install.sh | sh
type-cli auth login

You also need a Space to deploy to. To get types in your editor, install Bun.

  1. Make the project.

    Terminal window
    mkdir hourly-check && cd hourly-check
    type.json
    {
    "name": "Hourly check",
    "entrypoint": "src/main.ts"
    }
  2. Write the automation in src/main.ts:

    src/main.ts
    import {
    automation,
    code,
    complete,
    recurringEventSchema,
    } from "@type-dot-com/sdk/automations";
    import { z } from "zod";
    export default automation({
    // Each finished run records the time that it was planned for.
    output: z.object({ checkedAt: z.string() }),
    deployment: {
    subscriptions: {
    hourly: {
    title: "Hourly check",
    description: "Record a scheduled checkpoint in run history",
    source: {
    kind: "recurring",
    schedule: { kind: "interval", everySeconds: 3600 },
    },
    entry: "record",
    },
    },
    },
    stages: {
    // Complete the run with the scheduled time.
    record: code({
    input: recurringEventSchema,
    transitions: [],
    run({ input }) {
    return complete({ checkedAt: input.scheduledAt });
    },
    }),
    },
    });

    The subscription hourly starts a run every hour at the record stage. The stage gets { scheduledAt } and returns complete(), which ends the run with a value that matches output.

  3. Add a test in fixtures.json:

    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 each fixture when you deploy. If the output is different, the deploy fails and nothing changes.

  4. Optional: add types for your editor:

    Terminal window
    bun add @type-dot-com/sdk zod@4 neverthrow@8

    The CLI does not upload package.json or node_modules. Type runs your code with its own SDK.

  5. Deploy.

    Terminal window
    type-cli automations deploy . --space <your-space>

    The CLI prints each step:

    validation: succeeded
    fixtures [records the scheduled time]: succeeded
    subscription [hourly]: succeeded
    activation: succeeded
    Deployment 3f6c2a4e-...: active
    Automation: atask_01k...

    The automation is on. The first run starts within about a minute.

  6. See the runs.

    Terminal window
    type-cli automations history --space <your-space> --automation <automation-id>
  • Change it: set everySeconds to 900 (every 15 minutes) and deploy again. Type updates the same automation. If a check fails, the old version keeps running.
  • Pause it: type-cli scheduled-actions disable <automation-id> --space <your-space>. To turn it on again, select Enable in Type.

You can also ask Type in a Space to write and deploy a code automation for you.