QuickAdd Plugin

Thank you for this plugin. I have been poking at it a bit here and there and have a reasonably decent setup to log my tasks into my Daily Note, but I need to take it to the next level.

Currently I just preset a basic Capture list suggester of my common activities for the day: Start, Done, Lunch, BRB, Meeting, Phone, Testing, Other.

Selecting one of those gives me a text field to briefly describe the activity.

This is then appended to a timestamped table in my Daily Note, effectively building up a timeline of my day.

## Activity Log
| Start Time | Activity | Note                  | Elapsed | TS1 |
| ---------- | -------- | --------------------- | ------- | --- |
| 08:00      | Start    | .                     |         |     |
| 08:01      | Testing  | UI bug on main screen |         |     |
| 08:45      | Phone    | Salesperson called    |         |     |
| 08:50      | Testing  | Main screen bug       |         |     |
| 11:00      | BRB      | .                     |         |     |
| 11:10      | Back     | .                     |         |     |
| 11:10      | Meeting  | [[Phase 2 Meeting]]   |         |     |
| 12:00      | Lunch    | .                     |         |     |
| 12:30      | Back     | from lunch            |         |     |
| 12:31      | Testing  | PR for Ticket 3232    |         |     |
|            |          |                       |         |     |

However, I find myself logging a task, such as “Testing” and describing it as “UI bug on main screen”, working on it for a bit, getting interrupted with a new task “Phone” because “Salesperson called”, and then going back to “Testing” the “Bug on the main screen”.

Eventually, I end up with several variations of that Testing task in my log.

I’m struggling to connect the dots of macros, templates, and javascript, wondering if there is some way I can setup my Capture to read today’s log and present an option list of existing instances of (in this example) “Testing” to be chosen from, along with the empty line for a new entry?

Something like selecting “Testing” from the initial list, and then seeing:

  • UI bug on main screen
  • PR for Ticket 3232
  • [blank for new]

I’m thinking some javascript will be needed, but I am entirely unsure about how to go about this, or if it would even be possible.

The description of each activity is quite fluid, so building a pre-defined list would be virtually impossible.

I am not entirely tied to this layout, aside from the sequential timestamping of my day, so I am open to suggestions if that needs to change.

(Ultimately am I hoping to pull reports on all these logs to see how much time is spent where. Yes, there are other logging alternatives, but I am trying to stick with Obsidian and local files)




