Skip to content

Instantly share code, notes, and snippets.

@dannberg
Last active October 18, 2024 22:38
Show Gist options
  • Save dannberg/9056b89437110e62766689772437fe46 to your computer and use it in GitHub Desktop.
Save dannberg/9056b89437110e62766689772437fe46 to your computer and use it in GitHub Desktop.
Dann Berg's Meeting template for Obsidian. Full implementation instructions here: https://dannb.org/blog/2023/obsidian-meeting-note-template/. See the YouTube tutorial here: https://youtu.be/Ud16HOQoS5Q
---
date: <% tp.file.creation_date() %>
type: meeting
company:
summary: " "
---
tags: [[🗣 Meetings MOC]]
Date: [[<% tp.date.now("YYYY-MM-DD-dddd") %>]]
<% await tp.file.rename(tp.date.now("YYYY-MM-DD") + " " + tp.file.title) %>
# [[<% tp.date.now("YYYY-MM-DD") + " " + tp.file.title %>]]
**Attendees**:
-
## Agenda/Questions
-
## Notes
-
@jasonchuasg
Copy link

@jasonchuasg It sounds like what's happening is that when you press the button, it's running the templater code on your template file, rather than making a new copy from the template and running templater code on that. I'm not sure at what step in that process it's happening, but make sure you're not expanding the templater code in the template file. The template file is only used to create new documents.

How do I ensure that my Templater code did not get expanded in the template file?

@dannberg
Copy link
Author

dannberg commented Feb 5, 2024

It's impossible for me to tell without looking at your entire setup. But my guess based on what you're saying it that it's something that's happening with the button. Make sure you're using the button maker interface to make the button (not copy/pasting), the button is in a different note than the template (I use a Meetings MOC file), and that you're using the same settings I'm using in the screenshot in my blog post.

I'm planning to record a video at some point soon showing how I set everything up, too. So hopefully one of those can help you get it working.

@antoineallard
Copy link

I'm facing the same issue, even when I copy-paste your exact files. There must be something wrong with the settings. I'll keep looking. Thank you so much for sharing your templates and your workflow!

@jasonchuasg
Copy link

I'm facing the same issue, even when I copy-paste your exact files. There must be something wrong with the settings. I'll keep looking. Thank you so much for sharing your templates and your workflow!

It's an awesome workflow. I spent the wholeday trying to figure out the settings to make it right. If you manage to find the solution, please let me know!

@dannberg
Copy link
Author

dannberg commented Feb 5, 2024

@antoineallard @jasonchuasg Hm, I'm not sure why both of you are having issues. I just filmed a quick video to test making a new button, and it still works for me. Is this the same as what you two are doing? https://youtu.be/YeyARTXBzTo

@antoineallard
Copy link

antoineallard commented Feb 5, 2024

Thank you for the video. I'm doing the same this as you. I wonder if there is something in the settings that is interfering with Templater?

@horuscoding
Copy link

This is an issue with the latest version of the buttons plugin. Check out the issue here - shabegom/buttons#207

@dannberg
Copy link
Author

dannberg commented Feb 5, 2024

@horuscoding deus ex machina right here. thank you for helping solve this problem!!

@antoineallard
Copy link

Thank you. Moving the "moving" part to the button was the workaround I was considering. I'm glad we now know where the error was. Thanks again to all of you!

@antoineallard
Copy link

Replacing the button by this looks promising.

@jasonchuasg
Copy link

The template stops moving! But I have another issue: I can't find the dropdown for the template from my Templater despite of the fact that I've put that template folder in the Templater settings. Do you happen to know why?

@antoineallard
Copy link

I think you also need to indicate the folder in the (core) template settings.

@jasonchuasg
Copy link

jasonchuasg commented Feb 6, 2024

I think you also need to indicate the folder in the (core) template settings.

Got it! Can you share your updated code for the meeting template and button code with me?

@antoineallard
Copy link

antoineallard commented Feb 7, 2024

The meeting template does not need to be updated. The button object in the Meeting MOC needs to be replaced by a button from the Meta Bind plugin that should be similar to this

```meta-bind-button
style: primary
label: New Meeting
actions:
  - type: templaterCreateNote
    templateFile: "Templates/Template, Meeting.md"
    folderPath: "Timestamps/Meetings"
    fileName: "TKTK"
    openNote: true

You should probably use the Meta Bind Button Builder instead of copy-pasting the code above. Let me know how it goes!

@jasonchuasg
Copy link

The meeting template does not need to be updated. The button object in the Meeting MOC needs to be replaced by a button from the Meta Bind plugin that should be similar to this

```meta-bind-button
style: primary
label: New Meeting
actions:
  - type: templaterCreateNote
    templateFile: "Templates/Template, Meeting.md"
    folderPath: "Timestamps/Meetings"
    fileName: "TKTK"
    openNote: true

You should probably use the Meta Bind Button Builder instead of copy-pasting the code above. Let me know how it goes!

I can create the first note. But the next time I click on the button, it says "Templater Error: Template parsing error, aborting. Check console for more information."

Any idea what went wrong here?

@antoineallard
Copy link

Is there already a note with the same name as the target one (either TKTK or the name that your template renamed itself to)?

@marcmauger
Copy link

I also had success with the Meta Bind plugin - thanks @antoineallard !

