Node-RED nodes for visually orchestrating [MultiFlexi](https://multiflexi.eu/) processes
Find a file
CyberVitexus 92e036f868 Treat Node-RED as flow designer with Deploy sync to MultiFlexi.
Add flowSync on flows:started, designOnly runtemplates by default, identity stamp nodes, and rewrite Payment Confirmation as an eventor-executed graph.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 00:16:27 +02:00
debian Treat Node-RED as flow designer with Deploy sync to MultiFlexi. 2026-09-21 00:16:27 +02:00
examples Treat Node-RED as flow designer with Deploy sync to MultiFlexi. 2026-09-21 00:16:27 +02:00
multiflexi Treat Node-RED as flow designer with Deploy sync to MultiFlexi. 2026-09-21 00:16:27 +02:00
test Treat Node-RED as flow designer with Deploy sync to MultiFlexi. 2026-09-21 00:16:27 +02:00
.gitignore feat: render catalog icons from MultiFlexi web image endpoints 2026-06-12 14:51:28 +02:00
node-red-contrib-multiflexi.svg Logo update 2026-06-11 21:45:11 +02:00
package.json Treat Node-RED as flow designer with Deploy sync to MultiFlexi. 2026-09-21 00:16:27 +02:00
README.md Treat Node-RED as flow designer with Deploy sync to MultiFlexi. 2026-09-21 00:16:27 +02:00

node-red-contrib-multiflexi

node-red-contrib-multiflexi logo Packaging: deb

Node-RED nodes for designing MultiFlexi automation graphs. On Deploy, executable Multiflexi nodes are synced to MultiFlexi (POST /flow/). multiflexi-eventor executes the stored graph (map, branch, schedule jobs) — Node-RED does not need to stay in the runtime path.

Nodes

Node Role Direction
multiflexi-config Optional remote connection; registers Deploy → flow sync. Hosted installs use MULTIFLEXI_URL + MULTIFLEXI_API_TOKEN —
multiflexi-event Flow trigger (evidence/operation); also receives debug pushes design → MultiFlexi
multiflexi-runtemplate RunTemplate identity (default Design only; no POST /job/) design → MultiFlexi
multiflexi-company Stamps a company onto the message (pick id/name in settings) filter
multiflexi-application Stamps an application onto the message (pick uuid/name in settings) filter
multiflexi-credential Stamps a credential onto the message (pick id/name in settings) filter
multiflexi-artifact Artifact refs for @file: mapping filter
multiflexi-catalog Receives the MultiFlexi config catalog; caches it for editor autosuggest MultiFlexi → Node-RED
multiflexi-map Field mapping synced into flow_node.config for eventor design → MultiFlexi

Also executable after sync: Node-RED switch, delay, link in/out, catch.

The palette stays short: only these generic nodes. After you place a node on the canvas, choose its identity (RunTemplate, company, application, credential) in the edit dialog via autosuggest from the MultiFlexi catalog.

Node icons (identity)

When you pick an identity in the editor, the node icon updates for quick visual recognition on the canvas:

Node Icon source
multiflexi-company Company logo (companylogo.php?id=)
multiflexi-application Application image (appimage.php?uuid=)
multiflexi-credential Credential-type / prototype logo (credentialimage.php?id=)
multiflexi-runtemplate Diagonal composite: company logo underneath, application icon on top (ImageMagick)

Icons are fetched from the MultiFlexi web UI, cached under the package multiflexi/icons/ directory, and stored on the node as iconFile. Hosted installs should set:

MULTIFLEXI_APP_URL=http://127.0.0.1/multiflexi/
# When Apache has multiple vhosts, force the Host header for loopback fetches:
MULTIFLEXI_APP_HOST=vyvojar.example.com

RunTemplate composites need imagemagick (convert) on the Node-RED host.

Hosted MultiFlexi (session-bound)

When Node-RED is installed next to MultiFlexi:

  1. Set MULTIFLEXI_URL and MULTIFLEXI_API_TOKEN on the Node-RED process (service account bearer token). Flow nodes call the API with that identity — no per-node URL/password.
  2. Point adminAuth at multiflexi/multiflexi-auth.js so editor login is validated against MultiFlexi. Autosuggest then loads GET /nodered/catalog.json filtered by the user's company_user / RBAC.
  3. Tick Record me as launcher on a run-template node for explicit ad-hoc runs (launched_by = your user). Leave it off for automated event→job flows (service account remains the launcher).

Data flow

abraflexi-webhook-acceptor → changes_cache
            │ (poll)
   multiflexi-eventor daemon ──HTTP POST──▶ [multiflexi-event] ──▶ [multiflexi-runtemplate] ──HTTP──▶ MultiFlexi API
            │ (poll finished jobs)
            └─────────────────HTTP POST──▶ [multiflexi-event:job.completed] ─▶ [multiflexi-artifact] ─▶ [multiflexi-runtemplate]

Setup

Install one of two ways:

Debian package (recommended) — installs to /usr/share/nodejs/node-red-contrib-multiflexi:

sudo apt install node-red-contrib-multiflexi
sudo systemctl restart node-red

From source into your Node-RED user directory (~/.node-red):

cd ~/.node-red
npm install /path/to/node-red-contrib-multiflexi
node-red-restart   # or restart Node-RED

Then configure the multiflexi-eventor daemon to forward events (/etc/multiflexi/multiflexi.env):

NODERED_WEBHOOK_URL=http://YOUR-NODE-RED:1880/multiflexi-event
NODERED_FORWARD_CHANGES=true
NODERED_TOKEN=shared-secret-required
NODERED_CATALOG_URL=http://YOUR-NODE-RED:1880/multiflexi-catalog

On the Node-RED host:

MULTIFLEXI_URL=http://127.0.0.1/multiflexi/api
MULTIFLEXI_API_TOKEN=<token from multiflexi-cli token:generate --login svc-nodered>
MULTIFLEXI_APP_URL=http://127.0.0.1/multiflexi/

And in settings.js:

adminAuth: require('node-red-contrib-multiflexi/multiflexi/multiflexi-auth'),

For standalone Node-RED talking to a remote MultiFlexi, add a multiflexi-config node instead of the env vars above.

Catalog feed (autosuggest data)

Drop a multiflexi-catalog node into a flow and set NODERED_CATALOG_URL on the multiflexi-eventor daemon to that node's path (default /multiflexi-catalog). The daemon pushes companies, enabled run-templates and credentials; the catalog node caches them for the editor autosuggest on generic nodes. It does not create one palette entry per entity.

Identity icons are resolved on demand when you select an entity in the editor (GET /multiflexi/icon/:kind) from the public MultiFlexi image endpoints (companylogo.php, appimage.php, credentialimage.php).

Example

examples/payment-confirmation.flow.json wires:

  • Payment received (webhook.change, evidence banka/create) → Payment Receipt Confirmation RunTemplate.
  • Job completed → JSON output artifact filter → Data consumer RunTemplate (output chaining).

License

MIT