Get AI summaries of any video or article — Sign up free
Ultimate Automation with QuickAdd - a final look at the Clothesline method thumbnail

Ultimate Automation with QuickAdd - a final look at the Clothesline method

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

QuickAdd macros can run scripts only when the XColorDraw view is active, enabling context-aware automation for canvas cards.

Briefing

QuickAdd automation can turn Obsidian’s “clothesline” drawing workflow into a two-track process: each time a user adds a card in the XColorDraw canvas, a script immediately prompts for the card title, creates/updates a matching “card details” markdown file, and then inserts a new card on the canvas with the title and a clickable link back to that details file. The key advantage over templating is that QuickAdd can run scripts specifically when the XColorDraw view is active, letting the macro react to the drawing context instead of relying on a static template.

The setup starts by creating a QuickAdd macro named “clothesline add card.” The macro runs two prepared scripts in sequence. Step one handles the user interaction and file naming: it shows an input prompt asking for the card title, stores that title in a variable, then derives a “card details” file path from the active drawing’s file path. The script takes the drawing’s path, strips the extension, and appends “card details” so the details file shares the drawing’s base name. Step one also prepares the capture target by writing a header line (a markdown “#” title) into that details file.

Step two focuses on the canvas update. It initializes the XColorDraw automation component using the currently active view (a change from earlier approaches that couldn’t target the XColorDraw view directly). It then creates a new card in the drawing. If another element is selected, the script positions the new card relative to that selection so cards “hang” beneath one another. The card gets a colorful header area: a random color is chosen from the available palette, and the card title is placed centered on the card. Finally, the card includes a link in the bottom-right corner that points to the card details file. That link text is generated via Obsidian’s metadata cache, respecting whether the user prefers full or relative links.

Once the macro is configured, the user assigns it to the command palette and binds it to a hotkey (Control 1). In practice, pressing the hotkey while the drawing is open triggers the title prompt; after entering a title, the macro creates the card details file and inserts a new card into the canvas. Repeating the hotkey adds additional cards, stacking them under the previously selected card.

Two refinements improve the editing experience in the details file. First, the capture operation is adjusted to insert an empty line after each header so the markdown stays readable. Second, the capture is set to write to the bottom of the file, ensuring new headings appear in reverse order of creation (newest at the bottom) rather than being inserted near the top. After these tweaks, subsequent card additions keep the details file neatly structured, and the links from the canvas continue to resolve to the correct details pages.

The workflow ends with a promise of another macro-focused video for a more complex “crazy type” presentation, along with links to the scripts and an “empty template” file for recreating the setup.

Cornell Notes

QuickAdd can automate XColorDraw “clothesline” cards by running scripts only when the XColorDraw view is active. A single macro (“clothesline add card”) runs two scripts: Step one prompts for a card title, derives a card-details markdown file path from the active drawing, and captures a markdown header into that file. Step two creates the visual card in XColorDraw, positions it relative to any selected element, assigns a random header color, places the title on the card, and adds a clickable link to the card-details file. Hotkey-driven use lets brainstorming happen on the canvas while the corresponding details files are built in the background.

How does the macro decide where the card-details markdown file should live and what it should be called?

Step one reads the active view’s file path via the Obsidian API, then extracts the file extension by taking the substring after the last dot. It builds the details file path by taking the drawing path without the extension and appending “card details.” The result is a markdown file named after the drawing’s base name plus the “card details” suffix.

What does Step one capture into the details file, and how is the card title reused later?

Step one uses QuickAdd’s input prompt to ask the user for the card title, stores it in a variable (card title), and then writes a markdown header line (“#” plus the title) into the capture file. That same card title variable is later referenced when Step two places the title text on the card and when the details file link is generated.

How does Step two place new cards in the XColorDraw canvas relative to existing cards?

Step two initializes XColorDraw automation using the currently active view. When an element is selected, it positions the new card relative to that selection so cards appear beneath the selected card. If nothing is selected, the card placement behavior follows the script’s default creation logic.

Where does the clickable link on the card come from?

The link text is generated using Obsidian’s metadata cache function that returns either a full or relative link depending on user settings. The link points to the card-details file path computed in Step one, and the link is placed in the bottom-right corner of the created card.

What two changes were made to improve the formatting of the details file as more cards are added?

First, the capture operation was updated to insert an empty line after each header for readability. Second, the capture was set to write to the bottom of the file so newly added headings appear after existing ones, keeping the newest entries at the bottom rather than near the top.

Review Questions

  1. If the active view is not an XColorDraw raw view, what failure mode does the script risk, and why?
  2. Describe how the macro ensures the card title entered by the user ends up both on the canvas card and in the corresponding markdown details file.
  3. Why does changing the capture setting to “write to bottom of the file” affect the order of headings as new cards are created?

Key Points

  1. 1

    QuickAdd macros can run scripts only when the XColorDraw view is active, enabling context-aware automation for canvas cards.

  2. 2

    A two-step macro workflow prompts for a card title, then uses that title to both update a markdown details file and render a new card on the canvas.

  3. 3

    Card-details file paths are derived from the active drawing’s file path by stripping the extension and appending “card details.”

  4. 4

    New cards can be positioned beneath a selected element, letting users stack “clothesline” cards during brainstorming.

  5. 5

    The card includes a clickable link generated via Obsidian’s metadata cache, honoring full vs relative link preferences.

  6. 6

    Formatting improvements—adding an empty line after each capture and writing to the bottom—keep the details file clean and ordered as cards accumulate.

Highlights

Pressing Control 1 while the drawing is open triggers a title prompt, creates the card details markdown file, and immediately inserts a linked card into the XColorDraw canvas.
The card-details filename is automatically tied to the drawing’s base name, so each drawing maintains its own set of linked card pages.
Switching the capture to “write to bottom” changes heading order so newly created cards appear at the end of the details file.
Random header colors are applied to each created card, while the title text is centered and the link sits in the bottom-right corner.

Topics

  • QuickAdd Macros
  • XColorDraw Automation
  • Obsidian Card Details
  • Clothesline Method
  • Hotkey Workflow

Mentioned

  • API