n8n-nodes-macadress 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +77 -0
- package/dist/credentials/MacadressApi.credentials.js +43 -0
- package/dist/nodes/Macadress/Macadress.node.js +125 -0
- package/dist/nodes/Macadress/Macadress.node.json +18 -0
- package/dist/nodes/Macadress/macadress.svg +16 -0
- package/index.js +1 -0
- package/package.json +64 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Samy Massoud
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# n8n-nodes-macadress
|
|
2
|
+
|
|
3
|
+
An [n8n](https://n8n.io) community node for [macadress.com](https://macadress.com).
|
|
4
|
+
|
|
5
|
+
Enrich a MAC address with its IEEE-registered vendor, an inferred device
|
|
6
|
+
category, virtualization / special-use classification and MAC-randomization
|
|
7
|
+
confidence, from the same lookup that powers the macadress.com API, MCP server
|
|
8
|
+
and website.
|
|
9
|
+
|
|
10
|
+
[Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) · [Output](#output)
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
Community-nodes install (n8n 0.187+):
|
|
15
|
+
|
|
16
|
+
1. **Settings → Community Nodes → Install**
|
|
17
|
+
2. Enter `n8n-nodes-macadress`
|
|
18
|
+
3. Confirm
|
|
19
|
+
|
|
20
|
+
Manual install:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
cd ~/.n8n
|
|
24
|
+
npm install n8n-nodes-macadress
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Credentials
|
|
28
|
+
|
|
29
|
+
Create a **macadress.com API** credential with your API key (starts with `mk_`).
|
|
30
|
+
A free tier is available at https://macadress.com. The optional **Base URL**
|
|
31
|
+
field only needs changing for a self-hosted or proxied endpoint.
|
|
32
|
+
|
|
33
|
+
## Operations
|
|
34
|
+
|
|
35
|
+
| Resource | Operation | API call |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| MAC Address | Lookup | `GET /v1/mac/{mac}` |
|
|
38
|
+
|
|
39
|
+
**MAC Address** accepts colon, hyphen, dot-separated or bare 12-hex-digit input.
|
|
40
|
+
|
|
41
|
+
**Simplify** (default on) returns a curated subset: `mac`, `valid`, `vendor`,
|
|
42
|
+
`country`, `block_type`, `device`, `locally_administered`,
|
|
43
|
+
`potentially_randomized`, `randomization_confidence`, `virtualization`,
|
|
44
|
+
`explanation`. Turn it off to get the full API response.
|
|
45
|
+
|
|
46
|
+
The node is also exposed as a tool for the n8n AI Agent node.
|
|
47
|
+
|
|
48
|
+
## Output
|
|
49
|
+
|
|
50
|
+
Simplified:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"mac": "F0:18:98:11:22:33",
|
|
55
|
+
"valid": true,
|
|
56
|
+
"vendor": "Apple, Inc.",
|
|
57
|
+
"country": "US",
|
|
58
|
+
"block_type": "MA-L",
|
|
59
|
+
"device": "smartphone",
|
|
60
|
+
"locally_administered": false,
|
|
61
|
+
"potentially_randomized": false,
|
|
62
|
+
"randomization_confidence": "none",
|
|
63
|
+
"explanation": "Universally administered unicast address registered to Apple, Inc."
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
An invalid MAC returns HTTP 400; enable **Continue On Fail** on the node to keep
|
|
68
|
+
the workflow running past unparseable values.
|
|
69
|
+
|
|
70
|
+
## Resources
|
|
71
|
+
|
|
72
|
+
- macadress.com API docs: https://macadress.com/api
|
|
73
|
+
- n8n community nodes: https://docs.n8n.io/integrations/community-nodes/
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
[MIT](LICENSE.md)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MacadressApi = void 0;
|
|
4
|
+
class MacadressApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'macadressApi';
|
|
7
|
+
this.displayName = 'macadress.com API';
|
|
8
|
+
this.documentationUrl = 'https://macadress.com/api';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'API Key',
|
|
12
|
+
name: 'apiKey',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'Your macadress.com API key. It starts with "mk_".',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Base URL',
|
|
21
|
+
name: 'baseUrl',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: 'https://api.macadress.com',
|
|
24
|
+
description: 'Change this only if you use a self-hosted or proxied endpoint.',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
this.authenticate = {
|
|
28
|
+
type: 'generic',
|
|
29
|
+
properties: {
|
|
30
|
+
headers: {
|
|
31
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
this.test = {
|
|
36
|
+
request: {
|
|
37
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
38
|
+
url: '/v1/mac/00:00:0C:00:00:00',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.MacadressApi = MacadressApi;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Macadress = void 0;
|
|
4
|
+
class Macadress {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.description = {
|
|
7
|
+
displayName: 'macadress.com',
|
|
8
|
+
name: 'macadress',
|
|
9
|
+
icon: 'file:macadress.svg',
|
|
10
|
+
group: ['transform'],
|
|
11
|
+
version: 1,
|
|
12
|
+
subtitle: '={{ "Lookup: " + $parameter["mac"] }}',
|
|
13
|
+
description: 'Enrich a MAC address with its IEEE-registered vendor, device category, virtualization and MAC-randomization intelligence',
|
|
14
|
+
defaults: {
|
|
15
|
+
name: 'macadress.com',
|
|
16
|
+
},
|
|
17
|
+
usableAsTool: true,
|
|
18
|
+
inputs: ['main'],
|
|
19
|
+
outputs: ['main'],
|
|
20
|
+
credentials: [
|
|
21
|
+
{
|
|
22
|
+
name: 'macadressApi',
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
requestDefaults: {
|
|
27
|
+
baseURL: '={{ $credentials.baseUrl }}',
|
|
28
|
+
headers: {
|
|
29
|
+
Accept: 'application/json',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
properties: [
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Resource',
|
|
35
|
+
name: 'resource',
|
|
36
|
+
type: 'options',
|
|
37
|
+
noDataExpression: true,
|
|
38
|
+
options: [
|
|
39
|
+
{
|
|
40
|
+
name: 'MAC Address',
|
|
41
|
+
value: 'macAddress',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
default: 'macAddress',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Operation',
|
|
48
|
+
name: 'operation',
|
|
49
|
+
type: 'options',
|
|
50
|
+
noDataExpression: true,
|
|
51
|
+
displayOptions: {
|
|
52
|
+
show: {
|
|
53
|
+
resource: ['macAddress'],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
options: [
|
|
57
|
+
{
|
|
58
|
+
name: 'Lookup',
|
|
59
|
+
value: 'lookup',
|
|
60
|
+
action: 'Look up a MAC address',
|
|
61
|
+
description: 'Resolve vendor, device category, virtualization, special-use and randomization for a MAC address',
|
|
62
|
+
routing: {
|
|
63
|
+
request: {
|
|
64
|
+
method: 'GET',
|
|
65
|
+
url: '=/v1/mac/{{ encodeURIComponent($parameter["mac"]) }}',
|
|
66
|
+
},
|
|
67
|
+
output: {
|
|
68
|
+
postReceive: [
|
|
69
|
+
{
|
|
70
|
+
type: 'setKeyValue',
|
|
71
|
+
enabled: '={{ $parameter["simplify"] }}',
|
|
72
|
+
properties: {
|
|
73
|
+
mac: '={{ $responseItem.mac }}',
|
|
74
|
+
valid: '={{ $responseItem.valid }}',
|
|
75
|
+
vendor: '={{ $responseItem.organization }}',
|
|
76
|
+
country: '={{ $responseItem.country }}',
|
|
77
|
+
block_type: '={{ $responseItem.block_type }}',
|
|
78
|
+
device: '={{ $responseItem.device ? $responseItem.device.category : undefined }}',
|
|
79
|
+
locally_administered: '={{ $responseItem.locally_administered }}',
|
|
80
|
+
potentially_randomized: '={{ $responseItem.potentially_randomized }}',
|
|
81
|
+
randomization_confidence: '={{ $responseItem.randomization_confidence }}',
|
|
82
|
+
virtualization: '={{ $responseItem.virtualization && $responseItem.virtualization.detected ? $responseItem.virtualization.platform : undefined }}',
|
|
83
|
+
explanation: '={{ $responseItem.explanation }}',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
default: 'lookup',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
displayName: 'MAC Address',
|
|
95
|
+
name: 'mac',
|
|
96
|
+
type: 'string',
|
|
97
|
+
required: true,
|
|
98
|
+
default: '',
|
|
99
|
+
placeholder: '00:1A:2B:3C:4D:5E',
|
|
100
|
+
description: 'The MAC address to analyse. Colon, hyphen, dot-separated or bare 12-hex-digit formats are all accepted.',
|
|
101
|
+
displayOptions: {
|
|
102
|
+
show: {
|
|
103
|
+
resource: ['macAddress'],
|
|
104
|
+
operation: ['lookup'],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
displayName: 'Simplify',
|
|
110
|
+
name: 'simplify',
|
|
111
|
+
type: 'boolean',
|
|
112
|
+
default: true,
|
|
113
|
+
description: 'Whether to return a curated subset of fields (vendor, device, randomization, ...) instead of the full API response',
|
|
114
|
+
displayOptions: {
|
|
115
|
+
show: {
|
|
116
|
+
resource: ['macAddress'],
|
|
117
|
+
operation: ['lookup'],
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.Macadress = Macadress;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-macadress.macadress",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Utility"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://macadress.com/api"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/samymassoud/n8n-nodes-macadress"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
|
2
|
+
<rect x="16" y="16" width="32" height="32" rx="5" fill="#1F6FEB"/>
|
|
3
|
+
<g stroke="#1F6FEB" stroke-width="4" stroke-linecap="round">
|
|
4
|
+
<path d="M24 16V7M32 16V7M40 16V7"/>
|
|
5
|
+
<path d="M24 57v-9M32 57v-9M40 57v-9"/>
|
|
6
|
+
<path d="M16 24H7M16 32H7M16 40H7"/>
|
|
7
|
+
<path d="M57 24h-9M57 32h-9M57 40h-9"/>
|
|
8
|
+
</g>
|
|
9
|
+
<g fill="#FFFFFF">
|
|
10
|
+
<circle cx="26" cy="26" r="2.6"/>
|
|
11
|
+
<circle cx="38" cy="26" r="2.6"/>
|
|
12
|
+
<circle cx="26" cy="38" r="2.6"/>
|
|
13
|
+
<circle cx="38" cy="38" r="2.6"/>
|
|
14
|
+
<rect x="29.4" y="30.4" width="5.2" height="3.2" rx="1.6"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-macadress",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "n8n community node for macadress.com: enrich a MAC address with its IEEE-registered vendor, an inferred device category, virtualization / special-use classification and MAC-randomization confidence.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"n8n",
|
|
8
|
+
"macadress",
|
|
9
|
+
"mac-address",
|
|
10
|
+
"oui",
|
|
11
|
+
"mac-vendor",
|
|
12
|
+
"device-fingerprint",
|
|
13
|
+
"enrichment"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"homepage": "https://github.com/samymassoud/n8n-nodes-macadress",
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Samy Massoud",
|
|
19
|
+
"email": "samymassoud@gmail.com"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/samymassoud/n8n-nodes-macadress.git"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=20.15"
|
|
27
|
+
},
|
|
28
|
+
"main": "index.js",
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "npx rimraf dist && tsc && gulp build:assets",
|
|
31
|
+
"dev": "tsc --watch",
|
|
32
|
+
"format": "prettier nodes credentials --write",
|
|
33
|
+
"lint": "eslint nodes credentials package.json",
|
|
34
|
+
"lintfix": "eslint nodes credentials package.json --fix",
|
|
35
|
+
"prepublishOnly": "npm run build && eslint -c .eslintrc.prepublish.js nodes credentials package.json"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist"
|
|
39
|
+
],
|
|
40
|
+
"n8n": {
|
|
41
|
+
"n8nNodesApiVersion": 1,
|
|
42
|
+
"credentials": [
|
|
43
|
+
"dist/credentials/MacadressApi.credentials.js"
|
|
44
|
+
],
|
|
45
|
+
"nodes": [
|
|
46
|
+
"dist/nodes/Macadress/Macadress.node.js"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@typescript-eslint/parser": "~8.32.0",
|
|
54
|
+
"eslint": "^8.57.0",
|
|
55
|
+
"eslint-plugin-n8n-nodes-base": "^1.16.3",
|
|
56
|
+
"gulp": "^5.0.0",
|
|
57
|
+
"prettier": "^3.5.3",
|
|
58
|
+
"rimraf": "^5.0.5",
|
|
59
|
+
"typescript": "^5.8.2"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"n8n-workflow": "*"
|
|
63
|
+
}
|
|
64
|
+
}
|