node-red-businesscentral 0.1.0
Node-RED node for Microsoft Dynamics 365 Business Central REST APIs
node-red-businesscentral
Node-RED nodes for reading data from Microsoft Dynamics 365 Business Central REST APIs (built-in and custom APIs).
Features
businesscentral-configconfig node for shared connection/auth settings- Tenant ID
- Environment
- Client ID / Client Secret
- Custom API namespaces (
publisher/group/version)
businesscentral-getnode for data retrieval- Dynamic company and endpoint lookup
- Built-in and extension endpoints
- Optional field selection (
$select) - Filter support (
$filter) from config ormsg.filterGroups - Dependency handling for parent/child endpoints (for example sales orders -> sales lines)
businesscentral-filternode to visually buildmsg.filterGroups- Group logic (
and/or) - Conditions and nested groups
- Dynamic templates from incoming message values (
{{msg.payload.id}})
- Group logic (
Installation
Option 1: Install from npm (recommended)
When published:
npm install node-red-businesscentral
Option 2: Install locally for development
From your Node-RED user directory (typically ~/.node-red):
npm install <path-to-this-project>
Then restart Node-RED.
Node-RED Palette Manager
After publishing to npm, this package can be added from Manage palette in Node-RED by searching:
node-red-businesscentral
Quick Start
- Add a
businesscentral-confignode and fill:- Tenant ID
- Environment name
- Client ID / Client Secret
- Add
businesscentral-getand select:- Config node
- Company
- Endpoint
- (Optional) Add
businesscentral-filterbeforebusinesscentral-getto build advanced filters. - Deploy and trigger with an Inject node.
Message contract
Input overrides supported by businesscentral-get:
msg.companymsg.companyNamemsg.endpointmsg.selectedFields(array or comma-separated string)msg.filterGroupsmsg.query(additional query parameters)
Output:
msg.payload- API response rows/objectmsg.statusCode- HTTP statusmsg.bc- metadata (requestUrl,requestId,appliedFilter, endpoint/company context)
Permissions and authentication
The node uses OAuth2 client credentials against Business Central API scope:
https://api.businesscentral.dynamics.com/.default
Ensure your Azure app registration has required Business Central API application permissions with admin consent.
Development
Run tests:
npm test
Packaging checklist
Before publishing:
- Update
package.json:name(must be unique on npm)versionauthorrepository,homepage,bugs
- Verify with:
npm pack
- Publish:
npm publish
License
MIT - see LICENSE.