Using Bear with Drafts

In the above append example, the URL used in the URL step of the actions is:

bear://x-callback-url/add-text?title=Journal-[[date|%Y-%m]]&text=[[draft]]&mode=append

URLs send information to the target app as query arguments, which is the part of the URL after the ?, and is a set of key=value pairs, separated by ampersands (& ).

To target a different, specific note in Bear, you would only need to change the title argument in this URL. It is currently title=Journal-[[date|%Y-%m]], which looks a little intimidating because it includes a Drafts template tag, but does not need to. You can replace that part with title=MyNoteTitle and the action would append to a note with the name “MyNoteTitle” in Bear.

Because URLs also require some characters (like spaces) to be encoded in argument values, I would recommend you actually use title={{MyNoteTitle}} for that value to make sure any special characters that might be in your note title are encoded properly in the URL. So, the new URL, which you can use when you edit the “Append” example action would look like:

bear://x-callback-url/add-text?title={{MyNoteTitle}}&text=[[draft]]&mode=append

(Of course, replace “MyNoteTitle” with the note title you actually want to target).

Hope this helps!