Linking to a local path or SMB share in Notion

Linking to a local path or SMB share in Notion

Earlier today I was experimenting with Notion when I discovered that you can trigger a Mac OS Finder window to pop up in using the File block type, and it allows all sorts of URI types. I experimented with file:// and smb:// but I suspect others are supported by the Notion Mac OSX native client.

This technique is useful for linking to assets stored outside of Notion. For example, linking to a network drive, files synced in Dropbox, OneDrive, Box.net, etc.

It’s straight-forward to implement. Here are the steps:

  1. Get your path.
    For this experiment we will use /Users/mike/code
  2. Create a new block in Notion.
    Try typing /file
  3. Create an Embed Link.
    First type file:// then paste your path.
    The result should look like file:///Users/mike/code
    For SMB shares, you would use something like:
    smb://server/path/to/files
  4. Click the Embed Link button. Boom!

Check the image below for example configuration based on the steps above.

Example of using Embed Link to embed link to a directory path

Creating your new clickable button with Embed Link, the button will be named (labelled) based upon the basename of the path used. This works great for files, but it’s not as helpful for directory names.

In our example, the basename for /users/Mike/code is code.

To rename the button to “Link to My Projects” (for example), click the ellipsis (…) and select Rename (or press CMD+SHIFT+P).

You can also add flair to the button by changing the background colour of the text, adding emoji to break up visual monotony, and add a Caption below the button to help provide context for the reader.

If your directory structure or SMB share details ever change, clicking Replace will allow you to update the path.

While storing your documents in Notion might be the best decision moving forward, many external organizations will continue to use “shared drives” for sharing files and assets.

Mike Walker

Mike is a full-stack web developer with 15 years experience. I focus on PHP & Javascript development, and work with platforms like Shopify Plus and WooCommerce eCommerce. The Agency Developer is a weekly curated newsletter with a mission to inform and educate developers working with digital agencies.

Leave a Reply

Close Menu