Drafts Used for a Zettelkasten

This post summarizes my experience using Drafts for a Zettelkasten.

A Zettlekasten is a method of taking notes best described in the book “How to Take Smart Notes” by Ahrens. I first learned about it from the web site:

That site is run by the developers of the Mac application The Archive, an application specifically designed for use with Zettelkastens. If you are interested in learning more about Zettelkastens, their site is the place to go.

Bearing in mind that I am by no means an expert – the essential differences between a Zettelkasten and a standard note-taking system are:

  • Wiki-style links between notes. The assumption is that insights (new knowledge) emerge from a group of notes inter-connected with links. Adding more linked notes creates more knowledge. By contrast, adding more unconnected notes creates an increasingly useless pile.

  • Use of “structure notes” that consist of links forming a table of contents (or index if you prefer). Structure notes provide entry points into a web of inter-connected notes. A Zettelkasten might have multiple structure notes depending upon the system’s size and complexity. In addition to links, structure notes may contain brief explanatory text. The Drafts Scripts Reference provides an example of how structure notes work.

  • Focus on “atomicity” of notes. Atomicity encourages notes to be short, each devoted to a narrowly defined subject, making them easier to link to other narrowly focused notes.

  • Notes based on the user’s appreciation of a subject, not (exclusively) based upon clipped or quoted information. Creating notes based on my understanding of an issue is different from my typical activity with Bear–i.e., assembling an ever-growing and increasingly less useful pile of clipped web articles.

When Version 20 of Drafts added linking capability, I imported (my first) Zettelkasten from The Archive. My principal reasons for making the switch:

(1) I wanted a system that worked with both macOS and iOS. If I was going to spend time developing a Zettelkasten I wanted to be able to carry it with me, in the same manner that I carry my calendar, contacts database, and task manager with me. In addition, I frequently encounter Zettelkasten-related information while not in front of my iMac. The Archive’s macOS-only limitation in this regard may be a result of its origins–use cases where information is largely obtained from books and journal articles in an office setting. The Mac-only approach rules out numerous other possibilities such as a birder recording sightings, a school principal evaluating teachers, a field engineer inspecting a facility, an eighth-grader with an iPad but not a Mac, a salesman making client calls, a personal trainer making notes about clients in a gym, etc.

(2) Note creation and management is dependent upon operations that Drafts can streamline without reliance upon third-party solutions such as Keyboard Maestro or Alfred. Much as I depend upon Keyboard Maestro and Alfred for other purposes, they don’t work on iOS, and they are not needed to manage a Zettelkasten in Drafts.

In Drafts, each Zettelkasten exists within a workspace. You can create more than one Zettelkasten, each using its own workspace. Structure notes can be flagged and set to sort at the top of lists where they can be immediately found. An Action Group containing Zettelkasten-related operations can be assigned to one of the two action group defaults for the workspace.

The Zettelkasten-related actions I have assembled came directly from the Actions Directory. My JavaScript ability is near zero and my only contribution to these actions was to modify a few template definitions.

This group of Zettelkasten-related actions works on my iPhone and iPad as well as on my iMac.

  • Start from a draft, typically a structure note. The action prompts for a title and tags for a new note, with the tag(s) used in the structure note suggested as a default. The action then creates the new note using an easily configurable template embedded in the action. It also creates links from the structure note to the new note and vice versa. This is a frequently used action and it is very efficient.
  • Start from a draft and display all drafts within the workspace. Choose one. The action uses the selected draft’s title to insert a link in the starting draft.
  • Go back to the last draft.
  • Prompt for a new title for an existing draft. The action changes the title and then searches the workspace, updating any links that depend on the old title. This action makes it unnecessary (IMO) to employ the 12-digit UID (yyyymmddhhmm) used by The Archive to ensure that changing a title does not break links. For the unconvinced, a UID can be created in Drafts as easily as it can in The Archive.
  • Display all drafts that link to the current draft.
  • Create a link to Bear using the title of a Bear note in the clipboard. While plain text has advantages, easy incorporation of other file types is not one of them. Links to Bear largely solve that problem.
  • Create a standard Markdown link using a url in the clipboard.
  • Create a draft from scratch, using what I consider to be my “standard template”.
  • Create a draft from scratch, using a template that I prefer to use when capturing and commenting upon text from the web.
  • Rename a tag.

