pharmarp

n8n community nodes for PharmARP POS — a Payment Confirmed trigger (v1).

Package Information

Released: 2 mo ago
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.0

Documentation

n8n-nodes-pharmarp

Custom n8n community nodes for PharmARP POS. Once installed, "PharmARP" shows
up in n8n's node picker (the + button) like any built-in integration.

What's in the box (v1)

File What it is
nodes/PharmArpTrigger/ PharmARP Trigger node — a webhook trigger with a Payment Confirmed event. This is what appears in the picker.
credentials/PharmArpApi.credentials.ts PharmARP API credential (base URL + POS user). Not needed by the v1 trigger; wired up for v2 and future action nodes.

v1 is a "branded webhook": the trigger exposes a fixed n8n webhook URL that you
paste into the PharmARP backend once. v2 will auto-register that URL when a
workflow is activated (needs the backend /v1/webhooks/subscriptions endpoints,
not built yet) — same node, extra methods.

Prerequisites

  • Node.js ≥ 18 with npm (only for building the package).
  • Your PharmARP backend running the simple sale.confirmed webhook
    (EVENTS_WEBHOOK_ENABLED / EVENTS_WEBHOOK_URL).

Build

cd n8n/nodes-pharmarp
npm install
npm run build      # compiles TypeScript → dist/ and copies the icon

Install into n8n — two ways

A) Local development (fastest to see it work)

n8n loads nodes from ~/.n8n/custom. On a machine running n8n directly:

npm run build
mkdir -p ~/.n8n/custom
cd ~/.n8n/custom && npm init -y
npm install /absolute/path/to/n8n/nodes-pharmarp
# restart n8n

Search the node picker for PharmARP — the trigger should appear.

B) Bake into your Coolify n8n (production path)

Because you deploy each customer's n8n, build a custom image with the node
pre-installed. A ready-to-use two-stage Dockerfile is included.

In your n8n stack's n8n/docker-compose.yaml, replace the n8n service's
image: line with a build: that points at this folder:

  n8n:
    # image: n8nio/n8n:latest        # <-- remove
    build:
      context: ./nodes-pharmarp      # path to this folder from the compose file
      dockerfile: Dockerfile
    # ...everything else stays the same

Redeploy in Coolify. The node ships inside the image — nothing to install per
customer.

Note: n8n's Settings → Community Nodes UI installer only works with packages
published to a public npm registry. Since this package is private, use path A
(dev) or B (bake into image).

Use it

  1. New workflow → + → search PharmARP → add PharmARP Trigger.
  2. Leave Event on Payment Confirmed.
  3. Copy the node's Production URL (shown at the top of the node panel).
  4. In the PharmARP backend config set:
    EVENTS_WEBHOOK_ENABLED=true
    EVENTS_WEBHOOK_URL=<the Production URL you copied>
    
    Redeploy the backend.
  5. Activate the workflow. Confirm a sale in the POS — the workflow runs with
    the sale.confirmed payload (invoice number, store, cashier, payment breakdown).

The Ignore Other Events toggle lets one URL safely receive several event types
later — the trigger only fires on payloads whose event matches the dropdown.

Roadmap

  • v2: webhookMethods auto-registration against POST /v1/webhooks/subscriptions
    (activate = subscribe, deactivate = unsubscribe); HMAC signature verification;
    tenant_id display.
  • Action nodes: "Get Session Statistics", "Get Low Stock", etc., using the
    PharmArpApi credential — turning the daily-summary workflow into a couple of
    clicks.

Discussion