AutoBlocksCalm automation for everyday life

AutoBlocks and wizard

An AutoBlock is your consumer-facing automation unit (internal/system term: routine). You create AutoBlocks through a guided wizard at /routines/new, manage them on /routines, and inspect or edit individual blocks at /routines/[id].

Domain types: packages/workflow-domain/src/types.ts. Product UI: apps/product-web/src/features/routines/.


AutoBlock structure

PartPhase 1 kindsPurpose
Triggermanual, schedule, inbound_webhookWhen the AutoBlock runs
Stepsnotification, outbound_webhook, storageWhat happens each run
Rulesequals, contains, greater_thanOptional filters on step flow
Metadataname, description, enabledDashboard display and control
flowchart TB
  AB["AutoBlock"]
  T["Trigger<br/>1 per AutoBlock"]
  S1["Step 1 — notification"]
  S2["Step 2 — outbound_webhook"]
  S3["Step 3 — storage"]
  R["Rules — optional"]

  AB --> T
  AB --> S1 --> S2 --> S3
  AB --> R

Creation paths

PathEntryBest for
Template wizard/routines/new?template={slug}Fastest time to value
Blank wizard/routines/newCustom name + trigger from scratch
AI-guided/routines/new?ai=1 or AI panel in onboardingDescribe intent in plain language
From template library/templates → detail → CreateBrowse before committing

Wizard steps (typical flow)

StepWhat you doValidation
1 — NameGive your AutoBlock a clear nameRequired
2 — TriggerPick manual, schedule, or inbound webhookOne trigger only
3 — StepsAdd notification, webhook, or storage stepsAt least one step
4 — RulesOptional conditionsMust use supported operators
5 — ReviewConfirm trigger config + stepsWizard blocks invalid combos
6 — ActivateEnable or save as draftPlan limits checked on save

Mobile supports summary/card editing for straightforward changes. Desktop adds richer schedule (cron) controls.


Dashboard actions

ActionWhereAPI
List AutoBlocks/routinesGET /routines
Open detail/routines/[id]GET /routines/:id
EditDetail viewPUT or PATCH /routines/:id
Run nowDetail view (manual trigger)POST /routines/:id/execute
PauseToggle enabled offPATCH /routines/:id
Create new/routines/newPOST /routines

List UI: apps/product-web/src/features/routines/routines-list.tsx — includes New AutoBlock and New with AI links.


Enable vs draft

StateBehavior
EnabledTriggers fire (schedule ticks, webhooks accepted, manual run available)
Disabled (draft)Saved definition only; no automatic runs

Turn off an AutoBlock anytime from the detail view if you need to pause without deleting.


Plan limits on create

Creating or enabling AutoBlocks checks entitlements (packages/billing/src/plans.ts). If you exceed your plan:

HTTP statusErrorWhat to do
402entitlement_limit_exceededUpgrade on /billing or remove unused AutoBlocks

Wizard + AI interaction

sequenceDiagram
  participant You
  participant Wizard as routines/new
  participant AI as AI assist panel
  participant API as api.autoblocks.run

  You->>Wizard: Open /routines/new?ai=1
  You->>AI: Describe intent
  AI->>API: POST /tenants/:id/ai/draft
  API-->>AI: RoutineDraft
  AI-->>Wizard: Pre-filled steps
  You->>Wizard: Review + edit
  You->>API: POST /routines
  API-->>You: AutoBlock created

See AI assist for draft, refine, repair, and explain endpoints.


Example: create from template (conceptual)

Module: apps/product-web/src/lib/routine-factory.ts

After choosing Morning summary from /templates/morning-summary:

  1. Wizard pre-fills schedule trigger + notification step.
  2. You adjust schedule time and notification message.
  3. Activate — first scheduled run appears in Activity after the worker tick.

Related reading