Sync metadata Properties with external SQL or NoSQL database

Hi everyone,

What I’ve always appreciated in Obsidian is how it encourages thinking through writing. Its true strength lies in connecting ideas, not in managing highly structured and repetitive databases. I believe that’s what makes it so unique compared to other note-taking tools.

Lately though, I’ve been exploring how plugins like Dataview or Bases can surface patterns in structured metadata. It’s powerful, but I try to keep in mind that Obsidian should remain a tool for insight and thought, not a productivity black hole where we spend more time designing schemas than actually writing.

Still, with the amount of notes I’ve accumulated and the consistency of my metadata, I’m reaching a point where I would benefit from external tools to analyze or even automate based on that data.

A good example is geographic visualization. I often want to view my notes on a map. Existing plugins like Mapview or Leaflet are great for simple uses, but very limited compared to what GIS software like QGIS can do. And since QGIS and other advanced tools rely heavily on SQL databases, it seems natural to ask:
Why not sync all my metadata to an external database like PostgreSQL?

Doing so wouldn’t just improve how I visualize or analyze my notes. It would also open the door to automating the metadata itself using APIs, which is something I’d find extremely useful. For example, being able to update fields or trigger external workflows based on the content of my notes.

So here’s my question:
Is there currently a way to efficiently sync all note metadata to an external database? And if not, why has no one done this yet?

The only relevant project I found is this old archived plugin: https://github.com/clouedoc/postgresql-obsidian
But with the arrival of the Bases plugin and the future Base API, I’m wondering whether this could finally become possible.

Would love to hear your thoughts if you’ve explored this path or if you think it aligns (or conflicts) with the spirit of Obsidian.

Thanks!

4 Likes

This is third-party plugin territory.

1 Like

Exactly my thoughts, I even started developing my own Obsidian notes indexer for this purpose.

3 Likes

Here is a list of plugins that may be helpful:

Plugin Name Author Description Link
Metadata Extractor kometenstaub Metadata export (on a schedule) for integration with third-party apps like launchers or graph analysis software. GitHub - kometenstaub/metadata-extractor: Obsidian Plugin that provides metadata export for use with third-party apps.
Local GraphQL Hawtian Wang Export Obsidian data as a local GraphQL server. GitHub - TwIStOy/obsidian-local-graphql
Local REST API Adam Coddington Unlock your automation needs by interacting with your notes over a secure REST API. GitHub - coddingtonbear/obsidian-local-rest-api: Unlock your automation needs by interacting with your notes in Obsidian over a secure REST API.
2 Likes

This is the exact function that i’m currently looking for right now.

there’s a way to manually update yaml value GitHub - natelandau/obsidian-metadata: Batch updates to metadata in an Obsidian vault.
The workflow is not as simple as link to external database and requires a lot of manual work to sync the data.

Since the frontmatter now is most static data, if there’s a way to sync from external source that would be very useful.

1 Like

I also think OP has an important question for a separate post:

  • Will Bases have an API for interacting with vault data?

As a mostly non-technical person, I don’t know enough about the subject to write the post myself, though.

Since I’m here again, I used my Community Plugins spreadsheet to find some more specific actions mentioned in this post and @underline6167 's comment.

Related Plugins

Plugin Name Plugin Author Plugin Description Plugin Link
Runsh Ddone Create buttons that run shell commands from your notes. https://github.com/Deedone/obsidian-runsh
Gnome Terminal Loader David Carmichael Sidebar action icons to quickly open the Gnome Terminal or to have the Gnome Terminal run a Python module. https://github.com/CheeseCake87/gnome-terminal-loader
Shell commands Jarkko Linnanvirta Define system commands that you want to execute via command palette, hotkeys, URI links or automated events. E.g. open external applications or perform automated file modifications. https://github.com/Taitava/obsidian-shellcommands
Terminal polyipseity Integrate consoles, shells, and terminals. https://github.com/polyipseity/obsidian-terminal
Sentinel Giorgos Sarigiannidis Trigger actions based on document visibility changes. https://github.com/gsarig/obsidian-sentinel
Commando qaptoR Enable repeated calls of a command using defined or per-invocation values. https://github.com/qaptoR/Commando
Automation Benature Execute commands on specific events. https://github.com/Benature/obsidian-automation
Cron Callum Loh Simple CRON / scheduler to regularly run user scripts or commands. https://github.com/cdloh/obsidian-cron
Watched-Metadata Nail Ahmed Watches for changes in metadata and performs user-specified actions based on these changes. https://github.com/NailAhmed/Watched-Metadata

Reference Plugins

These are plugins that have functions which could be useful to reference, if anyone reading this wants to create a plugin to solve this problem.

Plugin Name Plugin Author Plugin Description Plugin Link
Current File Mark Fowler Allows external applications to know what file the desktop app is currently viewing. https://github.com/2shortplanks/current-file
Tray dragonwocky Run Obsidian from the system tray for customisable window management and global quick notes. https://github.com/dragonwocky/obsidian-tray
File path to URI Michal Bure? Convert file path to URI for easier use of links to local files outside of Obsidian. https://github.com/MichalBures/obsidian-file-path-to-uri
Bulk Exporter symunona Filter, export notes from your vault using metadata into a customizable new structure. https://github.com/symunona/obsidian-bulk-exporter
SQLite DB Stefano Frigerio Interact with local SQLite files in your notes https://github.com/stfrigerio/sqliteDB
3 Likes

My plugin allows you to interact with the data in Obsidian using SQL as a language. You can use the codeblock to also export to a separate file and you can format and render that data as CSV, JSON, etc and to a seperate file which you can promatically work on.

This page shows an example of how the data is outputted to a seperate file.

1 Like

so this plugin : obsidian → external data
not both ways : obsidian ←→ external data

1 Like

Some sort of synching would be necessary.

It’s not about interacting with SQL, but more about having an accessible database for others apps

1 Like

Now we have the answer ! Do you think regarding the new release and documentation that my wonder is possible ?

Now there’s the new Bases API, maybe that could be a game changer ! What do you think ?

1 Like