Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@processlink/node-red-contrib-processlink) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Node-RED Integration
Connect your Node-RED flows to the Process Link platform
Overview
Connect your Node-RED flows to the Process Link platform. Upload files, send notifications, and integrate with industrial automation systems.
Available Nodes
| Node | Description |
|---|---|
| files upload | Upload files to Process Link Files API |
More nodes coming soon: mail, downtime logging, notes
Installation
Via Node-RED Palette Manager (Recommended)
- Open Node-RED
- Go to Menu → Manage palette → Install
- Search for
@processlink/node-red-contrib-processlink - Click Install
Via npm
cd ~/.node-red
npm install @processlink/node-red-contrib-processlinkThen restart Node-RED.
Quick Start
1. Get Your Credentials
- Log in to the Process Link Portal
- Go to Developer → API Keys
- Click Generate API Key
- Copy your Site ID and API Key
2. Add and Configure a Node
- Find the files upload node in the palette under "Process Link"
- Drag it into your flow
- Double-click to configure
- Click the pencil icon next to "Config"
- Enter your Site ID and API Key
- Click Add, then Done
3. Connect Your Flow
[File In] → [files upload] → [Debug]Node Reference
Files Upload
Uploads files to the Process Link Files API.
Configuration
| Property | Description |
|---|---|
| Config | Your Process Link credentials (Site ID + API Key) |
| Filename | Default filename (optional, can be set via msg.filename) |
| Timeout | Request timeout in milliseconds (default: 30000) |
Inputs
| Property | Type | Description |
|---|---|---|
msg.payload |
Buffer | string | The file content to upload |
msg.filename |
string | (Optional) Filename to use |
Outputs
| Property | Type | Description |
|---|---|---|
msg.payload |
object | API response with ok, file_id, created_at |
msg.file_id |
string | The UUID of the uploaded file |
msg.statusCode |
number | HTTP status code (201 on success) |
Status Indicators
| Color | Meaning |
|---|---|
| 🟡 Yellow | Uploading in progress |
| 🟢 Green | Upload successful |
| 🔴 Red | Error occurred |
Example Flow (Copy & Import)
Copy the JSON below and import it into Node-RED: Menu → Import → Clipboard
[
{
"id": "pl-inject",
"type": "inject",
"z": "",
"name": "Upload File",
"props": [],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 110,
"y": 100,
"wires": [["pl-file-in"]]
},
{
"id": "pl-file-in",
"type": "file in",
"z": "",
"name": "Read File",
"filename": "/tmp/myfile.csv",
"filenameType": "str",
"format": "",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": true,
"x": 270,
"y": 100,
"wires": [["pl-upload"]]
},
{
"id": "pl-upload",
"type": "processlink-files-upload",
"z": "",
"name": "Upload to Process Link",
"server": "",
"filename": "",
"timeout": "30000",
"apiUrl": "https://files.processlink.com.au/api/upload",
"x": 470,
"y": 100,
"wires": [["pl-debug"]]
},
{
"id": "pl-debug",
"type": "debug",
"z": "",
"name": "Result",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 650,
"y": 100,
"wires": []
}
]After importing:
- Double-click the Read File node → change the file path to your file
- Double-click the Upload to Process Link node → click the pencil icon → enter your Site ID and API Key
- Click Deploy
- Click the inject button to upload
Dynamic Filename
Use a Function node to set the filename dynamically:
msg.filename = "report-" + new Date().toISOString().split('T')[0] + ".csv";
return msg;Upload with Error Handling
[File In] → [files upload] → [Switch] → [Debug (success)]
↘ [Debug (error)]Use a Switch node to route based on msg.statusCode:
- Route 1:
msg.statusCode == 201(success) - Route 2: Otherwise (error)
Error Handling
| Status Code | Meaning | Solution |
|---|---|---|
| 201 | Success | File uploaded successfully |
| 400 | Bad Request | Check that payload is a valid file buffer |
| 401 | Unauthorized | Verify your API key is correct |
| 403 | Forbidden | Enable API access in site settings |
| 404 | Not Found | Verify your Site ID is correct |
| 429 | Rate Limited | Max 30 uploads/minute per site |
| 507 | Storage Full | Contact administrator to increase storage |
Rate Limits
- 30 uploads per minute per site
- Exceeding the limit returns a 429 status code
- Implement retry logic in your flow for high-volume uploads
Security
- ✅ API keys are stored encrypted by Node-RED
- ✅ All communication uses HTTPS
- ✅ Keys are never logged or exposed in flow exports
Requirements
- Node-RED >= 2.0.0
- Node.js >= 14.0.0
Support
- 📖 Documentation: GitHub Wiki
- 🐛 Issues: GitHub Issues
- 📧 Email: support@processlink.com.au
- 🌐 Website: processlink.com.au
Contributing
Contributions are welcome! Please read our Contributing Guide before submitting a pull request.