---
type: guide
bg-color: cyan-50
bg-pattern: dotted
icon: clipboard
icon-color: cyan-500
bg-color-dark: cyan-950
---
# Templating
[Templates](https://help.noteplan.co/article/136-templates) in NotePlan help you start any note with a ready-made structure. Whether it’s your daily plan, a project brief, or a meeting recap.
Use them as a reusable skeleton or a full-fledged setup that drops in time-blocked schedules, chores, weather, journaling prompts, agendas, and more.

~**Getting Started:**~
- Generate sample templates: right-click (or long-press on iOS) the Templates folder under Smart Folders → Create sample templates, or click [here](noteplan://x-callback-url/createTemplates).
- Open a template to customize it; we recommend starting with a Daily Note template.
- Use a template in any of these ways:
	- Open a new note (daily or regular) and click `Insert Template` in the empty note.
	- Press `CMD+J` to open the command bar, then type "insert template".
		- This also works in existing notes; the template is inserted at the cursor.
		- Or type `/insert template` to insert at the cursor.
	- To auto-insert into daily notes, open the template and click the calendar + clock icon (top right) to schedule it.

~**Meeting Notes:**~
- Create meeting note sample templates by clicking [here](noteplan://x-callback-url/createTemplates?type=meeting).
- Pick an event in your timeline (right side on Mac/iPad; bottom on iPhone via the calendar + time button) or create a test event.
- Open the event, choose "Create New Note," then select a meeting template (e.g., "Monthly Folder").
- Done. Your note is created, auto-filed, and linked to the event for easy access. You can now access the meeting note through the event (click on it).

## Automation in Templates
NotePlan templates support dynamic placeholders, JavaScript automation, and plugin commands to generate content at creation or on demand. You'll see some of it in the sample templates.
You can use Template Helper functions, and custom JS scripts to pull data, format text, and insert tasks automatically.
Use special tags inside a template to write code in between: `<%-` is the starting tag and `%>` the closing tag to output something.

**Example:**
```f
￼---
title: Copy Tasks from Project Folder
type: empty-note
￼---
<%
// Get all project notes from a specific folder
const folderPath = "10 - Projects" // Change this to your folder path
const allNotes = DataStore.projectNotes
const notesInFolder = allNotes.filter(note => note.filename.startsWith(folderPath))

// Collect all open tasks from those notes
const tasks = []
for (const note of notesInFolder) {
  const openTasks = note.paragraphs.filter(p => p.type === "open")
  tasks.push(...openTasks)
}
-%>
<%- tasks.map(t => t.rawContent).join("\n") %>
```

**Full docs:**
- [Running Javascript in Templates](https://help.noteplan.co/article/148-run-javascript-code-in-your-templates)
- [AI Prompts in Templates](https://help.noteplan.co/article/233-ai-prompts-in-templates)
- [Dates in Templates](https://help.noteplan.co/article/150-dates-in-templates)
- [Prompts in Templates](https://help.noteplan.co/article/261-template-prompts-dialogs#working-frontmatter)
- [Full NotePlan JavaScript API](https://help.noteplan.co/article/70-javascript-plugin-api)
- [Templating Documentation](https://noteplan.co/templates/docs)


### AI Prompts
You can use also AI prompts (often much easier than using the API) let AI access specific notes and process the content to be inserted.
It can pick a random goal from your annual note, summarize yesterday's day or last week, or even access a whole folder to find specific information.

**Example:**
```
---
title: Simple AI Example
type: empty-note
---
**Daily Inspiration:**
<%- await NotePlan.ai("Give me one short motivational quote for the day") %>

**Summary of Today's Tasks:**
<%- await NotePlan.ai("List all my open tasks in a brief summary", ["yesterday"]) %>

**Random Goal from This Year:**
<%- await NotePlan.ai("Return one random bullet from my annual goals", ["this year"]) %>
```

## Note Properties in Templates
Templates can pre-fill note properties. This is especially helpful for project notes or collections like book notes, so they all start with the same properties.
The sample template [[Project Template]] shows how to do this.

~**Getting Started:**~
- Your templates already include note properties at the top that define the template’s title and type. These are for the template only and won’t be added to your notes.
- To add properties to notes created from a template, place them at the top of the template body, between a starting `--` and a closing `--` (double hyphens). Use one key: value pair per line.

**Example:**
```
--
status: backlog
type: project
--
## Project Note

... rest of the template
```

This can be your entire template. The properties between the double hyphens will be added to the note as regular note properties.
