Automate Obsidian commands with QuickAdd (or any other option)

What I’m trying to do

I try to automate my workflow. In short I want to

  1. Create a new note based on templater (for the textbody)
  2. Connect note to a Class using metadata menu (for the meta data)
  3. metadata menu: Insert missing fields in frontmatter
  4. Set Created date to now()
  5. Update the new note with link to current open note (if a note is open)
  6. Add the created note to kanban board

I have a plan and an idea for how to solve this using QuickAdd but right now I am stuck trying to figure out if it is possible to call an obsidian command from QuickAdd and pass the arguments so that no selection boxes are poped up. I would like to call “metaData: add fileClass to file” without being prompted to select a class in the next step. Possible? Any better approach?

Also not sure about if metadata menu suport default values, like loading current date to a date field or setting a status variable to something like “new” directly from start.

Things I have tried

I have watched some tutorials on QuickAdd and googled the topics.

I’m not sure that’ll work or not easily within Obsidian. What would you like to use metadata menu for here?

The templater part should work, e.g.

---
Created: <% tp.date.now() %>
---

<% tp.file.selection()%>

as part of the macro you can use a function from the Smarter MD Hotkeys plugin called Smarter Copy File Name which copies just the file name. As part of the macro we can first input [[]] and then paste the file name to the new note, which should work.

As for the automated Kanban, I can’t think of a way to do that. I have something similar, but that uses a simple python script which may be beyond the scope of this project. Also I can’t explain how it works, because ChatGPT wrote the script for me.

I’ve struggled with QuickAdd, so I’m going to see if I can think of a similar process for Commander which also creates macros.

In the meantime: What exactly do you want to use metadata menu for? If it’s just adding frontmatter, we can just do that with the template.

Templater can paste, so we can use:

---
DateAdded: <% tp.date.now() %>
---

[[<% tp.system.clipboard() %>]]

so the Commander macro for me currently looks like:

Smarter Markdown Hotkeys: Smarter Copy File Name

Templater: Create Templates/our-template.md

you can modify the template to look like whatever you want of course.

I just saw that QuckAdd has a function to add something to Kanban: Capture: Add a Task to a Kanban Board | QuickAdd

but I’ll let you figure that out, as I’ve struggled with QuickAdd in the past. I’m sure you could either do all of this entirely in QuickAdd or maybe combine QuickAdd and Commander

Hi and thanks for your replies! I have worked a bit more on this now. I realised that I do not need to run a command to connect the note to the class. I just add it as meta data in the template. Let me present the current solution and then I make another post with things that I would like to improve.

The template:

---
fileClass: Reference-Book
ISBN: 
Start-Read-Date: 
Fin-Read-Date: 
Date-Recorded: <% tp.file.creation_date("YYYY-MM-DD") %>
Related:
  - "{{LINKCURRENT}}"
---

“fileClass: Reference-Book” is enough to connect the template to the class created with metadata Menu.

Why metadata Menu? I think it seems to have many features I like including to be able to update many properties in different files in bulk. More about the plug in here: https://www.youtube.com/watch?v=qi4Uz7TZLOM&t=1295s

The kanban board:

## Read Suggestions

The QuickAdd config:


Now, when running the Macro I get prompted

New note:

Updated Kanban:

## Read Suggestions

- [ ] [[How to make tea twice by William Beta]]
- [ ] [[How to make tea by William Beta]]```

So optimally I would instead like the template to look like this:

---
fileClass: Reference-Book
---

1. Templater command for calling metadata menu for inserting missing fields in frontmatter.

2. Templater command for updating property Date-Recorded with current date.

3. Templater command for adding 
  - "{{LINKCURRENT}}" to Related property.

I am not sure in which order things would be executed and maybe 3 wouldn’t work. Maybe QuickAdd has then already ran its code for updating LINKCURRENT.

The missing fields are inserted manually clicking the box. That is the command I would like to run automatically.