2026-05-02

Obsidian URI Protocol for Automation with Raycast: Complete Guide

Master the Obsidian URI protocol for automation with Raycast. Learn how to create custom scripts, capture notes, and build seamless workflows instantly.

Editor summary

Uri Protocol Automation Raycast bridges Obsidian and macOS through deep links like obsidian://open, enabling keyboard-driven workflows that capture ideas instantly. I explored how combining the Obsidian URI protocol with Raycast script commands eliminates friction—no mouse clicks, no folder navigation, just thought-to-vault speed. The Advanced URI plugin expands native capabilities to append text without overwriting, crucial for daily logs and quick captures. One trade-off: hardcoding vault paths makes your scripts brittle if your architecture changes frequently, so architectural discipline matters as much as technical setup.

Obsidian URI Protocol for Automation with Raycast: Complete Guide

Quick Answer: The Obsidian URI protocol allows external apps to interact with your vault using deep links like obsidian://open. By combining this protocol with Raycast script commands on macOS, you can build custom, keyboard-driven automations to instantly capture ideas, open specific daily notes, or append text to running logs without ever touching your mouse.

For knowledge workers, friction is the enemy of productivity. When a brilliant idea strikes or a critical piece of information needs to be saved, the time it takes to switch contexts, open an application, navigate to the correct folder, create a new file, and start typing is often enough to derail your train of thought completely.

Obsidian is widely regarded as one of the most powerful and flexible personal knowledge management (PKM) tools available today, primarily because of its local-first architecture and extensible nature. However, as your vault grows, navigating its interface can become a bottleneck. Enter Raycast, the modern, exceptionally fast launcher for macOS. While both tools are incredibly powerful on their own, linking them together transforms your computer into a frictionless productivity engine.

The secret to bridging these two applications lies in the Obsidian URI protocol. This framework allows you to trigger specific actions within your Obsidian vault from entirely outside the application. In this guide, we will explore exactly how the URI protocol works, how to craft custom Raycast script commands to leverage it, and how to build a personalized automation system that operates at the speed of thought.

Understanding the Obsidian URI Protocol

At its core, a URI (Uniform Resource Identifier) scheme is a standard that allows applications to expose specific commands to the operating system. Just as mailto: opens your email client and https: opens your web browser, the obsidian: scheme instructs your operating system to launch Obsidian and execute a predefined set of instructions.

The native Obsidian URI protocol supports several fundamental actions. The structure of these links always begins with obsidian://, followed by the action you want to perform, and then a series of parameters formatted as a query string.

The most common native actions include:

  • open: Opens a specific vault, and optionally a specific file within that vault.
  • search: Opens the search pane in a specified vault and executes a query.
  • new: Creates a new note in a specified location with optional pre-filled content.

A standard URI to open a specific note looks like this: obsidian://open?vault=MyVault&file=Project%20Dashboard

The critical rule when working with URIs is URL encoding. Because spaces and special characters can break a standard URL structure, they must be translated into a format the system can parse safely. For instance, a space becomes %20, a forward slash becomes %2F, and a line break becomes %0A. Failing to encode your parameters is the most common reason URI automations fail.

Setting Up Raycast for Obsidian Automation

Raycast does offer a community-built Obsidian extension in its store, which provides excellent out-of-the-box functionality for searching notes or appending text. However, relying solely on the pre-built extension limits your ability to create highly specific, multi-step workflows tailored to your exact vault structure. To unlock true automation, we must turn to Raycast Script Commands.

Script Commands allow you to write custom scripts in Bash, Python, AppleScript, or Node.js, and execute them natively through the Raycast interface. Because macOS handles URI schemes natively via the open command in the terminal, triggering an Obsidian URI from a bash script is incredibly straightforward.

To create your first Raycast Script Command for Obsidian:

  1. Open Raycast and type “Create Script Command”.
  2. Choose Bash as your template.
  3. Set a title (e.g., “Open Daily Dashboard”).
  4. Define your script to execute the open command followed by your specific URI.

Here is what the basic script looks like:

#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Open Dashboard
# @raycast.mode silent

open "obsidian://open?vault=PrimaryVault&file=Dashboard"

By assigning this script an alias (like dash) or a global hotkey within Raycast’s preferences, you can instantly summon your most critical Obsidian dashboard from any application on your Mac, completely bypassing the file explorer.

Essential URI Actions for Daily Workflows

Mastering the native URI protocol allows you to build several foundational automations that will save you minutes every single day. Let us explore the mechanics of the three most important actions.

Sometimes you know exactly what you are looking for, but you do not want to open Obsidian, click the search icon, and type your query. You can pass a search query directly through the URI.

Format: obsidian://search?vault=VaultName&query=YourSearchTerm

By creating a Raycast script that accepts a text argument, you can build a global Obsidian search bar. When you trigger the command in Raycast and type your query, the script encodes your input and passes it to Obsidian, instantly displaying the search results pane.

2. Rapid Note Creation

When you need to draft a new document quickly, bypassing the folder hierarchy is essential. The new action allows you to specify the exact path and name of the new file.

Format: obsidian://new?vault=VaultName&file=Meetings%2FClientSync&content=Agenda:

You can utilize Raycast arguments to capture the title of the note directly in the launcher, executing the URI to create the note in your designated “Inbox” or “Meetings” folder with template text already inserted.

3. Contextual Retrieval

If you manage projects in Obsidian, you likely have “hub” notes or Kanban boards. Creating a suite of Raycast commands that open specific files allows you to treat these notes as standalone applications. Instead of switching to Obsidian and finding your “Q3 Marketing Plan,” you simply hit your Raycast hotkey, and the exact note appears on screen immediately.

