n8n-nodes-plug-database-advanced
v2.0.0
Published
Plug Database n8n nodes with REST and consumer socket support
Downloads
1,375
Maintainers
Readme
n8n-nodes-plug-database-advanced
![]()
n8n-nodes-plug-database-advanced is the advanced Plug Database package for n8n.
Installation
npm install n8n-nodes-plug-database-advancedWhat this package adds
Channel = REST | Socket- consumer socket execution through
/consumers Chunk Itemsoutput mode for socket streams- client-to-agent access management over REST
- automatic capability probe for
agents:command, with silent relay fallback for older saved workflows - HTML-to-PDF generation for workflow documents
- QR code and barcode generation as n8n binary data
Included nodes
Plug Database Advanced- consolidated node with
Resource = SQL | Client Access | User Access | Tools
- consolidated node with
Plug Database Advanced PDFandPlug Database Advanced Barcode- hidden compatibility tool nodes
Plug Database Advanced Socket Event Trigger- listens for
client:custom.*events orclient:agent.profile.updated
- listens for
Plura.ai Automations Trigger- receives webhook events when a Plura.ai automation node executes
Supported operations
Resource = SQL:
Validate ContextExecute SQLExecute BatchCancel SQLDiscover RPCGet Agent ProfileGet Client Token Policy
Resource = Client Access:
List Client AgentsGet Client AgentList Access RequestsRequest Agent AccessRevoke Agent AccessGet Client TokenSet Client Token
Resource = User Access:
List Agent CatalogList Access RequestsApprove Access RequestReject Access RequestList Agent ClientsRevoke Agent Client Access
Resource = Tools:
- Documents:
HTML to PDF,Markdown to PDF,Text to PDF,Merge PDFs,Split PDF,Extract PDF Text - Images:
Resize Image,Convert Image,Compress Image,Add Image Watermark,Create Thumbnail - Code and identity:
Generate Barcode,Read Barcode,Validate CPF/CNPJ,Format CPF/CNPJ,Generate UUID - Data:
Transform JSON,CSV to JSON,JSON to CSV,Normalize Text,Extract Regex Fields,Validate JSON Schema - Security:
Generate Hash,HMAC Sign,Base64 Encode/Decode,JWT Decode,Encrypt Text,Decrypt Text - Dates and values:
Format Date,Parse Date,Add Business Days,Format Currency,Number to Words - Plug-specific:
Build Socket Event Payload,Validate Client Token,Validate Agent Context,Build SQL Request,Parse SQL Rows,Generate Access Request Summary Publish Socket Eventover REST or SocketWait for Socket Eventas a one-shot/consumerslistener for the first matchingclient:custom.*event
Plug Database Advanced Socket Event Trigger:
Custom EventsAgent Profile Updated
Plura.ai Automations Trigger:
WorkspaceJourneyAutomation Node
Credentials
Plug Database Account API asks for:
User (email)Password- optional
Default Agent ID - optional
Default Client Token - optional
Payload Signing Key - optional
Payload Signing Key ID
The SQL node can override Agent ID and Client Token per node. Resolution order is:
- node field
- credential default
- validation error only when the selected operation requires the missing value
The package uses the fixed API base URL:
https://plug-server.se7esistemassinop.com.br/api/v1
Plura.ai Automations API asks for:
EmailPassword- optional
API Key
The Plura.ai trigger uses the email and password to load Workspace, Journey, and Automation Node options, then registers the n8n webhook with Plura.ai when the workflow is activated.
Output modes
Aggregated JSONChunk ItemsRaw JSON-RPC- optional
Include Plug Metadata
Both access nodes also support:
Return Allfor paginated listing operations- standardized summary items with
success,operation,resourceType,resourceId/resourceIds, andraw
Notes
- this package is published to npm but is not intended for n8n verification
- it includes runtime dependencies for consumer socket transport, PDF rendering, and QR/barcode generation
Quick examples
- Use
Plug Database AdvancedwithResource = Client Accessto manage approved client agents and per-agent client tokens over REST. - Use
Plug Database AdvancedwithResource = User Accessto browse the agent catalog and approve or reject client access requests. - Use
Plug Database AdvancedwithResource = SQLand credential defaults for the common target, then overrideAgent IDorClient Tokenonly in the socket or REST steps that need a different agent. - Use
Plug Database AdvancedwithResource = SQLwhen the workflow needs consumer socket execution orChunk Itemson SQL execution.
Socket compatibility
- New executions with
Resource = SQLandChannel = Socketpreferagents:commandon/consumers. - Older saved advanced workflows that were already using relay remain compatible without adding a new user-facing option.
- When the server does not answer the newer consumer socket transport, the runtime falls back to relay for single-command flows.
Execute Batchover socket requiresagents:command; when the server does not support it, useRESTor upgrade the server.- Large socket streams are protected by local buffer guardrails so the node fails clearly instead of letting memory grow without bounds.
- Custom Socket Events can be published over REST or Socket. REST is the compatible default; Socket uses
/consumers,socket:event.publish, andsocket:event.publishedACK correlation. Wait for Socket Eventuses/consumers,socket:event.subscribe, and best-effort unsubscribe for inline workflow steps that need a single event instead of a trigger.- Wait operations have separate timeout phases:
Socket ACK Timeout (MS)for connection/control ACKs andListen Timeout (MS)for the first matching event after subscribe, capped at 300000 ms. - Custom Socket Event attachments are locally checked against the server defaults: 5 files, 512 KiB per file, 2 MiB total, and 512 KiB payload JSON.
- The event Trigger supports queue/backpressure controls, optional per-source required PayloadFrame signatures, eventId deduplication, a configurable reconnect circuit breaker, and the internal
client:agent.profile.updatedpush.
Tool nodes
Plug Database Advanced PDF uses Browser Channel = Auto by default. Auto uses the Chromium browser downloaded by @playwright/browser-chromium during package installation, so Google Chrome is not required for the default PDF flow. If the Playwright-managed browser is unavailable, Auto also checks common installed Chrome/Chromium paths.
Do not install this package with npm scripts disabled, and do not set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1, unless your image provides a browser another way. If your deployment blocks Playwright browser downloads or runs offline, install Chromium in the image and set Browser Executable Path or PLUG_TOOLS_BROWSER_EXECUTABLE_PATH to the executable path. PLUG_TOOLS_CHROME_EXECUTABLE_PATH is still supported as a compatibility alias.
Example Debian-based Docker layer:
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends chromium \
&& rm -rf /var/lib/apt/lists/*
ENV PLUG_TOOLS_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium
USER nodeFor Alpine-based images, use apk add --no-cache chromium and set PLUG_TOOLS_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium-browser when that is the installed executable path. To force Google Chrome or Microsoft Edge instead of Auto, set Browser Channel explicitly to Chrome or Microsoft Edge.
To smoke-test the real browser runtime locally or in a deployment image, run the test suite with PLUG_TEST_REAL_PDF=1. The smoke test is skipped by default because it launches Chromium and writes a real PDF buffer.
For safety, the PDF node accepts HTML strings only, supports optional CSS injection, disables JavaScript by default, blocks external network requests, and always blocks file: URLs. It also exposes PDF Media, Wait Until, Render Delay (ms), Max HTML Size Bytes, and Max PDF Output Size Bytes controls for larger templates.
Deployment owners can enforce tighter upper bounds with:
PLUG_TOOLS_MAX_HTML_SIZE_BYTESPLUG_TOOLS_MAX_PDF_OUTPUT_SIZE_BYTESPLUG_TOOLS_MAX_BARCODE_TEXT_SIZE_BYTESPLUG_TOOLS_MAX_BARCODE_OUTPUT_SIZE_BYTES
Plug Database Advanced Barcode uses @bwip-js/node and supports QR Code, Code 128, EAN, UPC, Data Matrix, PDF417, and Aztec output. EAN and UPC inputs are validated before rendering. PNG and SVG binary output include optional metadata with size and duration, and QR/barcode output can also be emitted as JSON base64 when needed. Use Metadata Property and Base64 Output Property when the default JSON fields would collide with upstream item fields.
Use n8n's built-in Compression, Convert to File, and Extract From File nodes for gzip, base64, and generic file conversion.
Do not treat simultaneous installation of n8n-nodes-plug-database and n8n-nodes-plug-database-advanced as a supported compatibility target. The advanced package carries the full authenticated Plug surface plus socket support.
