Habits · 02: Workflow Templates
Skills (chapter 01) run when you call them. Workflows run when a clock or an event calls them, with no one in the loop. Most are deterministic automations with an LLM doing judgment inside specific steps; a few are full agents with a goal and real autonomy. This is where the Cortex starts doing work while you sleep, which is exactly why guardrails matter more here than anywhere else.
Why workflows are different from skills
A skill is a sharp tool you pick up. A workflow is a machine you switch on and walk away from.
When you call /cold-email, you’re right there to read
the output before it goes anywhere. When a workflow fires at 6am on a
cron (a scheduled clock that runs at a set time), nobody is watching. So
it has to handle the unhappy path itself: the empty result, the timeout,
the bad input, the branch that didn’t run. The biggest mistake here is a
workflow that works on the demo input and breaks silently on the third
real one. The templates below survived real, messy data.
Deterministic or agent. Pick the least autonomy that works:
- Deterministic flow (the default). Fixed steps, an LLM used inside specific steps for judgment: classify this, draft that, pull out these. Predictable, debuggable, safe. Ninety percent of what you install.
- Full agent (rare). A goal plus the freedom to choose its own steps. Powerful, but harder to bound and to trust. Save it for open-ended tasks where you can’t list the steps in advance.
The rule: use the least autonomy that solves the problem. A deterministic flow with an LLM in three steps beats an agent for almost everything, because you can reason about exactly what it will do.
The template library (patterns, not products)
Grouped by the part of the business each serves. You install the shape and wire it to your own tools.
| Area | Template | Shape |
|---|---|---|
| Store | Low-stock restock | Check stock on a schedule, draft a reorder in your voice, guard the empty case, human approves the send |
| Content | Post or video draft | Draft from Memory (decisions, wiki) on a schedule, you approve before it publishes |
| Operations | Meeting to filed notes | Recording, classify, route into your files (chapter 03) |
| Inbox triage | Categorize, summarize, draft a reply, you send | |
| Weekly briefing | Pull the numbers, one owner summary every Monday |
The list is short on purpose: a pattern earns its place in production, not by looking clever.
The anatomy of a shipped workflow
Every durable workflow has the same skeleton; the durability lives in the parts people skip. Each box is a node (a single step in the flow):
TRIGGER a cron (a scheduled clock) or a webhook (a trigger that fires
│ the moment something happens, like a new order)
│
FETCH pull the inputs, and GUARD the empty case on purpose
│
LLM STEP(S) classify / pull out / draft, reading Memory so the output is yours
│ (same input gives the same shape of output)
│
BRANCH normal path vs. the odd cases; hand the uncertain ones to a human
│
ACT write the row, send the (gated) email, file the note
│
NOTIFY on success, log it; on failure, ALERT a human. Never fail silently.
The five guardrails that separate a demo from production, kept as standing rules:
- Guard the empty result. When the fetch returns zero items, the workflow does nothing gracefully. It doesn’t crash, it doesn’t send a blank email. Most silent failures start here.
- Name the exact node you pull from. When a step can get data from more than one branch, never trust the ambient “current item.” Name the upstream node. Fuzzy references are the top source of intermittent, impossible-to-reproduce bugs.
- Merge before any single step that several branches feed. A step fed by three branches runs three times unless you merge first. That’s how you get duplicate emails and tripled counts.
- No vendor branding in anything a customer sees. Strip the “sent with [tool]” footers. The output is yours, not the tool’s.
- Spell out the time zone. “Today” is a time zone, not a fact. Set the date in the right zone rather than trusting a default to be local.
These aren’t trivia. They’re the difference between a workflow you trust at 6am and one you’re debugging at 6pm.
Pitfalls (the “if X, then Y” guide)
| Situation | What to do |
|---|---|
| You’re reaching for a full agent | Ask if a deterministic flow with LLM steps would do. It almost always would, and you’ll be able to debug it. Save agents for open-ended tasks. |
| It works on your test input | That proves nothing. Run it on the ten messiest real inputs you can find: empty results, weird characters, missing fields. Production is the third real input, not the first. |
| It failed and you heard it from a customer | Add the NOTIFY step before anything else. A workflow that can fail silently will, and you’ll learn about it the worst way. |
| An LLM step gives a different answer each run | Tighten the prompt and the output shape until it’s predictable. The whole point is that you’re not watching. |
| You want it to send emails on its own | Gate it. Draft on its own, send on your tick, at least until it’s earned trust over weeks. |
| The workflow does too much | Split it. One workflow, one job. A flow that does three things is three flows that fail together. |
| You’re not sure it’s safe to automate yet | Run it shadowed: it does the work, you check the output, for two weeks, before you let it act for real. |
Maya’s version: the restock helper
Maya runs an online store, a small service business, and a content channel, and she doesn’t code. Her most trusted workflow watches the store’s stock.
| Step | How it works |
|---|---|
| Trigger | A cron runs each morning. (A webhook could fire it the moment a sale drops an item below its line instead.) |
| Fetch, guarded | It reads current stock levels. If nothing is low, it stops. No email, no noise. |
| LLM draft | For the items that are genuinely low, Claude drafts a reorder note to the supplier in Maya’s voice, with quantities. |
| Branch | A normal restock goes to draft. Anything odd, a sudden spike or a line she’s discontinuing, gets handed to Maya. |
| Gated send | Nothing orders on its own. Maya reads the draft, ticks approve, and only then does it send. |
Two things worth copying. First, the value is in the guardrail, not the draft: any tool can write a supplier email, but what makes this safe is that it reads real stock numbers, acts only on genuinely low items, and does nothing when nothing is low. Second, it drafts on its own but never orders on its own: the one step that costs money stays behind Maya’s tick. Maximum automation on the reversible parts, a human gate on the one that isn’t.
You’ve got it when
The first five mean you’ve shipped a workflow. The last two are why you can sleep while it runs.
The skills that build and check workflows
These build and check your automations in n8n (a tool that wires
steps into a flow). They ship in the starter kit;
install notes are in 01-skills-and-commands.md.
| Skill / Command | What it does | When you’d run it |
|---|---|---|
/n8n-build |
Builds and ships an automation from a spec | When standing up a new one |
/n8n-fix |
Changes one you already run, then verifies it | When it needs a tweak |
/n8n-evaluate, /n8n-qa |
Audit a workflow for broken references, missing logins, edge cases | Before trusting it unattended |
/n8n-test |
Reads recent runs for silent failures | Weekly |
Next chapter
→ 03-the-meeting-cortex.md.
The single highest-leverage workflow: every meeting becomes routed,
filed Memory automatically, so your knowledge base grows without anyone
typing notes.