⭐️ Building workflows

If you've ever wanted your Moment document to refresh itself every weekday morning, open a PR when a metric drifts, or have Claude reconcile last night's build logs before you sit down with coffee, that's a Workflow.

Moment documents already blend prose, live queries, and code. Workflows add the missing fourth dimension — time. A document is no longer just what you wrote; it's what the document itself has been doing on its own schedule. Combine Workflows with request pages and JavaScript code cells, and a Moment document becomes a living, self-updating artifact rather than a static snapshot.

Workflows let you put a Moment document on a schedule. Pick a cron, point it at an agent, and Moment will open the document and run the agent against it on the cadence you choose — every minute, every hour, weekdays at 9am, or whatever a cron expression can describe.

How it works

Click Workflows in the home-screen sidebar to open the workflows page.

From there, click New Workflow to create one. Each workflow is essentially a cron job — it fires at the time(s) the cron expression describes, runs the agent you've chosen against the document you've attached it to, and records the result.

The workflows screen

The home-screen workflows view is built around an Activity Timeline and an Upcoming Runs list:

Each row of the timeline is a document. Past runs show as red (failed), green (passing), or gray (future) dots; the current time is marked with a vertical line.

Zoom controls (2h, 4h, 12h, 1d, 2d) change how much history the timeline displays at once.

Filters (All, Failing, Passing, Running) narrow the timeline to runs in a particular state.

Click a document row to expand it and see the individual workflows attached to that document, each with its own run history.

Click the small play triangle next to a workflow to fire it manually, outside its schedule.

The Upcoming Runs panel below the timeline lists the next scheduled runs across every workflow, with a link back to the document each one will run against.

Editing a workflow

Click any workflow's name to open its edit dialog.


The dialog has:

Workflow title — a human-readable name for the workflow (e.g. "You are this document").

Prompt — the body of the dialog. This is the text the agent receives each time the workflow fires (e.g. "You are this document. Decide what to do next. Then do it.").

Document selector — the document the workflow is attached to. Every workflow belongs to exactly one document, and shows up in the Workspace accordion of that document's sidebar. Use this dropdown to reassign a workflow to a different document.

Cron selector — described below.

Agent selector — Claude, Amp, and Codex are supported today; Copilot is shown as (not installed) until you install the Copilot CLI locally.

Status indicator — at the top right (e.g. Running, Passing, Failing), reflecting the most recent run's outcome.

Play triangle — fires the workflow manually, just like the one on the workflows screen.

Trash icon — deletes the workflow.

Save — persists your changes.

The cron selector

The cron selector exposes a small set of preset frequencies plus a free-form Custom mode:

Every hour

Daily

Weekdays

Weekly

Custom — type a raw cron expression in the Cron expression box (e.g. */1 * * * *). The selector shows a plain-English description of the expression, a clear link to reset it, and an inline Upcoming runs list with the next few fire times so you can sanity-check the schedule before saving. See A quick primer on cron expressions below.

What Workflows are good for

Scheduled refreshes. Keep dashboards, digests, and status pages up to date without anyone opening the document.

Autonomous authoring. Have an agent write or revise pages on a schedule — release notes, weekly retros, overnight triage summaries.

Maintenance jobs. Rotate stale drafts to archive, run link checkers, rebuild indexes, or validate moment.yml on a cadence.

Alerts with context. Have an agent check a metric and, if it crosses a threshold, draft an issue or open a post-mortem page.

Things to know

Workflows run on your local machine. They are not a cloud cron service. The agent runs in your environment, with your credentials, against your local document.

Missed runs are caught up once. If your machine is offline or Moment isn't running when a workflow was due to fire, Moment will run it a single time on next launch and then resume the normal cadence — no backfill of every missed tick.

Manual runs are always available. The play triangle is the fastest way to test a new workflow without waiting for the next scheduled tick.

Alpha. Workflows is labeled Alpha while we shake out the agent integrations and scheduling edge cases. Expect rough edges, and let us know what you hit.

A quick primer on cron expressions

Workflows put a Moment document on a schedule, and that schedule is a cron expression. The cron selector in the workflow editor gives you a few presets — Every hour, Daily, Weekdays, Weekly — but the moment you need anything more specific (every 10 minutes, the 1st of the month, weekdays at 9am Eastern), you'll reach for Custom and write the expression yourself. This page is a quick refresher on the syntax.

If you choose Custom in the cron selector, you'll be writing a standard 5-field cron expression: minute hour day-of-month month day-of-week.



Each field accepts:

A specific number9 means "at hour 9" or "on the 9th".

A wildcard * — "every value in this field".

A list1,15,30 means "on the 1st, 15th, and 30th".

A range1-5 in the day-of-week field means "Monday through Friday".

A step*/15 in the minute field means "every 15 minutes".

Some common patterns:

0 9 * * 1-59:00 AM on weekdays

*/10 * * * *every 10 minutes, forever

0 */2 * * *on the hour, every 2 hours

15 14 1 * *2:15 PM on the 1st of every month

0 22 * * 510:00 PM every Friday

A few rules of thumb:

Times are evaluated in the host's local timezone.

If both day of month and day of week are specified (neither is *), the job fires on either match — not both.

For complex expressions, crontab.guru is an excellent sanity-check tool that translates expressions into plain English