n8n-nodes-trunkrs
v0.1.0
Published
n8n community nodes for the Trunkrs Client API v2 (shipments, time slots, serviceable areas, webhooks)
Maintainers
Readme
n8n-nodes-trunkrs
n8n community nodes for the Trunkrs Client API v2. Covers the complete API surface: shipments, time slots, serviceable areas and webhooks, plus a trigger node for Trunkrs webhook events.
Installation
Follow the installation guide in the n8n community nodes documentation:
Settings → Community Nodes → Install and enter n8n-nodes-trunkrs.
Credentials
Create a Trunkrs API credential:
| Field | Description |
| --- | --- |
| API Key | Your Trunkrs API key, sent as the x-api-key header |
| Environment | Production (https://api.trunkrs.nl/api/v2) or Staging (https://staging-api.trunkrs.nl/api/v2) |
Nodes
Trunkrs
| Resource | Operation | Endpoint |
| --- | --- | --- |
| Shipment | Create | POST /shipments |
| Shipment | Get | GET /shipments/{trunkrsNr} |
| Shipment | Get Many | GET /shipments (with pagination and sorting) |
| Shipment | Cancel | DELETE /shipments/{trunkrsNr} |
| Shipment | Get State | GET /shipments/{trunkrsNr}/state |
| Shipment | Get Status | GET /shipments/{trunkrsNr}/status |
| Time Slot | Get Many | GET /timeslots/ |
| Service | Check Serviceable Area | GET /serviceable-areas |
| Webhook | Create | POST /webhooks |
| Webhook | Get | GET /webhooks/{webhookId} |
| Webhook | Get Many | GET /webhooks |
| Webhook | Delete | DELETE /webhooks/{webhookId} |
| Webhook | Test | POST /webhooks/{webhookId}/test |
Shipment Create supports the full request body: recipient, optional sender, multiple parcels (multi-colli) with weight, size and contents, time slot selection, service level (SAME_DAY / SAME_DAY_FROZEN_FOOD) and all feature codes (no neighbour delivery, no signature, mailbox delivery, max delivery attempts, max time outside freezer, proof of delivery, age check).
Trunkrs Trigger
Subscribes to Trunkrs webhook events and starts the workflow when they fire:
onStateUpdate— shipment state changedonCreation— shipment createdonCancellation— shipment cancelledonReview— review received
The trigger registers one webhook subscription per selected event when the workflow is activated and removes them on deactivation. The authentication token Trunkrs generates on subscription is stored and incoming calls are validated against it (can be disabled in the node options). Trunkrs may batch multiple events per call; by default the trigger emits one item per event.
Notes
GET /shipments/{trunkrsNr}, state/status and time slot endpoints are rate limited to 10 requests per second by Trunkrs.- The Get State operation targets the legacy
/stateendpoint, which Trunkrs documents as returning an incorrect response on production. Prefer Get Status. - Order references must be globally unique; Trunkrs recommends prefixing them with your company name.
Development
npm install
npm run build # compiles TypeScript to dist/ and copies iconsLink into a local n8n instance with npm link or copy into ~/.n8n/custom/.
License
MIT
