@youdotcom-oss/n8n-nodes-youdotcom 0.2.5 → 0.2.6

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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 You.com
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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # n8n-nodes-youdotcom
2
2
 
3
- An n8n community node for integrating [You.com APIs](https://you.com/apis) into your n8n workflows. Search the web, extract content from URLs, or get AI-powered answers with citations.
3
+ An n8n community node for integrating [You.com APIs](https://you.com/apis) into your n8n workflows. Search the web and extract content from URLs.
4
4
 
5
5
  ## Installation
6
6
 
@@ -67,21 +67,6 @@ Extract content from one or more URLs. Returns clean text, HTML, or structured m
67
67
  - **HTML** - Full HTML with layout preserved
68
68
  - **Metadata** - Structured data (JSON-LD, OpenGraph, Twitter Cards)
69
69
 
70
- ### Express (AI Agent)
71
-
72
- Get AI-generated answers with web search and citations. Perfect for RAG (Retrieval-Augmented Generation) workflows.
73
-
74
- | Parameter | Required | Description |
75
- | ----------------- | -------- | ---------------------------------------------------- |
76
- | Input | Yes | Question or prompt for the AI agent |
77
- | Enable Web Search | No | Whether the AI should search the web (default: true) |
78
-
79
- **Response includes:**
80
-
81
- - `answer` - AI-generated response with citations
82
- - `searchResults` - Web search results used for grounding (when web search is enabled)
83
- - `agent` - Agent identifier
84
-
85
70
  ## Credentials
86
71
 
87
72
  1. Visit [you.com/platform/api-keys](https://you.com/platform/api-keys) to get an API key
@@ -93,9 +78,7 @@ Get AI-generated answers with web search and citations. Perfect for RAG (Retriev
93
78
 
94
79
  - **Research workflows**: Search for information and extract full content from top results
95
80
  - **Content aggregation**: Monitor news across topics with customizable filters
96
- - **AI assistants**: Build chatbots with real-time web knowledge using Express
97
81
  - **Data enrichment**: Extract metadata from URLs in your workflows
98
- - **RAG pipelines**: Ground LLM responses with current web information
99
82
 
100
83
  ## Development
101
84
 
@@ -109,10 +92,7 @@ bun run build
109
92
  # Run tests
110
93
  bun test
111
94
 
112
- # Type checking
113
- bun run check:types
114
-
115
- # Linting and formatting
95
+ # Linting, formatting, and type checking
116
96
  bun run check
117
97
  ```
118
98
 
@@ -122,7 +102,6 @@ bun run check
122
102
  - [Search API Reference](https://docs.you.com/api-reference/search/v1-search)
123
103
  - [Search Operators](https://docs.you.com/search/search-operators)
124
104
  - [Contents API Reference](https://docs.you.com/api-reference/search/contents)
125
- - [Express Agent Reference](https://docs.you.com/api-reference/agents/express-agent/express-agent-runs)
126
105
  - [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
127
106
 
128
107
  ## License
@@ -82,25 +82,10 @@ var ContentsResponseSchema = import_zod.z.array(import_zod.z.object({
82
82
  html: import_zod.z.string().optional().describe("Content in HTML format"),
83
83
  metadata: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Metadata extracted from the page")
84
84
  }).passthrough());
85
- var ExpressOptionsSchema = import_zod.z.object({
86
- enableWebSearch: import_zod.z.boolean().optional().describe("Enable web search augmentation for AI responses")
87
- });
88
- var ExpressResponseSchema = import_zod.z.object({
89
- output: import_zod.z.array(import_zod.z.object({
90
- type: import_zod.z.string().min(1).describe("Type of output segment (e.g., text, citations)"),
91
- text: import_zod.z.string().optional().describe("Text content of the output segment"),
92
- content: import_zod.z.array(import_zod.z.object({
93
- url: import_zod.z.string().url().describe("URL of the cited source"),
94
- title: import_zod.z.string().min(1).describe("Title of the cited source"),
95
- snippet: import_zod.z.string().describe("Snippet from the cited source")
96
- }).passthrough()).optional().describe("Citations and sources for the output segment")
97
- }).passthrough()).min(1).describe("Array of output segments from the AI agent"),
98
- agent: import_zod.z.string().optional().describe("Agent identifier used for the response")
99
- }).passthrough();
100
85
 
101
86
  // nodes/YouDotCom/YouDotCom.node.ts
102
- var PACKAGE_VERSION = "0.1.0";
103
- var USER_AGENT = `n8n-nodes-youdotcom/${PACKAGE_VERSION} (https://github.com/youdotcom-oss/dx-toolkit)`;
87
+ var PACKAGE_VERSION = "0.2.6";
88
+ var USER_AGENT = `n8n-nodes-youdotcom/${PACKAGE_VERSION} (https://github.com/youdotcom-oss/n8n-nodes-youdotcom)`;
104
89
 
105
90
  class YouDotCom {
106
91
  description = {
@@ -111,7 +96,7 @@ class YouDotCom {
111
96
  version: 1,
112
97
  usableAsTool: true,
113
98
  subtitle: '={{$parameter["operation"]}}',
114
- description: "Search the web, extract content from URLs, or get AI-powered answers using You.com APIs",
99
+ description: "Search the web and extract content from URLs using You.com APIs",
115
100
  defaults: {
116
101
  name: "You.com"
117
102
  },
@@ -149,12 +134,6 @@ class YouDotCom {
149
134
  value: "contents",
150
135
  description: "Extract content from one or more URLs",
151
136
  action: "Extract content from web pages"
152
- },
153
- {
154
- name: "Express (AI Agent)",
155
- value: "express",
156
- description: "Get AI-generated answers with web search and citations",
157
- action: "Get AI answers with citations"
158
137
  }
159
138
  ],
160
139
  default: "search"
@@ -431,41 +410,6 @@ class YouDotCom {
431
410
  description: "Timeout in seconds for page crawling (1-60)"
432
411
  }
433
412
  ]
434
- },
435
- {
436
- displayName: "Input",
437
- name: "input",
438
- type: "string",
439
- required: true,
440
- displayOptions: {
441
- show: {
442
- operation: ["express"]
443
- }
444
- },
445
- default: "",
446
- placeholder: "e.g., What are the latest developments in AI?",
447
- description: "Question or prompt for the AI agent to answer"
448
- },
449
- {
450
- displayName: "Express Options",
451
- name: "expressOptions",
452
- type: "collection",
453
- placeholder: "Add Option",
454
- default: {},
455
- displayOptions: {
456
- show: {
457
- operation: ["express"]
458
- }
459
- },
460
- options: [
461
- {
462
- displayName: "Enable Web Search",
463
- name: "enableWebSearch",
464
- type: "boolean",
465
- default: true,
466
- description: "Whether the AI agent should search the web for current information"
467
- }
468
- ]
469
413
  }
470
414
  ]
471
415
  };
@@ -487,12 +431,6 @@ class YouDotCom {
487
431
  itemData: { item: i }
488
432
  });
489
433
  returnData.push(...executionData);
490
- } else if (operation === "express") {
491
- const response = await YouDotCom.#executeExpress(this, i);
492
- const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), {
493
- itemData: { item: i }
494
- });
495
- returnData.push(...executionData);
496
434
  }
