SERGEY REVIN
← All work

Solution · team operations

A Notion workspace map: every database and relation on one diagram

The workspace has grown, and nobody knows which databases exist or how they connect. A script reads every accessible database through the API and builds an ER diagram: properties and relations on one map. It is where an audit starts before rebuilding a system.

What it looks like

Mock-ups with demo data, no real data

  1. 01

    Notion API

    Every accessible database

  2. 02

    Script

    Properties and relations

  3. 03

    DBML

    A text description of the schema

  4. 04

    ER diagram

    An interactive map

🗺️Databases and relations

DatabasePropertiesRelationsSignal
Projects24Tasks, Clients, Financecore
Tasks31Projects, Teamoverloaded
Clients (old)12—no relations
Meetings9Projectsok
A fragment of the output — demo data

At a glance

Where it runs
My tool for Notion audits
Fits
Teams with a sprawling Notion before a rebuild or automation work
Needs
Integration access to the relevant parts of the workspace

Estimate for your company

  • ≈4–6 h

    of describing a 20-database workspace by hand

    Assumption: 20 databases × 12–18 minutes to write down properties and relations by hand (our assumption)

This is a calculation, not a promise: plug in your own volumes and the figure changes.

Before

  • Nobody remembers which databases exist or what connects to what.
  • Before a rebuild it is scary to delete anything: it is unclear what will break.
  • Describing the schema by hand takes long, and it is out of date the next day.

What was built

Reads the whole workspace

The script walks every database it can access through the API and collects their properties and relations.

ER diagram

The result is exported to DBML and opens as an interactive diagram — you see which databases are overloaded with relations and which stand alone.

The basis of an audit

The map shows duplicates, dead databases and places that need automation — the starting point for designing a new system.

Stack

  • Notion API
  • Node.js
  • DBML
  • dbdiagram.io

Where it runs

Questions

Does it change anything in our Notion?

No, the script only reads. It creates and deletes nothing.

Does the map stay current?

It can be rebuilt at any time with one command, so it never goes stale.

Have a similar problem? Get in touch — we start by mapping your processes.

Message me on Telegram