npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-relatasql

v0.1.7

Published

n8n community node for RelataSQL — run SQL, inspect schemas, and govern writes across your database connections using a RelataSQL API key.

Readme

n8n-nodes-relatasql

Official n8n community node for RelataSQL — run SQL, inspect schemas, and govern writes across your RelataSQL database connections, straight from your automations.

This node is a pure database-infrastructure integration. It deliberately does not include any AI/LLM operation: use n8n's native AI nodes (with your own key) to generate SQL or logic, then hand it to this node to execute safely against your databases. That keeps token costs on your side and avoids runaway-loop billing.

Installation

In n8n: Settings → Community Nodes → Install and enter n8n-nodes-relatasql.

Self-hosted/manual: build this package (npm install && npm run build) and place/link it under your n8n custom extensions folder (~/.n8n/custom) or set N8N_CUSTOM_EXTENSIONS to its path.

Credentials

Create a RelataSQL API credential:

  • Base URL — RelataSQL API base URL. Defaults to the official cloud API https://api.relatasql.com (no trailing slash).
  • API Key — generated in RelataSQL → Settings → API Keys (starts with relata_live_). Sent as Authorization: Bearer <key>.

The credential Test lists your connections to verify the key.

Operations

Connection

  • List — connections reachable with this API key (also powers the connection dropdown).

Database (Postgres + MySQL; queries run read-only)

  • Execute Query — run a read-only SQL query and return one item per row.
  • Sample Rows — first N rows of a table.
  • Run in Sandbox — execute SQL inside a transaction that is always rolled back (safe test).
  • Create Dump — run pg_dump/mysqldump and return a compressed .sql.gz as binary, ready to hand to a Google Drive / Dropbox / S3 / FTP upload node. Scope = structure+data / structure-only / data-only. Requires a paid plan.

Schema

  • Get Tables / Get Columns / Get Relations — introspect a connection.

Write (with approval) — the governed mutation path

  • Request Approval → returns an approval ID.
  • Check Approval → poll its status (a human approves it in RelataSQL → Settings → MCP → Approvals).
  • Execute Approved → run the approved statement.

Backup

  • List Schedules — backup schedules reachable with this API key (also powers the schedule dropdown).
  • Trigger Run — run a schedule now (fire-and-forget; poll List Logs for the result).
  • List Logs — recent backup runs (status, size, duration, error).

Important constraints

  • Enable the connection first. Programmatic access is gated: in RelataSQL go to Settings → MCP and enable access for each connection (choose an indefinite grant for unattended n8n flows). Otherwise calls fail with a clear "connection not enabled for API access" error.
  • Read vs write. Execute Query is read-only by design. Mutations go through the Write (with approval) flow, which requires a human approval in the RelataSQL UI.
  • PostgreSQL only for query/schema in this version. MySQL/MSSQL execution is coming on the backend.

Example: back up a database to Google Drive

RelataSQL: Create Dump (pick the connection) → Google Drive: Upload (binary field data). Add a Schedule Trigger in front for a nightly backup to your own Drive — no intermediate storage needed.

Example: move data between databases

Execute Query on connection A (read) → transform in n8n → Request Write on connection B → approve in RelataSQL → Execute Approved.

License

MIT