Create button that creates new (meeting) notes, with suffixing

Firstly, yes, I have searched the forums for similar topics/questions (including reading the documentation) but to no avail. I recently started and am loving Obsidian - but I am stuck at this button plugin setup.

I can’t get the button to work because of the error: “File already exists?

I would like to create a button that creates a new note, however I may have multiple meetings in a given day so I would like suffixing (e.g. “Meeting Note - 2”, “Meeting Note - 3” ,etc". Additionally, all meeting notes should be created inside the “Meetings” folder.

what i have so far:

name New Meeting
type note(Meeting, split) template
action MeetingTemplate

my template is named MeetingTemplate:

const baseFolder = app.vault.getAbstractFileByPath("Meetings");
const filenameAndFolder = `${"YYYY")}/` +
   `${"MM-MMMM/YYYY-MM-DD-ddd")}/` +
const template = tp.file.find_tfile("Templates/MeetingTemplate"); // template under Templates folder
await tp.file.create_new(template, filenameAndFolder, true, baseFolder);

# Meeting Notes

I appreciate any help!

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