A frequently-voiced concern re Drafts in the Zettelkasten community is that drafts are stored in a special database, making their long-term viability suspect. In the thread “Error sending Drafts docs to iA Writer” I discovered two actions written by @davenicholls that export drafts to iCloud where they can be accessed by iA Writer – and also by The Archive. Links and Markdown formatting are preserved. In the Actions Directory, see:

Send to iA Writer

Send multiple to iA Writer

These two actions (and there may be similar functionality that I have not discovered) should ease concerns about the long-term viability of a Zettelkasten created in Drafts.

When I first imported notes from The Archive to Drafts I was concerned that “date created” was not preserved. All creation dates were the date of import. After using Drafts for a Zettelkasten for a few months, I believe that my concern was mis-placed. IMO, it is more important to focus on date accessed than date created. If a draft/note has not been accessed for months, one of two things is probably true: (a) It has no value and should be deleted, or (b) it has been overlooked for too long and deserves your attention. Any note actually created in Drafts (versus imported) will have the “correct” date created.

On the Zettlekasten Forum there are numerous discussions regarding the optimum template to use with notes. IMO, there is no optimum. The information needed by a birder recording a sighting is much different from the information needed by a therapist or a field engineer. Drafts easily accommodates multiple templates.

There are four other considerations that I think bear on a decision regarding choice of software for a Zettelkasten: (1) The exceptionally high quality as well as the depth and breadth of documentation that Greg provides. (2) The extraordinary speed with which Greg is providing new functionality. (3) The amplifying affect of a community that uses the extensive scripting options available in Drafts to enhance the application’s utility. (4) The fact that a Zettelkasten is only one of a large number of functions that Drafts supports. Using Drafts for one function develops expertise useful for others.

Bottomline: If you want to try using a Zettelkasten and already use Drafts, you need look no further.

17 Likes

This is very helpful, thank you! I found this post looking for help creating the 12-digit UID in Drafts.

You’ve almost convinced me to move my Zettelkasten, an idea I never thought I’d entertain. The Archive is currently my task manager as well as my Zk, and nothing gets mixed up because of type-specific file prefixes and The Archive’s amazing Saved Search feature.

You mentioned that the actions you use aren’t ones you wrote yourself. Forgive me if the answer to this is obvious, but I’m having trouble knowing where to look for the actions you mentioned, especially this one:

Start from a draft, typically a structure note. The action prompts for a title and tags for a new note, with the tag(s) used in the structure note suggested as a default. The action then creates the new note using an easily configurable template embedded in the action. It also creates links from the structure note to the new note and vice versa. This is a frequently used action and it is very efficient.

I access my Zk in Editorial on iOS, but I can see there’d be much more flexibility using Drafts as home base.

Thanks again.

1 Like

I believe he is referring to the “New Linked Draft” example in the cross-linking example action group.

5 Likes

@agiletortoise is correct. The only change I made was to modify the template used in that action. At the top of the script, mine now is:

let template = `# [[title]]

[[date|%B %d, %Y]]

References:

Links:

[[backlink]]`;

template = template.replace("[[backlink]]", [[${draft.displayTitle}]]);

2 Likes

To amplify my original post re use of Drafts for a Zettelkasten: While the methodology derives from academia, its applicability is much broader. For example, I recently set up a system of “Instructions” for my wife and daughter covering things they need to know or do if I am run over by a bus tomorrow.

There are currently 67 drafts in this “system” - actually a workspace. One of them is a “Master Index” containing links to seven subordinate indexes (structure notes in Zettelkasten lingo). The seven subordinate indexes cover subjects such as Notifications, Finances, Medical, Dogs, etc. The index Dogs contains links to drafts with information re: Vet, Food, Boarding, Microchips, Grooming, and Licenses. Individual drafts always contain at least one link “up” the structure, but some contain several others.

The system’s structure was not difficult to create using the action described by @agiletortoise above. The structure is flexible, easy to modify or extend, and easy to navigate. The actual location of the drafts in the draft list is unimportant because movement from one draft to another is controlled by links.

Sensitive information, e.g., passwords and bank account numbers, is stored in 1Password Secure Notes. Drafts refers to 1Password Secure Notes where applicable. I make occasional use of a link to Bear or to a standard Markdown link to a web page.

