Custom Routines – Town Docs
Custom Routines
Stock routines cover common patterns. Create your own to unlock what’s possible — complex tasks done in minutes, or turned into routines that run automatically.
Two ways to create
Ask your assistant
The easiest way to create a routine is to email your assistant.
“Create a routine that labels emails from my team and keeps them in inbox”
“I want a weekly summary of all newsletters I received”
“Make a routine that alerts me when I get emails with ‘urgent’ in the subject”
Your assistant understands what you want, generates the routine, tests it, and enables it for you.
Start by asking your assistant, then refine it together until it works exactly the way you want.
Build it in the web app
You can also build routines in the web app by chatting with your assistant there. Describe what you want, iterate together until it looks right, test it, and set it live.
What you can automate
Routines have access to all the tools your assistant can use:
| Category | What you can do |
|---|---|
| Read, search, label, archive, send, create drafts | |
| Calendar | View events, create meetings, check availability |
| Research | Search the web, analyze results, run calculations |
| Documents | Create, edit, and organize documents and content |
| Integrations | Work with connected apps from the integration directory, including Google Workspace, Slack, GitHub, Linear, CRM, project management, finance, meeting, and data tools |
| Other routines | Query what other routines have done, or trigger them |
Building blocks
Every routine is assembled from the same pieces. These references cover each one in depth:
Triggers Tools Writing Instructions
Routine types
Instruction-based routines
The default type. You describe what you want in plain language, and your assistant follows your instructions at runtime.
Example: “When I receive a newsletter, archive it and add the ‘newsletters’ label”
Best for flexible reasoning, open-ended tasks, and quick iteration.
Code routines
For routines that need to follow exact steps every time. Your assistant can generate these for you from a plain language description — you don’t need to write any code yourself.
Example: “Every morning at 8 AM, gather all unread emails, group them by sender, and send me a summary with counts per sender”
Best for complex multi-step processes, precise formatting, and aggregating data from multiple sources.
Learn more in Advanced Topics.
Safety controls
Custom routines follow the same safety rules as stock routines:
- Modes — Autonomous, approval-required, or read-only
- Per-tool controls — Different approval levels for different actions
- Built-in protections — Certain risky combinations are blocked automatically
Learn more in Safety.
Getting started
- Try asking your assistant — Email yourname@town.com with what you want
- Build it in the web app — For more control, chat with your assistant in the routine builder