obsidian templater scripts for meetings

Automate Your Meeting Notes: Best Obsidian Templater Scripts Copy-Paste

You are drowning. It’s Tuesday afternoon—statistically the busiest meeting day of the week—and your calendar is a solid block of color. You open Obsidian to take notes, but instead of writing, you’re clicking. Creating a file. Typing the date. Manually typing “Strategy Sync” because you forgot to copy it from Outlook. dragging the file into the right folder.

⚠️ CRITICAL SYSTEM DISCLAIMER

THE SCRIPTS PROVIDED BELOW PERFORM ADVANCED FILE SYSTEM OPERATIONS (RENAMING, MOVING, AND MODIFYING FILES).

  • Destructive Actions: The “Auto-Rename” and “Smart Filer” scripts modify file paths permanently. Incorrect configuration may result in misplaced files or data overwrites.
  • Code Fragility: The “Calendar Hijacker” script accesses internal data structures of the Obsidian ICS plugin. This is not a public API; future plugin updates will break this script.
  • Mandatory Sandbox: You MUST test these scripts in a separate “Test Vault” before deploying to your main workflow.

THE AUTHOR ASSUMES NO LIABILITY FOR DATA LOSS, CORRUPTION, OR SYSTEM ERRORS. USE ENTIRELY AT YOUR OWN RISK.

It feels like productive work. It isn’t. It’s what I call “Admin Theater.”

Most Obsidian guides teach you how to be a “gardener”—pruning links and manually tagging people. But when you are back-to-back in Zoom calls, you don’t have time to garden. You need a factory line.

We are going to fix that today. We are pivoting from static Templates (markdown skeletons) to executable Scripts (JavaScript automation). By the end of this, you’ll have a system that names your files, pulls your agenda from your calendar, and files your notes automatically. No manual entry required.

The “Digital Debt” Reality: Why Static Templates Fail

Answer Target: Static templates fail because they rely on manual data entry during high-stress moments. Automation scripts remove this friction by executing logic (renaming, fetching, moving) the instant a note is created.

Here is the hard truth: the way most people use Obsidian is mathematically impossible to sustain in a senior role. According to the Fellow.ai State of Meetings 2024 report, meeting time has tripled since 2020. If you are a senior leader, you are likely spending 40% of your week in calls.

If your workflow requires you to “manually link attendees” or “create a new People Note” for every participant (as many popular guides suggest), you are digging yourself into a hole.

See also  How to Add a Progress Bar to Obsidian Tasks Using CSS and Dataview

Microsoft calls this Digital Debt. Their data shows that 60% of our time is now spent on communication (meetings, email, chat) versus only 40% on actual creation. Every second you spend typing “YYYY-MM-DD” is a second of debt you are accruing. We need to slash that execution time from 30 seconds to 300 milliseconds.

The Stack: Prerequisites for Automation

Before we paste the code, ensure you have the engine running. You likely have these, but check the settings.

  • Templater Plugin: The core engine.
    • Config: Enable “Trigger Templater on new file creation.”
    • Config: Enable “User Scripts” (if you want to get fancy later).
  • Dataview Plugin: For the dashboard we’ll build at the end.
  • Obsidian ICS (Optional): If you want the calendar integration script to work, install this and subscribe to your work calendar feed.

Level 1: The “Untitled” Killer (Auto-Rename Script)

If you have ever used a template in Obsidian, you know the bug. You create a new note, it defaults to “Untitled,” and the template runs. Now your file is technically named “Untitled,” but the metadata inside says something else. Competitors often tell you to “Name the file before you apply the template.”

That is ridiculous. Who remembers to do that when the boss is already talking?

This script fixes it. Paste this at the very top of your Meeting Note template. It detects if the file is named “Untitled.” If it is, it forces a prompt, asks for the topic, and renames the file and the H1 header instantly.

<%*
// PLACE AT THE VERY TOP OF YOUR TEMPLATE
const fileName = tp.file.title;
let newName = fileName;

// If the file is untitled, prompt for a name
if (fileName.startsWith("Untitled") || fileName.startsWith("New Note")) {
    newName = await tp.system.prompt("Meeting Topic?");

    // Default to "Ad Hoc" if you escape the prompt
    if (newName == null || newName == "") {
        newName = "Ad Hoc Sync";
    }

    // Rename file: YYYY-MM-DD - Topic
    const date = tp.date.now("YYYY-MM-DD");
    // FIX: Added backticks below for correct JS interpolation
    let finalName = `${date} - ${newName}`;

    // SAFETY CHECK: If file exists, append a number to prevent overwriting
    let counter = 1;
    while (await tp.file.exists(finalName + ".md")) {
        finalName = `${date} - ${newName} (${counter})`;
        counter++;
    }

    await tp.file.rename(finalName);
    newName = finalName; // Update variable for H1 usage
}
%>
# <%* tR += newName %>

Why this works: It respects the flow state. You hit “New Note,” and the system asks you what you’re doing. You type “Q3 Budget,” hit Enter, and the file is saved as 2025-10-12 - Q3 Budget.md. Clean. Consistent. Zero mouse clicks.

See also  5 Essential Obsidian Dataview Queries for Your Daily Notes Template

Level 2: The “Calendar Hijacker” (ICS Integration)

Stop alt-tabbing to Outlook to check how to spell “Liechtenstein” or checking who is in the meeting. If you use the Obsidian ICS plugin to sync your work calendar, we can hijack that data.

This script looks at your calendar for the current time window. If it finds a meeting happening right now, it grabs the title and attendees automatically. No typing required.

