Guided workflow for new notes

What I’m trying to do

My workflow for new notes is always to create a new note by using Command+N, then entering the date in YYYY-MM-DD followed by a title, then Command+P, selecting “Inserting template”, choosing my template and then finally filling in all properties.

This is pretty repetitive.

I am looking for a way to to automate this ideally so that every time I use Command+N it will automatically insert the date, prompt me for the note title and when I then hit enter it will ask me for a template.

Btw. my vault setup is mostly based on Kepanos vault.

Things I have tried

Are you using just one template, or multiple?

In any case, this sounds like something which can be achieved using the open daily note button/command attached with a proper template. Then you’d use only press before your ready to enter your stuff.

Multiple templates depending on what kind of note I want to take. Sometimes it’s for meeting so I will use the meeting template, sometimes it’s something else.

From my search I found Quick Add, which might do what I need to some degree at least it seems it will reduce some manual work

Consider using the templater plugin, where you can assign a shortcut to a specific template.

The template itself may look like this:

	let title = tp.file.title
	if (title.startsWith("Untitled") {
		title = await tp.system.prompt("Name the note","YYYY-MM-DD") + " ", true);
		await tp.file.rename(`${title}`);
	const include_file = await tp.system.suggester(
		["1. note"
		, "2. movie"
		, "3. cite"
		, "4. moc"
		, "5. meeting"
		, "6. event"
		, "7. person"
		, "8. project note"
		, "9. project meeting"
		, "10. technical documentation"
		],false,"Podaj typ notatki"

	tR+= await tp.file.include(include_file);

The first part of the code renames the file with today’s date filled in, then the defined template is selected and attached to the new file.

My partial template for the note looks like this:

<%* const status = await tp.system.suggester(["🟥","🟩","🟧","🟨"],["🟥","🟩","🟧","🟨"], false, "Enter the status of the memo") -%>
<%* const tagSelector1 = await tp.system.suggester(["1. 💼", "2. 🧠", "3. ⚙"],["💼", "🧠", "⚙"], false, "Specify level 1 grouping") -%>
<%* const tagSelector2 = await tp.system.suggester(["📥️","📦"],["📥️","📦"], false, "Specify level 2 grouping") -%>
<%* const tagValuable = await tp.system.suggester(["no assignment","🌱","☘️","🍀","🌿","🌲","🎄"],["","🌱","☘️","🍀","🌿","🌲","🎄"], false, "Value of the note") -%>
version: N2309
typ: note
tags: <% tagSelector1 %>/<% tagSelector2 %>/📝️/<% status %>
status: <% status %>
valuable: <% tagValuable %>
publish: true
created: <% tp.file.creation_date("YYYY-MM-DD HH:mm") %>
updated: <% tp.file.last_modified_date("YYYY-MM-DD HH:mm") %>
reviewed: <%"YYYY-MM-DD") %>

so you can also complete properties if you want.

1 Like

Hey @akoliber, what do you mean by a “partial template”? I was looking through templater and didn’t find anything called that. Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.