# Templates Templates are pre-formatted notes that Templater stamps out in one step — filling the date, building the frontmatter, filing the note in the right folder, and (for some) prompting you for details. There's one template per note type. ## Installing the templates Each template has its own page with its **complete source in a copyable code block**. To install one: open its page, copy the whole block, and save it as `<Name>.md` in **your vault's** `Templates/` folder (the one you set as Templater's *Template folder location* in [[02 Installation|Installation]]). Then create notes from it via **Templater: Create new note from template**. - **Activity templates:** [[Email Template]] · [[Task Template]] · [[Call Template]] · [[Meeting Template]] · [[Class Session Template]] · [[Submission Template]] - **Dimension templates:** [[Person Template]] · [[Student Template]] · [[Project Template]] · [[Class Template]] · [[Assignment Template]] · [[Organization Template]] · [[Department Template]] - **Other:** [[Daily Note Template]] If you're not teaching, skip [[Student Template|Student]], [[Class Template|Class]], [[Assignment Template|Assignment]], [[Class Session Template|Class Session]], and [[Submission Template|Submission]]. > The two templates you'll use constantly — Email and Task — are shown in full below as well; the rest are summarized here with their distinctive parts (each links to its full-source page above). The shared query blocks they reuse are documented in [[06 Dataview Queries|Dataview Queries]]. ## How a Templater activity template works Each activity template starts with a `<%* ... %>` JavaScript block that prompts for a brief description, then moves the new note into the correct folder with a dated filename. After that comes the frontmatter and the body. For example, the **Email** template: ````md <%* const desc = await tp.system.prompt("Brief description"); if (!desc) { return; } const today = tp.date.now("YYYY-MM-DD"); await tp.file.move(`Activities/Emails/${today} Email - ${desc}`); _%> --- type: email date: <% tp.date.now("YYYY-MM-DD") %> time: "<% tp.date.now('HH:mm') %>" direction: people: projects: classes: assignments: attachments: sources: subject: source_link: --- ## Summary ## Full content / notes ## Attachments <!-- Embed saved attachments, e.g. ![[Activities/Emails/Attachments/2026/June/file.pdf]] --> ## Source <!-- Paste the Apple Mail link below as: [Open in Apple Mail](message://<message-id>) --> ## Actions ```dataviewjs const btn = dv.el("button", "+ New task from this note"); btn.addEventListener("click", async () => { window._pendingTaskSource = dv.current().file.name; const templater = app.plugins.plugins["templater-obsidian"]; if (!templater) { new Notice("Templater plugin not enabled"); return; } const taskTpl = app.vault.getAbstractFileByPath("Templates/Task.md"); if (!taskTpl) { new Notice("Templates/Task.md not found"); return; } await templater.templater.create_new_note_from_template(taskTpl, "", "", true); }); ``` ## Spawned activities ```dataview TABLE WITHOUT ID ("[[" + file.name + "]]") AS "Note", type AS "Type", date AS "Date", default(status, default(subject, default(topic, ""))) AS "Detail" FROM "Activities" WHERE contains(sources, this.file.link) SORT date DESC ``` ```` Two reusable pieces appear here and across most templates: - **The "+ New task from this note" button** (`## Actions`) — creates a Task note and pre-links it back to the current note via `sources:`. See [[06 Dataview Queries|Dataview Queries]]. - **The "Spawned activities" block** (`## Spawned activities`) — lists every activity whose `sources:` points at this note. The `attachments:` field and `## Attachments` section support the optional [[08 Mail Integration|Apple Mail integration]], which downloads attachments and embeds them automatically. You can also fill them in by hand. ## The Task template The Task template is the heart of the optional [[09 Todoist Integration|Todoist sync]]. It prompts for a description and (via a small date-picker modal) a due date, and it carries `status`, `closed`, and `todoist_id` fields. It also reads the "+ New task" button's hand-off so a task spawned from another note links back automatically. ````md <%* const desc = await tp.system.prompt("Brief description"); if (!desc) { return; } /* ... a date-picker modal sets `dueDate` ... */ const today = tp.date.now("YYYY-MM-DD"); await tp.file.move(`Activities/Tasks/${today} Task - ${desc}`); const sourceFile = (typeof window !== "undefined" && window._pendingTaskSource) ? window._pendingTaskSource : ""; if (typeof window !== "undefined") { window._pendingTaskSource = null; } const sourcesYaml = sourceFile ? `\n - "[[${sourceFile}]]"` : " "; _%> --- type: task date: <% tp.date.now("YYYY-MM-DD") %> status: open due: <% dueDate %> closed: people: projects: classes: assignments: sources:<% sourcesYaml %> todoist_id: --- ## Task ## Notes ```` The full date-picker code is on the [[Task Template]] page. Key fields: - `status: open | done` — the open/closed state, also what Todoist sync reads. - `due:` / `closed:` — ISO dates; `closed` is stamped when you tick the task done. - `todoist_id:` — written by the sync so the note and the Todoist task stay paired. Leave blank. ## The other activity templates **Call**, **Meeting**, and **Class Session** follow the same shape as Email: a description prompt, a dated move into their folder, type-specific frontmatter, content headings, and the shared Actions + Spawned-activities blocks. | Template | Distinct frontmatter | Body headings | |---|---|---| | **Call** | `time`, `duration` | Topics; Outcomes / follow-ups | | **Meeting** | `time`, `location` | Agenda; Notes; Action items | | **Class Session** | `classes`, `week`, `session_number`, `topic`, `modality` | Topics covered; Student questions; Follow-ups | | **Submission** | `score`, `max_score`, `status`, `late`; prompts for student + assignment | Summary (Total: /); Deductions; Feedback | The Submission template prompts for both a student name and an assignment, and names the file `YYYY-MM-DD Submission - <Student> - <Assignment>`. Its `score`/`max_score` feed the assignment's class-average query. ## Dimension templates Dimension notes are where the timelines appear. They share a set of Dataview blocks — fully explained in [[06 Dataview Queries|Dataview Queries]] — that change only by which link field they filter on (the `dim` variable: `people`, `projects`, `classes`, or `assignments`). | Template | `dim` | What its page shows | |---|---|---| | **Person** | `people` | Affiliations table, + New task button, Open/Closed tasks, filterable Timeline | | **Student** | `people` | Same as Person, plus a Submissions ledger | | **Class** | `classes` | Roster, Assignments, Class sessions, tasks, All-activity timeline | | **Assignment** | `assignments` | Submissions table, class-average summary, tasks, Related activity | | **Project** | `projects` | Linked People & Organizations, tasks, filterable Timeline | Person, Student, Class, and Assignment are plain templates (no prompts) — create the note, paste/rename, fill the frontmatter. **Project is interactive** (below). The complete source for each is on its own page (linked above). ## Interactive templates: Organization, Department, Project These three run a series of prompts and file the result automatically. Use **Templater: Create new note from template** and pick one: - **Organization** — asks for the org type (University / College / Company) and name; for a College, asks which University is its parent; then optional email/phone/website/address. Files the note in `Organizations/Universities`, `/Colleges`, or `/Companies` with the right name (College names get the `<University> — ` prefix automatically). - **Department** — asks you to pick a parent (any University, College, or Company that exists), then the department name and optional contact info. Files it as `<Institution> — <Department>` in `Organizations/Departments`. *Create at least one organization first*, or it will refuse. - **Project** — asks for a name and status, then runs looping pickers to link any number of People, Organizations, and Departments. Files it in `Projects/`. An Organization page automatically lists its sub-organizations, departments (transitively), affiliated people, and an activity feed drawn through those people. ## Daily Note The **Daily Note** template builds a dated note under `Daily Notes/<Year>/<Month>/` (creating those folders as needed) and renders a task dashboard — Overdue, Due today, Due this week, Future, and Recently closed — with one-click checkboxes. See [[07 Daily Notes and Dashboard|Daily Notes & Dashboard]]. Next: [[06 Dataview Queries|Dataview Queries & Timelines]] — how the magic actually works.