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 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-microapi

v0.1.0

Published

n8n node for Micro API - Schema-less JSON storage

Readme

n8n Nodes for Micro API

Custom n8n community node to interact with Micro API (schema-less JSON storage).

  • Base URL-only credentials (no auth)
  • Resources: Document, Collection, Set
  • Document operations: Create, Query, Get, Update (PUT/PATCH), Delete
  • Collection operations: List, Delete All (optional where filter)
  • Set operations: List, Delete
  • Designed as Phase 5 of the project plan (n8n integration) for Micro API

Install (Manual)

npm install
npm run build

Link to n8n custom directory:

mkdir -p ~/.n8n/custom
cd ~/.n8n/custom
npm init -y
npm install /absolute/path/to/n8n-nodes-microapi

Restart n8n. The node "Micro API" should appear. Configure credentials with your Micro API Base URL.

Install in Docker (bind mount)

If you run n8n in Docker, bind-mount this folder into the container custom nodes path (build first so dist/ exists):

# Build the node locally
npm install && npm run build

# Example docker run
docker run -it --rm \
  -p 5678:5678 \
  -v "$HOME/.n8n:/home/node/.n8n" \
  -v "/absolute/path/to/n8n-nodes-microapi:/home/node/.n8n/custom/n8n-nodes-microapi" \
  n8nio/n8n

Usage

  • Resource: Document
    • Create → setName, collectionName, documentData (JSON)
    • Query → setName, collectionName, where (JSON), orderBy, limit, offset
    • Get → setName, collectionName, id
    • Update → updateMode (put|patch), setName, collectionName, id, documentData (JSON)
    • Delete → setName, collectionName, id
  • Resource: Collection
    • List → setName
    • Delete All → setName, collectionName, where (JSON, optional)
  • Resource: Set
    • List → (no parameters)
    • Delete → setName

Requests use this.helpers.httpRequest with JSON headers and Base URL from credentials. Expected Micro API response format:

{
  "success": true,
  "data": {},
  "error": null
}

Credentials

  • Name: Micro API
  • Field: API URL (e.g. http://localhost:8080)
  • No authentication required.
  • Common URLs when using Docker:
    • Inside Docker network: http://microapi:8080
    • From host (outside): http://localhost:8080

HTTP endpoint mapping

  • Document
    • Create: POST /{set}/{collection} — body: document JSON
    • Query: GET /{set}/{collection} — qs: where (JSON string), order_by, limit, offset
    • Get: GET /{set}/{collection}/{id}
    • Update (PUT): PUT /{set}/{collection}/{id} — body: document JSON
    • Update (PATCH): PATCH /{set}/{collection}/{id} — body: partial JSON
    • Delete: DELETE /{set}/{collection}/{id}
  • Collection
    • List: GET /{set}
    • Delete All: DELETE /{set}/{collection} — qs: where (JSON string, optional)
  • Set
    • List: GET /_sets
    • Delete: DELETE /{set}

Output behavior

  • Responses unwrap Micro API’s standard wrapper. If response.data exists, that is used.
  • Document Create/Query output one n8n item per returned document.
  • Get/Update/Delete return a single item with the API response (often the document or an ack).

Examples

  • Import the demo workflow: examples/workflows/microapi-demo.json
    1. In n8n, click "Import from File".
    2. Select the JSON file above.
    3. Create credentials "Micro API" and set API URL.
    4. Execute the workflow.

See examples/README.md for a step-by-step guide and tips for running Micro API and n8n (including Docker-based setups).

Development

npm run dev
npm run lint
npm run format

Structure:

  • credentials/MicroApiApi.credentials.ts
  • nodes/MicroApi/MicroApi.node.ts
  • nodes/MicroApi/transport/index.ts
  • nodes/MicroApi/actions/document/*
  • nodes/MicroApi/actions/collection/*
  • nodes/MicroApi/actions/set/*
  • nodes/MicroApi/microapi.svg
  • dist/ (built output published by the package)

Architecture (summary)

  • Node: Micro API with resources document, collection, set.
  • Transport: nodes/MicroApi/transport/index.ts uses Base URL from credentials and this.helpers.httpRequest with JSON.
  • Error handling: throws by default; respects n8n’s "Continue On Fail" setting to output { error: message } instead.
  • Compatibility: n8nNodesApiVersion: 1, built with TypeScript, tested against n8n-workflow ^1.25.0.

License: MIT