I’m looking at using QuickAdd with Zotero and have followed your tutorial from the example on GItHub, I have one error that confuses me and something I can’t figure out. Perhaps you can help.

  1. The inetraction and creation works well if I leave the formatting for the filename in the marco blank, but then I need to type in the filename. If I add formating & {{VALUE:filename}} or just {{VALUE:filename}}, the macro errors out saying it can’t create the file, and suggests an invalid path for the file. - Any thoughts?

  2. I’m trying to figure out how to extract notes and annotations. In your github documentation you have “notes” as a value. Does this refer to child notes in Zotero or the PDF annotations (created using the built in PDF reader)? Additionally, even though I have a number of child notes and annotations attached to a PDF niether of the groups appear to be extracted for transfer to the Obsidian notes by the macro. (I have confirmed that Better BibTex has updated the export library, and I am using BibLaTex for teh information in the export library.

Cheers for any help. I really like what QuickAdd has to offer, I just have to figure out how to get it working for my workflow, which is complicated by the fact that I am not very savvy with these types of things…but learning :slight_smile:

In my “Add Project” macro, following steps executed.

  1. Create “ProjectName - Detail - Date” note
  2. In “ProjectName - Detail - Date”, inline JavaScript ask to select “Goal”
  3. In “ProjectName - Detail - Date”, YAML field “Goal::” is set.
  4. Create “ProjectBoard - Date” note
  5. I want to fetch YAML field from “ProjectName - Detail - Date” using inline JavaScript.

Currently I am trying to figure out how to access “{{VALUE::hammer_and_pick: Add Project}}” variable in inline JavaScript.

I am able to do it using DataViewJS

Goal :: `$= const pg = dv.page('{{VALUE:⚒ Add Project}} - Details - {{DATE}}'); dv.span(pg.Goal);`

I am looking for a way to do it in js QuickAdd

1 Like

Is it possible to delete the entire content of a note using the QuickAdd or Obsidian API? I’m trying to replicate something like this post, except I don’t want to use Templater. I want to use a QuickAdd template.

Just a quick note to thank you for this plugin. It took me a while to figure out how to get started using it—I’m not a coder, not even AppleScript or JavaScript. But I took an hour or so over the weekend and dug in and now I am finding this plugin extremely useful.

1 Like

I just get an empty menu that comes up when I add this script in a macro. I have notes with type: Project in the frontmatter. I don’t know anything about JavaScript… Is it supposed to go before or after a choice in a Macro? Could you explain the sequence of choices in a macro? For ex. 1. Template 2. User script 3. Capture

Also, am I supposed to add anything inside the script to reflect my vault specifically?

Some pointers would be very greatly appreciated

1 Like

Is there a way to set the cursor position in the capture format?

This is my current format:


### Agenda

- [ ] Item 1  <-- How can i get the cursor moved to here?

### Other/Misc
1 Like

Sorry if this is a dumb question. I set up a “Meeting Note” template, and it works perfectly. I would like the file name to automatically include today’s date without me having to type it out. Then the full file name and title to be included as well in the header.

Is this possible?

1 Like

Was this ever resolved?

I have a similar situation: I use .inputPrompt to get rating, status, and recommender from the user (me) when adding movies. Sometimes these values should be null. Currently, QuickAdd will re-prompt me a second time for undefined/empty-string values. And related to this, if a QuickAdd.variables contains undefined properties, the string value "undefined" gets passed to Templates and thus shows up in my yaml :thinking:.

Hi, just replacing the yellow line by

<%tp.date.now() - tp.file.title%>

Should work,

1 Like

Hi Christian,

Thanks for such a great plugin! I am heavily using it to automate my flows.
I was checking the API to see if there was a date picker component to add to the modal, but did not find any. Then I checked if there was any as part of the app module and nope also.

Finally I realised that the author of the calendar plugin was requested to export the calendar from his plugin here and ended up releasing this repo with the component

I was trying to figure out how to integrate, but my javascript is only enough to make tweaks here and there. Could you evaluate if it is possible to integrate such option to the modals? I could for sure give a try and send a PR later, but if it is not that complicated a dev like you could get it done way faster.

Thanks a lot!

1 Like

Hi there !

First of all Kudos @Christian what your plugin is amazing and really takin Obsidian to the highest level !

I installed the “Note Mover macro”, that allow to move all files containing certain tags,
but nothing happen when running the macro from the command palette.

I followed the video on how to install macros : ie. the file is in the vault, with a .js extension, and then the “choice” is added in QuickAdd and linked to the corresponding macro. But despite this, it does not prompt anything.

Any pointers or something missing ?

In advance many thanks

Hey, i really like the plugin. It is amazing helpful.

I use the {{VALUE:}} method to open a suggester when i create a daily note. I want to go through a list like, did i meditatie, how was my sleep and so on. Like a little habit tracker.

But if i use the method like this {{VALUE: , Yes,No}} i dont see a headline in the dialog box.

And the other thing that i recognize is if is use this “{{VALUE: , Yes,No}}” multiple times, for example "did i meditate:{{VALUE: , Yes,No}}, did i walk to office: {{VALUE: , Yes,No}}, i just see the dialog box ones and the selected value is paste everywhere where “{{VALUE: , Yes,No}}” is placed in the template.

Is there a workoround? Hope my question is clear. My english isnt the best.

Hi Kalle123 - I don’t think there is a simple workaround in the {{VALUE:…}} syntax just yet (though I believe it’s on Christian’s todo list for eventually). The way I normally do this is by putting a little QuickAdd javascript at the bottom of my template file - like this:

let meditated = await this.quickAddApi.suggester( ["Meditated-Yes", "Meditated-No"], [true, false] );
this.variables["DidIMeditate"] = meditated;

That will open a suggester with two values; and then save the result into a variable called “DidIMeditate”. Then anywhere in your template you can use {{VALUE:DidIMeditate}} to fill in the result - just as if you had created it like one of your other variables.

Unfortunately it doesn’t seem like there is a way to give it a prompt title… which is why I’ve made the multiple options more descriptive… but mapped their real values to just true/false.


This scripts seems amazing, but unfortunately, it did not manage to make it work either…
After placing the JS script in my vault, I am getting the same error as @Lito , an empty menu when I run the action…
I’ve named my YAML fields “type” and value “Project”…
I’m going to keep researching about this, but any help would be also appreciated.
Cheers !

I just enter a space into the prompt field in this situation.

Perfect - thank you!

I love the idea of QuickAdd, but it doesn’t seem to work well for me.
Whenever I used the command “capture” I don’t get a dialog window and it just creates a new note in the root of my vault, not to append it to the file in the folder I set it to.

“template” does work, so I’m not sure what I did wrong with capture.

Any idea what’s wrong?

Could you share how you setup your Capture command so we can help?

You would have to provide a screenshot of your settings for us to really help.