n8n-nodes-surface 0.0.0-stage → 0.1.1
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
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Canada Site Ops
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
package/README.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
-
#
|
|
1
|
+
# n8n-nodes-surface
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Surface checks a short link before your agent opens it. The answer is fetch or skip. It never returns the page. A hop or a 1×1 pixel counts the same way, with no install. Free for the first million requests a month. https://nova-otter-delta-cloud.grok.me
|
|
4
|
+
|
|
5
|
+
The **Surface Preflight** node is usable as an n8n AI Agent tool. It unwraps short links (t.co, bit.ly, lnkd.in, youtu.be), follows redirects, and answers `fetch` or `skip`, without returning the page.
|
|
6
|
+
|
|
7
|
+
Surface by Canada Site Ops. Ontario, Canada.
|
|
8
|
+
|
|
9
|
+
## Get a free API key in about 10 seconds
|
|
10
|
+
|
|
11
|
+
No email, no card. Then paste the key into the **Surface API** credential (`apiKey`). n8n sends it as `Authorization` / `X-Surface-Key`.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
curl -s -X POST https://nova-otter-delta-cloud.grok.me/v1/keys
|
|
15
|
+
# returns {"key","created_at","free_monthly":1000000,"usage_url"}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
A key gets its own million free requests a month. The node also runs without a key on a shared demo limit.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
In n8n: **Settings → Community Nodes → Install** → `n8n-nodes-surface`.
|
|
23
|
+
|
|
24
|
+
## Output
|
|
25
|
+
|
|
26
|
+
`{ next: "fetch" | "skip", fetch, url, final_url, final_host, status, redirects, shortener, reason }`. On error it answers `skip`.
|
|
27
|
+
|
|
28
|
+
## Prefer MCP?
|
|
29
|
+
|
|
30
|
+
Mint a key first, then point any MCP client at `https://nova-otter-delta-cloud.grok.me/mcp` (tool `preflight_url`) with `Authorization: Bearer <key>`.
|
|
31
|
+
|
|
32
|
+
## Also listed
|
|
33
|
+
|
|
34
|
+
- Official MCP Registry: `me.grok.nova-otter-delta-cloud/surface`
|
|
35
|
+
- https://smithery.ai/servers/canada-site-ops/surface
|
|
36
|
+
- https://www.curatedmcp.com/marketplace/surface
|
|
37
|
+
- https://www.npmjs.com/package/n8n-nodes-surface
|
|
38
|
+
- https://www.npmjs.com/package/@surfaceapi/surface
|
|
39
|
+
- https://pypi.org/project/surfaceapi/
|
|
40
|
+
- https://huggingface.co/spaces/surfaceapi/surface-preflight
|
|
41
|
+
|
|
42
|
+
CLI and GitHub Action are coming soon.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SurfaceApi = void 0;
|
|
4
|
+
class SurfaceApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = "surfaceApi";
|
|
7
|
+
this.displayName = "Surface API";
|
|
8
|
+
this.documentationUrl = "https://nova-otter-delta-cloud.grok.me";
|
|
9
|
+
this.properties = [
|
|
10
|
+
{ displayName: "API Key", name: "apiKey", type: "string", typeOptions: { password: true }, default: "",
|
|
11
|
+
description: "Get a free key in about 10 seconds (no email, no card): POST https://nova-otter-delta-cloud.grok.me/v1/keys — then paste it here. Anonymous calls share a demo limit." },
|
|
12
|
+
{ displayName: "Base URL", name: "baseUrl", type: "string", default: "https://nova-otter-delta-cloud.grok.me" },
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.SurfaceApi = SurfaceApi;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SurfacePreflight = void 0;
|
|
4
|
+
const DEFAULT_BASE_URL = "https://nova-otter-delta-cloud.grok.me";
|
|
5
|
+
class SurfacePreflight {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: "Surface Preflight",
|
|
9
|
+
name: "surfacePreflight",
|
|
10
|
+
icon: "file:surface.svg",
|
|
11
|
+
group: ["transform"],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: "={{$parameter[\"url\"]}}",
|
|
14
|
+
description: "Check a link before you open it: unwraps short links, follows redirects, answers fetch or skip without returning the page.",
|
|
15
|
+
defaults: { name: "Surface Preflight" },
|
|
16
|
+
inputs: ["main"],
|
|
17
|
+
outputs: ["main"],
|
|
18
|
+
usableAsTool: true,
|
|
19
|
+
credentials: [{ name: "surfaceApi", required: false }],
|
|
20
|
+
properties: [
|
|
21
|
+
{ displayName: "URL", name: "url", type: "string", default: "", required: true, placeholder: "https://t.co/abc123",
|
|
22
|
+
description: "The link to check before fetching it" },
|
|
23
|
+
{ displayName: "On Error Answer Skip", name: "skipOnError", type: "boolean", default: true,
|
|
24
|
+
description: "Whether to return next=skip instead of failing when Surface cannot be reached" },
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
async execute() {
|
|
29
|
+
const items = this.getInputData();
|
|
30
|
+
const out = [];
|
|
31
|
+
let creds = {};
|
|
32
|
+
try { creds = (await this.getCredentials("surfaceApi")) || {}; } catch (e) { creds = {}; }
|
|
33
|
+
const base = String(creds.baseUrl || DEFAULT_BASE_URL).replace(/\/$/, "");
|
|
34
|
+
for (let i = 0; i < items.length; i++) {
|
|
35
|
+
const url = this.getNodeParameter("url", i);
|
|
36
|
+
const skipOnError = this.getNodeParameter("skipOnError", i, true);
|
|
37
|
+
try {
|
|
38
|
+
const headers = { "content-type": "application/json", accept: "application/json", "user-agent": "n8n-nodes-surface/0.1.0" };
|
|
39
|
+
if (creds.apiKey) headers.authorization = "Bearer " + creds.apiKey;
|
|
40
|
+
if (process.env.SURFACE_INTERNAL === "1") headers["X-Surface-Internal"] = "1";
|
|
41
|
+
const d = await this.helpers.httpRequest({ method: "POST", url: base + "/v1/preflight", headers, body: { url }, json: true, timeout: 15000 });
|
|
42
|
+
const next = d.next || d.verdict;
|
|
43
|
+
out.push({ json: { next, fetch: next === "fetch", url: d.url || url, final_url: d.final_url, final_host: d.final_host,
|
|
44
|
+
status: d.status, redirects: d.redirects, shortener: d.shortener, reason: d.reason }, pairedItem: { item: i } });
|
|
45
|
+
} catch (e) {
|
|
46
|
+
if (!skipOnError && !this.continueOnFail()) throw e;
|
|
47
|
+
out.push({ json: { next: "skip", fetch: false, url, error: String((e && e.message) || e) }, pairedItem: { item: i } });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return [out];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.SurfacePreflight = SurfacePreflight;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="12" fill="#0f766e"/><path d="M20 34l8 8 16-20" stroke="#fff" stroke-width="6" fill="none" stroke-linecap="round"/></svg>
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-surface",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Surface checks a short link before your agent opens it. The answer is fetch or skip. It never returns the page. n8n Surface Preflight node. Free for the first million requests a month.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"n8n",
|
|
8
|
+
"surface",
|
|
9
|
+
"link-safety",
|
|
10
|
+
"url",
|
|
11
|
+
"preflight",
|
|
12
|
+
"ai-agents",
|
|
13
|
+
"redirect",
|
|
14
|
+
"short-links"
|
|
15
|
+
],
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Canada Site Ops",
|
|
18
|
+
"email": "canada.site.ops@gmail.com"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"homepage": "https://nova-otter-delta-cloud.grok.me",
|
|
22
|
+
"main": "index.js",
|
|
23
|
+
"files": [
|
|
24
|
+
"index.js",
|
|
25
|
+
"dist",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"n8n": {
|
|
30
|
+
"n8nNodesApiVersion": 1,
|
|
31
|
+
"credentials": [
|
|
32
|
+
"dist/credentials/SurfaceApi.credentials.js"
|
|
33
|
+
],
|
|
34
|
+
"nodes": [
|
|
35
|
+
"dist/nodes/SurfacePreflight/SurfacePreflight.node.js"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"n8n-workflow": "*"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
}
|
|
47
|
+
}
|