<%*
// Requires "ICS" plugin to be installed and configured
let meetingTitle = "Ad Hoc Discussion";
let attendees = [];

try {
    const icsPlugin = app.plugins.getPlugin("ics");
    // Safety check: Is the plugin actually running?
    if (icsPlugin && icsPlugin.data) {
        // Get all events for today based on available calendars
        const calendarKeys = Object.keys(icsPlugin.data);
        if (calendarKeys.length > 0) {
            const events = icsPlugin.data[calendarKeys[0]];

            // Simple logic: Is there an event happening NOW?
            const now = moment();
            const currentEvent = Object.values(events).find(e => {
                const start = moment(e.time);
                const end = moment(e.time).add(30, 'minutes'); // approximate duration
                return now.isBetween(start, end);
            });

            if (currentEvent) {
                meetingTitle = currentEvent.summary || meetingTitle;
                // Clean up attendee list if available in description
                if (currentEvent.description) {
                    attendees = currentEvent.description.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi) || [];
                }
            }
        }
    }
} catch (e) {
    console.log("ICS Plugin issue or no events found: ", e);
}
%>
title: <%* tR += meetingTitle %>
attendees:
<%* attendees.forEach(email => { %>
* <% email %>
<%* }) %>

Note: Calendar APIs are finicky. If you don’t use the ICS plugin, swap this section for a simple tp.system.suggester that lists your active projects.

Level 3: The “Smart Filer” (Dynamic Sorting)

Dumping every meeting note into a generic “Meetings” folder is the digital equivalent of stuffing your bills into a shoebox. It works until you need to find something.

Instead of manually dragging files later, let’s make the script do the heavy lifting. This snippet runs immediately after creation. It asks you which “Domain” this meeting belongs to (e.g., Engineering, Marketing, HR) and moves the file instantly.

<%*
// Define your folder structure here
const folders = ["10-Engineering", "20-Marketing", "30-Admin", "99-Archive"];
const targetFolder = await tp.system.suggester(folders, folders);

// Safety check to ensure a folder was selected
if (targetFolder) {
    // FIX: Added backticks below
    await tp.file.move(`${targetFolder}/${tp.file.title}`);
}
%>

Pro Tip: I actually combine this with Level 1. The script asks me for the name, then asks for the folder. In under two seconds, the file is named, tagged, and filed. It feels like magic—the good kind, not the “why did my printer stop working” kind.

Level 4: The “AI Intern” (Local LLM Hook)

This is where we leave the competitors in 2023. If you have a local LLM running (like Ollama) or an OpenAI API key, you shouldn’t be summarizing your own notes. You are expensive; scripts are free.

See also  Automate Your Meeting Notes: Best Obsidian Templater Scripts Copy-Paste

We won’t auto-run this on creation (that’s annoying). Instead, we will create a Templater User Script that you can trigger with a hotkey after the meeting.

Step 1: Install Ollama and run ollama run llama3 (or your preferred model).
Step 2: Create a new file in your scripts folder called summarize_meeting.js.

async function summarize_meeting(tp) {
    const noteContent = tp.file.content;

    // Notification: Process Started
    new Notice("Sending to AI...");

    try {
        const response = await requestUrl({
            url: 'http://localhost:11434/api/generate',
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({
                model: "llama3", // Ensure you have this model pulled in Ollama
                // FIX: Added backticks for prompt interpolation
                prompt: `Summarize the following meeting notes into 3 bullet points of key decisions and a list of action items. Do not use preamble, just the summary:\n\n${noteContent}`,
                stream: false
            })
        });

        if (response.status === 200) {
            const summary = response.json.response;
            // Append to bottom of file
            const file = app.workspace.getActiveFile();
            // FIX: Added backticks below
            await app.vault.append(file, `\n\n## AI Summary\n${summary}`);
            new Notice("AI Summary Completed!");
        } else {
            new Notice("AI Error: Server responded with status " + response.status);
        }

    } catch (error) {
        new Notice("❌ AI Error: Check if Ollama is running.");
        console.error(error);
    }
}
module.exports = summarize_meeting;

Now, when the meeting ends, you press Alt+S (or whatever you bind it to), and three seconds later, a perfectly formatted summary appears at the bottom of your note. This is the difference between “taking notes” and “managing knowledge.”

The Dashboard: Visualizing the Chaos

Great, you have automated the input. Now let’s automate the retrieval. We don’t want to browse folders. We want a dashboard that screams at us if we owe someone work.

Use this DataviewJS block on your homepage to see all open Action Items from the last 7 days of meetings.

```dataviewjs
dv.header(3, "🔥 Open Action Items (Last 7 Days)");

// Get pages tagged #meeting created in the last week
const pages = dv.pages("#meeting")
    .where(p => p.file.ctime > dv.date("today") - dv.duration("7 days"));

// Extract tasks that are not fully completed
const tasks = pages.file.tasks
    .where(t => !t.completed);

if (tasks.length > 0) {
    dv.taskList(tasks);
} else {
    dv.paragraph("✅ No open actions. Go grab a coffee.");
}
```

Conclusion: From Gardener to Engineer

Productivity isn’t about having the prettiest graph view or the most complex folder structure. It’s about reducing the friction between “thought” and “capture.”

The scripts above—Auto-Rename, Calendar Sync, Smart Filing, and AI Summarization—aren’t just cool tricks. They are structural defenses against the volume of communication we face daily. They take the “Admin Theater” out of your day so you can actually do the job you were hired for.

Small Step: Don’t try to install all four today. Start with Level 1 (The “Untitled” Killer). It’s the smallest change with the biggest quality-of-life return. Once you trust that, add the rest.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top