497
435
  } catch (error) {
498
436
  if (error instanceof import_zod2.ZodError) {
@@ -594,45 +532,4 @@ ${error.issues.map((e, i2) => ` ${i2 + 1}. ${e.path.join(".") || "root"}: ${e.m
594
532
  const response = ContentsResponseSchema.parse(rawResponse);
595
533
  return response;
596
534
  }
597
- static async#executeExpress(context, itemIndex) {
598
- const input = context.getNodeParameter("input", itemIndex);
599
- const rawOptions = context.getNodeParameter("expressOptions", itemIndex);
600
- const options = ExpressOptionsSchema.parse(rawOptions);
601
- const credentials = await context.getCredentials("youDotComApi");
602
- const apiKey = credentials.apiKey;
603
- const body = {
604
- agent: "express",
605
- input,
606
- stream: false
607
- };
608
- if (options.enableWebSearch !== false) {
609
- body.tools = [{ type: "web_search" }];
610
- }
611
- const rawResponse = await context.helpers.httpRequest({
612
- method: "POST",
613
- url: "https://api.you.com/v1/agents/runs",
614
- headers: {
615
- Authorization: `Bearer ${apiKey}`,
616
- "Content-Type": "application/json",
617
- Accept: "application/json",
618
- "User-Agent": USER_AGENT
619
- },
620
- body,
621
- json: true
622
- });
623
- const response = ExpressResponseSchema.parse(rawResponse);
624
- const result = {
625
- agent: response.agent
626
- };
627
- if (response.output) {
628
- for (const item of response.output) {
629
- if (item.type === "message.answer" && item.text) {
630
- result.answer = item.text;
631
- } else if (item.type === "web_search.results" && item.content) {
632
- result.searchResults = item.content;
633
- }
634
- }
635
- }
636
- return result;
637
- }
638
535
  }
@@ -2,7 +2,7 @@
2
2
  "node": "n8n-nodes-youdotcom.youDotCom",
3
3
  "nodeVersion": "1.0",
4
4
  "codexVersion": "1.0",
5
- "categories": ["AI", "Utility", "Data & Storage"],
5
+ "categories": ["Utility", "Data & Storage"],
6
6
  "resources": {
7
7
  "credentialDocumentation": [
8
8
  {
@@ -15,31 +15,11 @@
15
15
  },
16
16
  {
17
17
  "url": "https://docs.you.com/api-reference/search/contents"
18
- },
19
- {
20
- "url": "https://docs.you.com/agents/overview#express-agent"
21
18
  }
22
19
  ]
23
20
  },
24
- "alias": [
25
- "search",
26
- "web search",
27
- "you",
28
- "youdotcom",
29
- "news",
30
- "ai search",
31
- "contents",
32
- "extract",
33
- "scrape",
34
- "crawl",
35
- "express",
36
- "ai agent",
37
- "ai answer",
38
- "rag",
39
- "grounding"
40
- ],
21
+ "alias": ["search", "web search", "you", "youdotcom", "news", "ai search", "contents", "extract", "scrape", "crawl"],
41
22
  "subcategories": {
42
- "AI": ["Agents", "Root Nodes"],
43
23
  "Utility": ["Data Transformation"]
44
24
  }
45
25
  }
package/package.json CHANGED
@@ -1,21 +1,19 @@
1
1
  {
2
2
  "name": "@youdotcom-oss/n8n-nodes-youdotcom",
3
- "version": "0.2.5",
4
- "description": "n8n community node for You.com APIs - Search, Contents extraction, and Express AI agent",
3
+ "version": "0.2.6",
4
+ "description": "n8n community node for You.com APIs - Search and Contents extraction",
5
5
  "license": "MIT",
6
6
  "engines": {
7
- "node": ">=18",
8
- "bun": ">= 1.2.21"
7
+ "node": ">=18"
9
8
  },
10
9
  "repository": {
11
10
  "type": "git",
12
- "url": "git+https://github.com/youdotcom-oss/dx-toolkit.git",
13
- "directory": "packages/n8n-nodes-youdotcom"
11
+ "url": "git+https://github.com/youdotcom-oss/n8n-nodes-youdotcom.git"
14
12
  },
15
13
  "bugs": {
16
- "url": "https://github.com/youdotcom-oss/dx-toolkit/issues"
14
+ "url": "https://github.com/youdotcom-oss/n8n-nodes-youdotcom/issues"
17
15
  },
18
- "homepage": "https://github.com/youdotcom-oss/dx-toolkit/tree/main/packages/n8n-nodes-youdotcom#readme",
16
+ "homepage": "https://github.com/youdotcom-oss/n8n-nodes-youdotcom#readme",
19
17
  "author": {
20
18
  "name": "You.com",
21
19
  "email": "tyler@you.com",
@@ -30,11 +28,7 @@
30
28
  "ai search",
31
29
  "contents",
32
30
  "scrape",
33
- "crawl",
34
- "express",
35
- "ai agent",
36
- "rag",
37
- "grounding"
31
+ "crawl"
38
32
  ],
39
33
  "type": "commonjs",
40
34
  "files": [
@@ -46,13 +40,12 @@
46
40
  "scripts": {
47
41
  "build": "bun build.ts && bun run build:assets",
48
42
  "build:assets": "cp nodes/YouDotCom/youdotcom.svg dist/nodes/YouDotCom/ && cp nodes/YouDotCom/YouDotCom.node.json dist/nodes/YouDotCom/ && cp nodes/YouDotCom/youdotcom.svg dist/credentials/",
49
- "check": "bun run check:biome && bun run check:types && bun run check:package",
50
- "check:biome": "biome check",
51
- "check:package": "format-package --check",
52
- "check:types": "tsc --noEmit",
53
- "check:write": "biome check --write && bun run format:package",
54
- "format:package": "format-package --write",
55
- "test": "bun test"
43
+ "lint": "n8n-node lint",
44
+ "lint:fix": "n8n-node lint --fix",
45
+ "check": "biome check && tsc --noEmit",
46
+ "check:write": "biome check --write",
47
+ "test": "bun test",
48
+ "prepublishOnly": "bun run build"
56
49
  },
57
50
  "n8n": {
58
51
  "n8nNodesApiVersion": 1,
@@ -69,8 +62,12 @@
69
62
  "zod": "^3.25.67"
70
63
  },
71
64
  "devDependencies": {
72
- "zod": "^4.3.6",
65
+ "@biomejs/biome": "^2.3.8",
73
66
  "@n8n/node-cli": "^0.19.0",
74
- "n8n-workflow": "^2.6.0"
67
+ "@types/bun": "^1.3.9",
68
+ "eslint": "9.32.0",
69
+ "n8n-workflow": "^2.6.0",
70
+ "typescript": "^5.9.3",
71
+ "zod": "^3.25.67"
75
72
  }
76
73
  }