Supercharging Workflows with Advanced URI Plugin

While the native Obsidian URI protocol is robust, it has limitations. Specifically, it struggles with appending text to existing notes without overwriting them, and it cannot easily interact with specific block references or community plugins.

To resolve this, power users install the “Obsidian Advanced URI” community plugin. This plugin significantly expands the URI capabilities of your vault, acting as a crucial middleware for complex automations.

The Advanced URI plugin introduces the obsidian://advanced-uri endpoint. Its most powerful feature is the ability to easily append or prepend data to a running list—perfect for daily journals, task lists, or scratchpads.

Instead of just opening a file, you can instruct Obsidian to silently add text to the bottom of it. Format: obsidian://advanced-uri?vault=VaultName&filepath=Inbox.md&data=NewIdea&mode=append

Furthermore, Advanced URI allows you to trigger Obsidian internal commands (like running a specific Templater script or opening the command palette) entirely via a URL. This means your Raycast script can open a note, wait a second, and then execute an Obsidian macro automatically.

Building Advanced Raycast Script Commands

To truly illustrate the power of this integration, let us build a complete Quick Capture system. The goal is to hit a global hotkey, type a thought into Raycast, and have that thought appended to today’s daily note in Obsidian, along with a timestamp, without the Obsidian window ever interrupting our focus.

Because Bash scripting requires careful handling of spaces and special characters for URLs, we will use a small inline Python snippet within our Bash script to handle the URL encoding reliably.

#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Quick Capture to Log
# @raycast.mode silent
# @raycast.argument1 { "type": "text", "placeholder": "What's on your mind?" }

# Extract the argument from Raycast
input=$1

# Get the current time for the timestamp
timestamp=$(date +"%H:%M")

# Format the final string we want to append
formatted_text="- [$timestamp] $input"

# URL encode the formatted text using Python
encoded_input=$(python3 -c "import urllib.parse; print(urllib.parse.quote('''$formatted_text'''))")

# Define vault and target file (using Advanced URI for appending)
vault="MainVault"
file="Daily/Logs/Log-Current"

# Execute the URI
open "obsidian://advanced-uri?vault=$vault&filepath=$file&data=$encoded_input&mode=append"

When you trigger this command in Raycast, type “Review the marketing copy,” and press Enter, the script seamlessly encodes the text as - [14:30] Review the marketing copy and appends it to your specified log file. The silent mode in the Raycast metadata ensures the launcher simply closes, allowing you to return to your work immediately.

Practical Advice: Designing Your Productivity System

Implementing URI automations is straightforward technically, but requires architectural discipline to remain effective over time. Here are concrete recommendations for designing a resilient system.

Hardcode Your Vault Architecture: Avoid writing scripts that attempt to dynamically guess where files live. If your Quick Capture system relies on a file named Inbox.md, ensure that file never moves. Pin your critical entry points and hardcode their exact paths into your Raycast scripts. If your vault is highly modular and files move constantly, URI targeting becomes brittle.

Standardize URL Encoding Early: Never assume your input will just be plain text. The moment you attempt to capture a clipboard string containing ampersands, semicolons, or line breaks, a poorly encoded URI will truncate your data or fail silently. Always wrap your text payloads in a dedicated encoding function (like the Python urllib.parse.quote method shown earlier) before constructing the final obsidian:// string.

Leverage Raycast Argument Types: Raycast supports different argument types, including text, password, and dropdown. For workflows like logging specific types of expenses or categorizing ideas, use the dropdown argument in your script metadata. This allows you to select a category via the keyboard before hitting enter, passing that category as a variable to your URI for cleaner formatting in Obsidian.

Manage Sync Delays: If you use Obsidian Sync or iCloud to manage your vault across devices, be aware that rapidly appending text to a file via a background URI while the file is simultaneously being synced can occasionally result in minor version conflicts. It is best practice to target local-first files for high-frequency capture, or ensure Obsidian is running in the background so its native conflict resolution handles the rapid changes.

Conclusion

The combination of the Obsidian URI protocol and Raycast transforms knowledge management from a passive filing system into an active, frictionless extension of your operating system. By investing an hour into configuring custom script commands, you eliminate the cognitive tax of context switching. Whether you are building an instantaneous quick-capture tool, setting up global search hotkeys, or creating automated project dashboards, mastering the URI protocol ensures that your tools conform entirely to how you work, rather than forcing you to adapt to them.

Frequently Asked Questions

Why does my Obsidian URI open the app but not the specific note?

This almost always indicates a URL encoding error or an incorrect file path. Ensure that any spaces in your vault name or file name are encoded as %20 and that you are using the correct file extension if required by the specific action.

Do I need to buy Raycast Pro to use these automations?

No, Raycast Script Commands are entirely free and available in the core application. You only need the Pro version for cloud synchronization of settings, AI features, and custom themes.

How do I handle spaces and special characters in my Obsidian vault name?

Your vault name must be strictly URL-encoded in the URI string. A vault named “My Second Brain!” must be written in the URI as vault=My%20Second%20Brain%21. It is highly recommended to keep vault names simple and free of spaces to minimize scripting headaches.

Can I trigger Obsidian community plugins via Raycast?

Yes, but you must use the Obsidian Advanced URI community plugin. This plugin exposes internal application commands to the URI framework, allowing you to execute any command palette action (including third-party plugin commands) directly from a Raycast script.

Is it possible to append text to a note without opening the Obsidian window?

Native Obsidian URIs generally require the app to surface and process the command. However, if Obsidian is already running in the background, using the Advanced URI plugin with the append mode allows you to push text into a file seamlessly without the main window forcing its way to the front of your screen.