Skip to content

Commit b828f09

Browse files
committed
adding the examples
1 parent b47272a commit b828f09

File tree

5 files changed

+513
-6
lines changed

5 files changed

+513
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,12 @@ You can also pass a parameters object directly to the node, instead of the UI:
7777

7878
---
7979

80-
## Example workflow
80+
## Example workflows
8181

82-
The sample below searches Google for “n8n community nodes” and extracts the first organic result.
82+
To easily see how to work with SearchApi on n8n, refer to the examples we've prepared:
8383

84-
85-
86-
You can import the full `.json` from `/examples/searchapi_google_basic.json` in this repo.
84+
- [Youtube video summarization with SearchApi](/examples/searchapi_youtube_transcripts/)
85+
- [Chatbot that searchs the web with SearchApi](/examples/searchapi_chatbot/)
8786

8887
---
8988

@@ -105,7 +104,7 @@ The node returns the raw JSON received from SearchAPI.io. See the [official docs
105104

106105
## Resources
107106

108-
- **SearchAPI.io documentation**[https://www.searchapi.io/docs](https://www.searchapi.io/docs)
107+
- **SearchAPI.io documentation**[https://www.searchapi.io/](https://www.searchapi.io/docs/google)
109108
- **n8n Community Forum**[https://community.n8n.io](https://community.n8n.io)
110109
- **Community nodes installation** – [https://docs.n8n.io/integrations/community-nodes/installation/](https://docs.n8n.io/integrations/community-nodes/installation/)
111110

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## 🤖 AI Agent Web Search using SearchAPI & LLM
2+
3+
### Who is this for?
4+
5+
This workflow is ideal for anyone conducting **online research**, including **students**, **researchers**, **content creators**, and professionals looking for accurate, up-to-date, and verifiable information. It also serves as an excellent foundation for building more sophisticated AI-driven applications.
6+
7+
### What problem does this workflow solve? / Use case
8+
9+
This workflow automates web searches by enabling an AI agent to retrieve and summarize external, verifiable information efficiently, ensuring accuracy through source citations.
10+
11+
### What this workflow does
12+
13+
* Connects an AI agent node to [SearchAPI.io](https://searchapi.io/) as an integrated search tool.
14+
* Empowers the AI agent to perform real-time web searches using various SearchAPI engines (e.g., Google, Bing).
15+
* Allows the AI agent to dynamically determine search parameters based on user interaction, delivering contextually relevant results.
16+
* Ensures responses include clearly cited sources for validation and further exploration.
17+
18+
### Setup
19+
20+
1. **API Configuration**:
21+
22+
* Set your [SearchAPI.io](https://searchapi.io/) credentials in n8n.
23+
* Connect your preferred AI provider (e.g., OpenRouter, ChatGPT) to the AI agent node.
24+
25+
2. **Input Requirements**:
26+
27+
* User inputs queries via chat interaction with the AI agent.
28+
29+
3. **Configure the AI Agent Node**:
30+
31+
* Select the desired search engines from SearchAPI (e.g., Google, Bing).
32+
* Define parameters the agent can adjust for refined searches.
33+
34+
### How to customize this workflow to your needs
35+
36+
* Integrate additional nodes to structure or store search results (e.g., saving to databases, Notion, Google Sheets).
37+
* Extend chatbot capabilities to integrate with messaging platforms (Slack, Discord) or email notifications.
38+
* Adjust search parameters and filters within the AI agent node to tailor information retrieval.
39+
40+
### Example Usage
41+
42+
* **Input**: User asks, "What are the latest developments in AI regulation?"
43+
* **Output**: AI retrieves, summarizes, and cites recent, authoritative articles and news sources from the web.
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
{
2+
"id": "onyc3N5GKCxzWfmi",
3+
"meta": {
4+
"instanceId": "54299f860163fe60974599588ae4c20ee888191a431346b258503c2db8b536ed",
5+
"templateCredsSetupCompleted": true
6+
},
7+
"name": "Chatbot that searches the web",
8+
"tags": [],
9+
"nodes": [
10+
{
11+
"id": "976aa8a4-d286-478a-8cc9-4577e220174b",
12+
"name": "When chat message received",
13+
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
14+
"position": [
15+
-300,
16+
80
17+
],
18+
"webhookId": "d48f9e07-3c05-4be8-86ca-5cee4c27b78f",
19+
"parameters": {
20+
"options": {}
21+
},
22+
"typeVersion": 1.1
23+
},
24+
{
25+
"id": "44236749-af9f-4843-a1ab-e54008b4c525",
26+
"name": "Simple Memory",
27+
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
28+
"position": [
29+
40,
30+
300
31+
],
32+
"parameters": {
33+
"contextWindowLength": 20
34+
},
35+
"typeVersion": 1.3
36+
},
37+
{
38+
"id": "33536ea4-c8fe-4525-a2d2-905180259e8d",
39+
"name": "AI Agent",
40+
"type": "@n8n/n8n-nodes-langchain.agent",
41+
"position": [
42+
-48,
43+
80
44+
],
45+
"parameters": {
46+
"options": {}
47+
},
48+
"typeVersion": 1.8
49+
},
50+
{
51+
"id": "10436a1a-4993-4fc5-aca7-686db5bf7441",
52+
"name": "OpenRouter Chat Model",
53+
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
54+
"position": [
55+
-80,
56+
300
57+
],
58+
"parameters": {
59+
"model": "deepseek/deepseek-chat:free",
60+
"options": {}
61+
},
62+
"credentials": {
63+
"openRouterApi": {
64+
"id": "tDWBerCVn0gOn7YX",
65+
"name": "OpenRouter account"
66+
}
67+
},
68+
"typeVersion": 1
69+
},
70+
{
71+
"id": "73d024bd-aab3-491c-afc4-79194f4ac7fc",
72+
"name": "SearchAPI",
73+
"type": "CUSTOM.searchApiTool",
74+
"position": [
75+
260,
76+
300
77+
],
78+
"parameters": {
79+
"parameters": {
80+
"parameter": [
81+
{
82+
"name": "q",
83+
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Value', ``, 'string') }}"
84+
},
85+
{}
86+
]
87+
},
88+
"requestOptions": {},
89+
"toolDescription": "Call this tool whenever the answer might require fresh, niche, or externally-verifiable information. Make sure to always cite the sources in the final reply. "
90+
},
91+
"credentials": {
92+
"searchApi": {
93+
"id": "rTFvdffzP7fPVaVr",
94+
"name": "SearchAPI account"
95+
}
96+
},
97+
"typeVersion": 1
98+
},
99+
{
100+
"id": "7443e1c1-1b12-453d-89b3-9875ed07749f",
101+
"name": "Sticky Note",
102+
"type": "n8n-nodes-base.stickyNote",
103+
"position": [
104+
-400,
105+
-140
106+
],
107+
"parameters": {
108+
"color": 5,
109+
"width": 340,
110+
"content": "## SearchAPI AI Agent\nWhenever you ask a question that should be searched on the web, the AI Agent will use SearchAPI to do it. To run this workflow, you need to have the credentials for Searchapi.io and some LLM provider."
111+
},
112+
"typeVersion": 1
113+
},
114+
{
115+
"id": "9617510c-6ff3-4f6c-9e4d-8fbd9b129f95",
116+
"name": "Sticky Note1",
117+
"type": "n8n-nodes-base.stickyNote",
118+
"position": [
119+
460,
120+
400
121+
],
122+
"parameters": {
123+
"width": 260,
124+
"height": 120,
125+
"content": "## Tip\nYou can change the node to use any of the engines available on [SearchAPI.io](https://www.searchapi.io/)"
126+
},
127+
"typeVersion": 1
128+
}
129+
],
130+
"active": false,
131+
"pinData": {},
132+
"settings": {
133+
"executionOrder": "v1"
134+
},
135+
"versionId": "1f42e7e2-32ca-4ceb-8f1e-1de26f09d525",
136+
"connections": {
137+
"SearchAPI": {
138+
"ai_tool": [
139+
[
140+
{
141+
"node": "AI Agent",
142+
"type": "ai_tool",
143+
"index": 0
144+
}
145+
]
146+
]
147+
},
148+
"Simple Memory": {
149+
"ai_memory": [
150+
[
151+
{
152+
"node": "AI Agent",
153+
"type": "ai_memory",
154+
"index": 0
155+
}
156+
]
157+
]
158+
},
159+
"OpenRouter Chat Model": {
160+
"ai_languageModel": [
161+
[
162+
{
163+
"node": "AI Agent",
164+
"type": "ai_languageModel",
165+
"index": 0
166+
}
167+
]
168+
]
169+
},
170+
"When chat message received": {
171+
"main": [
172+
[
173+
{
174+
"node": "AI Agent",
175+
"type": "main",
176+
"index": 0
177+
}
178+
]
179+
]
180+
}
181+
}
182+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## 🎥 Summarize YouTube Videos using SearchAPI & LLM
2+
3+
### Who is this for?
4+
5+
This workflow is perfect for **content creators**, **students****digital marketers**, **educators**, and **researchers** who want to quickly summarize YouTube videos.
6+
7+
### What problem does this workflow solve? / Use case
8+
9+
Manually extracting important information from lengthy YouTube videos can be tedious and error-prone. This workflow streamlines the process by automatically fetching video transcripts using [SearchAPI.io](https://searchapi.io/) and producing concise, informative summaries through a summarization chain powered by any LLM provider. This allows users to rapidly access crucial information without manual transcription or detailed watching.
10+
11+
### What this workflow does
12+
13+
* Fetches the complete transcript of a YouTube video using SearchAPI.
14+
* Combines the retrieved transcript into a single, continuous text.
15+
* Uses a **Summarization Chain** with an LLM (e.g., OpenRouter models) to create a concise summary of the video content.
16+
17+
### Setup
18+
19+
1. **API Configuration**:
20+
21+
* Set up your [SearchAPI.io](https://searchapi.io/) credentials in n8n.
22+
* Add your preferred LLM provider credentials (e.g., OpenRouter API).
23+
24+
2. **Input Requirements**:
25+
26+
* Provide the YouTube video ID (e.g., `wBuULAoJxok`).
27+
28+
3. **Connect LLM Integration**:
29+
30+
* Configure the summarization chain with your chosen model and parameters for text splitting.
31+
32+
### How to customize this workflow to your needs
33+
34+
* Adjust the summarization model or modify text-splitter parameters to handle different lengths and complexities of video transcripts.
35+
* Integrate additional nodes to export summaries directly into your tools of choice, such as Google Drive, Slack, or email.
36+
* Customize prompt templates in the summarization chain to obtain different summary styles (bullet points, paragraphs, etc.).
37+
* Modify the trigger to what works best for you.
38+
39+
### Example Usage
40+
41+
1. **Input**: YouTube video ID (`wBuULAoJxok`).
42+
2. **Output**: A concise, actionable summary highlighting key ideas, recommendations, and insights from the video.

0 commit comments

Comments
 (0)