Get AI summaries of any video or article — Sign up free
Excalidraw Writing Machine: Generate articles from your Visual Zettelkasten cards in Obsidian thumbnail

Excalidraw Writing Machine: Generate articles from your Visual Zettelkasten cards in Obsidian

5 min read

Based on Zsolt's Visual Personal Knowledge Management's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Visual Zettelkasten cards combine a drawing front with markdown back content (idea, sources, related notes), enabling structured drafting from visuals.

Briefing

A workflow built around Visual Zettelkasten cards in Obsidian can turn a visual article layout into a clean, publication-ready PDF draft—complete with section structure, embedded images, and source citations. The core idea is to treat each visual card as a Zettelkasten note (front: drawing/summary; back: markdown text, sources, and supporting notes), then use an “Excalidraw Writing Machine” script to read the card sequence and automatically “stitch” the content into a structured document.

The promise behind Zettelkasten is familiar: once a system has accumulated notes, new writing shouldn’t start from scratch. Instead, writers should be able to assemble existing notes into a first draft and then refine. This approach adds a visual layer to that promise. The framework described breaks personal knowledge management into dimensions: linear text (read top-left to bottom-right), separate documents, links between notes, and—crucially—illustrations reused across notes. Visual processing is treated as parallel rather than linear, with icons and image fragments acting as connective tissue between ideas.

Visual Zettelkasten operationalizes that by giving each note two sides. The front side is the visual representation (drawings in Excalidraw), while the back side holds markdown content such as the idea summary, related notes, and sources. When organizing ideas, the system doesn’t just shuffle bullet points; it organizes at the card level. That card-level structure is what the writing machine script translates into an article draft.

Technically, the script walks through an Excalidraw “arrow sequence.” It captures the main title, then paragraphs until it hits a branch point. At each “fork in the road,” the first text element becomes a section heading, followed by the paragraphs that flow linearly from that point. When a Zettelkasten node appears in the layout, the script pulls the card’s back-side markdown (including the source reference) and places it under the corresponding image in the generated output. The result is a document with headings, paragraphs, images, and citations formatted into a coherent draft.

From there, the workflow offers two automation levels. In the lighter mode, the generated markdown can be copied into ChatGPT with a prompt to rewrite and expand it into a full article. In the heavier mode, AI4 Templator and Templator are used to run ChatGPT queries automatically inside Obsidian. The script passes generated text via a window variable (window.wm), supports debugging by storing responses back onto the window object, and uses a placeholder in the template so the original extracted text can be injected into the AI prompt.

Installation is handled through Obsidian’s “install/update scripts” flow for Excalidraw scripts, and the script’s settings allow customization such as renaming the summary section, selecting where sources live, and choosing whether to embed images. Because the solution is a prototype, it’s designed to be edited: the arrow interpretation depends on drawing order, and misordered connections can reorder sections in the output. The practical takeaway is that visual organization becomes a structured drafting engine—turning a visual knowledge map into a readable document that still requires human polishing before publication.

Cornell Notes

The workflow turns Visual Zettelkasten cards in Obsidian into structured article drafts by reading an Excalidraw layout. Each card has a visual front and a markdown back (idea, sources, supporting notes). The Excalidraw Writing Machine script follows the arrow sequence: it extracts a main title, paragraphs, and—at branch points—creates section headings and assigns the following text to those sections. Zettelkasten nodes contribute their back-side markdown under the corresponding image, including source citations. The draft can be used directly or fed into ChatGPT, either manually (copy/paste) or automatically via AI4 Templator and Templator templates, with configurable settings like image embedding and section naming.

How does the Excalidraw Writing Machine decide what becomes a title, section heading, and paragraph?

It interprets the Excalidraw arrow flow. The first selected element becomes the main title. Text elements that come after it along the main path become paragraphs until the layout reaches a “fork in the road.” At each fork, the first text element encountered becomes the section heading, and subsequent text elements that follow linearly after that fork become that section’s paragraphs. This means the structure is encoded in the visual branching and arrow ordering, not in a separate outline file.

What exactly is pulled from a Visual Zettelkasten card when generating the draft?

When the layout includes a Zettelkasten node, the script uses the card’s back side (markdown view) rather than only the drawing. The generated document places the card’s image and then inserts the back-side content underneath, including the idea text and a source reference formatted in brackets. The front drawing functions as the visual anchor; the back markdown supplies the prose and citations.

What are the two main ways AI is used after the draft is generated?

First, a manual route: select all generated markdown, copy it, paste it into ChatGPT, and use a prompt to rewrite it into a full article (returned as a markdown code block). Second, an automated route: AI4 Templator plus Templator run ChatGPT queries from within Obsidian. The template can include a placeholder that gets replaced with the extracted text, and the script passes the extracted content via window.wm.

Why does arrow drawing order matter for the final article structure?

The script’s output depends on how the arrow sequence is interpreted. If a section is connected in a way that causes the script to traverse a later branch first, the generated document can reorder sections (e.g., section two appearing before section one). The workaround is to delete and redraw connections so the intended traversal order matches the desired section order.

What settings can be customized in the script after installation?

After the first run, settings appear under the Excalidraw scripts area. Customizations include renaming the summary section (e.g., using “idea” instead of “summary”), setting where the source is located (e.g., a section named “source”), and choosing whether to embed images in the generated output. There’s also a template path option that stores the last used template when templates are selected.

How does the templating system support debugging and template reuse?

The templator script stores variables and the AI response back onto the window object, enabling inspection via the developer console to see what was sent and what came back. It also supports a placeholder mechanism: wherever a placeholder appears in the template, it gets replaced with the generated text from window.wm, letting the same template be reused across different card layouts.

Review Questions

  1. In what specific ways does the script’s handling of “forks in the road” differ from its handling of the main linear path?
  2. Describe how a Visual Zettelkasten note’s front and back sides contribute differently to the generated article draft.
  3. What practical steps can prevent section order mistakes when arrows are drawn in Excalidraw?

Key Points

  1. 1

    Visual Zettelkasten cards combine a drawing front with markdown back content (idea, sources, related notes), enabling structured drafting from visuals.

  2. 2

    The Excalidraw Writing Machine script builds an article by traversing an arrow sequence: title first, then paragraphs, then section headings at branch points.

  3. 3

    Zettelkasten nodes contribute their back-side markdown under the corresponding image, including source citations formatted in the output.

  4. 4

    AI can be applied either by manual copy/paste into ChatGPT or automatically via AI4 Templator and Templator templates using window.wm and placeholder replacement.

  5. 5

    Script settings let users rename the summary section, configure where sources are stored, and choose whether to embed images.

  6. 6

    Section order in the generated document depends on how arrows are drawn and connected; misordered traversal can swap sections, requiring redraws to fix it.

  7. 7

    Because the solution is a prototype, editing the script (with scripting skill) is encouraged to match different Zettelkasten layouts and naming conventions.

Highlights

The workflow turns a visual Excalidraw layout into a structured draft by treating arrow branches as section boundaries.
Each card’s markdown “back side” becomes the prose under its image, preserving sources as citations.
Automated AI writing is enabled inside Obsidian by combining AI4 Templator, Templator, and a template placeholder that injects extracted text.
Arrow traversal order can change section ordering in the output, so the visual connection sequence is part of the “data model.”

Topics

Mentioned

  • Ted Blizzard