This way of doing business has altered the way I use Drafts. If I set up a Workspace, my first thought is to create a structure note to organize the new workspace’s contents. As I transition from using Drafts as a place where writing “starts” to where it “stays” the Zettelkasten style of organization will become increasingly important to me.

3 Likes

thanks for this post, lots to chew on.

One thing that worries me about Drafts’ implementation of the double bracket wiki links is that there is no ability to change the name of notes and maintain the links. Since the double bracket search function is just searching that name. I’m not sure how this works in The Archive either …

You raise a valid concern. I use an action that, when invoked, prompts for a new title for the current draft. After you provide the new title, the action updates the title of the current draft and searches the workspace updating links that depended upon the old title.

I use this action often (1) to clarify a title, (2) when I decide to split or merge drafts, or (3) simply to fix a typo in the title.

As I understand it, the same problem in The Archive is solved by making links dependent upon 12 digit UIDs in the form yyyymmddhhmm. But, other than date created, UIDs don’t convey useful information, so a link based upon a UID must be further explained - else who knows what it is a link to? Linking with titles, assuming that you have a way of updating links based on title names when a title is changed seems more efficient to me.

1 Like

That sounds like a useful action! Have you shared it?

I just shared it to the Actions Directory under the title “Title and Links.” No guarantees re the quality of the code.

1 Like

Sorry to be a bother–I don’t see that when searching the directory. Maybe it’s unlisted? Any chance you could link to it here?

I think you should be able to find it now. Missed the “unlisted” option. Thanks for pointing that out.

1 Like

Hey, that’s a great script. I made a small change, so that the script counts the drafts that were changed as well, giving the total of drafts changed AND the total of drafts evaluated. Just a small sanity check for my use!

Here’s the change:

//This scripts prompts for a new title and then replaces the old title with it.// 
//The script also searches the current workspace to locate links based on the old title, and updates them.//


// prompt for new title.// 
let p = Prompt.create();
p.title = "New Title";
p.message = "Enter the new title. The old title and all links using that title will be replaced by the new title.";

p.addTextField("newTitle", "New Title", "", {
    "placeholder": " ",
    "autocorrect": false,
    "autocapitalization": "none",
    "wantsFocus": true
});

p.addButton("Replace");

if (p.show()) {
    //Establish variables for the old and new titles and the old and new links.//
    let oldTitle = draft.displayTitle;
    let oldLink = `[[${oldTitle}]]`;
    let newTitle = p.fieldValues["newTitle"];
    let newLink = `[[${newTitle}]]`;

    //Search the current workspace looking for links based on the old title and update them.
    let count = 0
    let cCount = 0
    var drafts = app.currentWorkspace.query("all");

    for (let d of drafts) {
        if (d.uuid != draft.uuid) {
        		if (d.content.includes(oldLink)){
            	d.content = d.content.replaceAll(oldLink, newLink);
            	d.update();
            	cCount++
            }
           count++
           
        }
    }

    editor.setText(editor.getText().replace(oldTitle, newTitle))
    alert(cCount + " changed in " + count + " drafts evaluated.");
}
6 Likes

Thank you. Very useful change.

Would you be willing to publish all Zettelkasten scripts in an action group? Or post them somewhere else?

I think you will have better luck starting with the group that @agiletortoise provided in the Action Directory when Version 20 was released. It is called “Examples: Cross-linking” and has actions for:

Insert Link to Draft
Back Links
Open Last Draft
New Linked Draft (which I renamed to New from Structure Note)

The one additional action I think you’ll need is “Title and Links” which I shared to the Directory yesterday. It changes the title of a draft and also updates any links dependent upon the new title.

I use Bear and wanted somewhere to store other file types. So I added a single step text action where the clipboard holds the title of a Bear note.

[[bear:[[clipboard]]]]

I added “Markdown Link” – also provided by @agiletortoise to this action group.

You may want to modify the template used by “New Linked Draft” or duplicate that action to provide more than one template option. I provided an example of how to do that earlier in this thread.

3 Likes

Ok, found it.
Thanks

I have been waiting and watching until i finally found a good use case for Drafts. This might do the trick! Great information

1 Like

and now I am on the Pro trial…going down the rabbit hole…

I would love to know more. Is this the best source to learn from? I note some of the reviews are not the best…

Here’s a good detailed review: https://fortelabs.co/blog/how-to-take-smart-notes/

1 Like