@jasonchuasg
Copy link

Is there already a note with the same name as the target one (either TKTK or the name that your template renamed itself to)?

Yes. The first note that was created has the name TKTK. If I were to click on the button again, it doesn't allow me to create a new meeting note and a little pop up of "Templater Error" will be shown.

@dannberg
Copy link
Author

I just updated the original post to use the Meta Bind plugin rather than Buttons. It's working wonderfully for me, too. Thanks for the tips, all!

https://dannb.org/blog/2023/obsidian-meeting-note-template/

@dannberg
Copy link
Author

Also, in case people prefer to follow along to a video, I just turned my meeting note system into a YouTube tutorial: https://youtu.be/Ud16HOQoS5Q

@JoschD
Copy link

JoschD commented Feb 27, 2024

Hi @dannberg , thank you very much for your tutorials and these templates!

I noticed one weirdness with the current setup: you only temporarily create a new file at the location given by the folderPath
of the meta-bind-button, which is then moved by the templater plugin. So if you want to change this location, only the tp.file.move command needs to change location, as the folderPath is for all practical purposes ignored (but might create an then empty folder). Which seems a bit counter-intuitive.

I would suggest to replace

<% await tp.file.move("/Timestamps/Meetings/" + tp.date.now("YYYY-MM-DD") + " " + tp.file.title) %>

with

<% await tp.file.rename(tp.date.now("YYYY-MM-DD") + " " + tp.file.title) %>

Then the final location of the created note will be in the folderPath .
This also allows to create multiple buttons to different locations while using the same template.

Possibly, this is also related to the "my template is moving around" comments from above.

@dannberg
Copy link
Author

@JoschD Great call. This was an artifact from when I was using a different plugin to create these templates (manually with QuickAdd) but is reduntant (and as you pointed out, unnecessary) with the current Meta Bind button method.

I'll update this gist with your modification. Thanks!

@bkcraft-1
Copy link

bkcraft-1 commented Jul 18, 2024

Hi @dannberg!, these templates have totally changed my daily workflow in Obsidian! Thanks so much for sharing them.

I just wanted to comment to say that for my workflow (numerous rapid fire back to back meetings), I really needed to get around the parsing issue with filenames being the same. I added an Hmm timestamp to the file name to create unique files for each just to facilitate quick creation.
The reason I need it to be quick is because if I have an impromptu meeting, I can create the file, open Obsidian on my phone, and use voice typing to transcribe the meeting in a raw format to a section I added at the bottom. I added a tp.file.cursor to the Raw Transcribed section as well.

This is very unobtrusive and adaptable to many circumstances. You just have to go back and organize things once you get the chance.
I wanted to comment here in case anyone else would find it handy.

@tbal-withatouchofmalace
Copy link

tbal-withatouchofmalace commented Aug 17, 2024

Edit - I added a day folder to what I would be looking for 25 minutes after I created this comment.

Hi @dannberg ,

I love your templates!

I am losing my mind in trying to get a new Meeting Note with a similar similar folder structure to how the Daily Note is done:

Daily Note:
Timestamps/Year/ ##Month Name Month/Daily Note

Meeting Notes:
Timestamps/Meetings/Meeting Note

I would prefer similar structure like this:
Timestamps/Meetings/Year/ ##Month Name Month/Date/Meeting Note
(where the Year and Month and Date folders are created automagically if they don't exist like they are with the Daily Notes

In the Meetings MOC, it would also be nice to be able to collapse years and months if that would be possible.

@TrustArgon
Copy link

TrustArgon commented Aug 23, 2024

@tbal-withatouchofmalace

I managed to accomplish what you're looking for by modifying the Meeting Template like so:

---
date: <% tp.file.creation_date() %>
type: meeting
company: 
summary: " "
---
tags: [[🗣 Meetings MOC]]
Date: [[<% tp.date.now("YYYY-MM-DD-dddd") %>]]


<%*
const moment = tp.date.now("YYYY/MM-MMMM");
const folder = `Meetings/${moment}`;
const fileName = tp.date.now("MM-DD-dddd") + " " + tp.file.title;

const filePath = `${folder}/${fileName}`;
await tp.file.move(filePath);
await tp.file.rename(fileName)
%>

# [[<% tp.date.now("YYYY-MM-DD") + " " + tp.file.title %>]]

**Attendees**: 
- 

## Agenda/Questions
- 

## Notes
-

You may have to change the contents of const folder to match your use case as I have my meetings in a root folder called Meetings. If you're using it as originally designed, just change it from Meetings/${moment} to Timestamp/Meetings/${moment} and you should be good to go.

@bkcraft-1
Copy link

@TrustArgon I've never thought to do this, but I kept meaning to come back to this after seeing the question above about it. I just tested your method and it works perfectly. Thanks

@tBal-WithaTouchofMalice

@TrustArgon

That works wonderfully. Thanks!

@nippyin
Copy link

nippyin commented Oct 13, 2024

It would be great if after entering attendees name the cursor moves to Agenda and after entering agenda it automatically moves under notes heading.

@dannberg
Copy link
Author

@nippyin Templater has <% tp.file.cursor() %> that allows you to specify where you want the cursor to be placed once a new note is created from a template. But I don't think there's a way to automatically move the curser after entering attendees name(s). If you find a way to get it to work, please share here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment