-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseo-content-gap-analyzer-n8n.json.json
More file actions
412 lines (412 loc) · 14.1 KB
/
seo-content-gap-analyzer-n8n.json.json
File metadata and controls
412 lines (412 loc) · 14.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
{
"name": "SEO Content Gap Analysis and Report Generator",
"nodes": [
{
"parameters": {
"options": {
"temperature": 0.3
}
},
"id": "83bfa3aa-da3d-44d1-b422-82e8ce9ada74",
"name": "Gemini AI Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
3528,
528
],
"credentials": {
"googlePalmApi": {
"id": "CIyBbCmXJAoOz8zT",
"name": "Google Gemini(PaLM) Api account 3"
}
}
},
{
"parameters": {
"url": "https://serpapi.com/search",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "serpApi",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "q",
"value": "={{ $json.keyword }}"
},
{
"name": "engine",
"value": "google"
},
{
"name": "num",
"value": "10"
}
]
},
"options": {
"response": {
"response": {
"responseFormat": "json"
}
}
}
},
"id": "dcfd32e6-0b8b-4ea2-b024-329e6dfdc872",
"name": "Search Google via SerpAPI",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
2400,
304
],
"credentials": {
"serpApi": {
"id": "KL53IwCIexDpzPep",
"name": "SerpAPI account"
}
}
},
{
"parameters": {
"jsCode": "// Extract top 5 organic search results from SerpAPI response\nconst serpApiResponse = $input.first().json;\n\n// Get organic results from the response\nconst organicResults = serpApiResponse.organic_results || [];\n\n// Extract top 5 URLs with titles and snippets\nconst topUrls = organicResults.slice(0, 5).map((result, index) => ({\n position: index + 1,\n url: result.link || '',\n title: result.title || '',\n snippet: result.snippet || '',\n displayedLink: result.displayed_link || ''\n}));\n\n// Return the array of URLs\nreturn topUrls.map(item => ({ json: item }));"
},
"id": "caef23fc-915f-45aa-9199-ff2791d33ac3",
"name": "Extract Top URLs",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2624,
304
]
},
{
"parameters": {
"url": "={{ $json.url }}",
"options": {
"response": {
"response": {
"neverError": true,
"responseFormat": "text",
"outputPropertyName": "htmlContent"
}
}
}
},
"id": "a861df3c-01b1-4197-92c8-054621ea7e92",
"name": "Fetch Page Content",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
2848,
304
],
"alwaysOutputData": true,
"retryOnFail": true
},
{
"parameters": {
"operation": "extractHtmlContent",
"dataPropertyName": "htmlContent",
"extractionValues": {
"values": [
{
"key": "title",
"cssSelector": "title"
},
{
"key": "h1",
"cssSelector": "h1"
},
{
"key": "h2Tags",
"cssSelector": "h2",
"returnArray": true
},
{
"key": "metaDescription",
"cssSelector": "meta[name=\"description\"]",
"returnValue": "attribute",
"attribute": "content"
},
{
"key": "bodyText",
"cssSelector": "body"
}
]
},
"options": {
"trimValues": true
}
},
"id": "06168d32-a288-4b9b-8832-d8a47b3261a2",
"name": "Extract Content",
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
3072,
304
]
},
{
"parameters": {
"aggregate": "aggregateAllItemData",
"options": {}
},
"id": "36963b19-09e6-4fc9-bd99-9f24d93c0235",
"name": "Combine All Results",
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
3296,
304
]
},
{
"parameters": {
"promptType": "define",
"text": "=Analyze the following top-ranking pages for the keyword \"{{ $('Enter Keyword').item.json.keyword }}\" and identify content gaps:\n\n{{ JSON.stringify($json, null, 2) }}",
"hasOutputParser": true,
"options": {
"systemMessage": "You are an SEO content gap analyst. Analyze the top-ranking pages for the target keyword and identify: 1) Common topics and themes across all pages, 2) Content gaps - topics covered by competitors but missing from some pages, 3) Content depth - how comprehensive each page is, 4) Unique angles - what makes each page different, 5) Recommendations for creating content that fills gaps and outranks competitors."
}
},
"id": "d6292b42-d7ce-4daa-b94d-ae3e5a877378",
"name": "Content Gap AI Analyzer",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3.1,
"position": [
3520,
304
]
},
{
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"keyword\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"The target keyword analyzed\"\n\t\t},\n\t\t\"commonTopics\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"description\": \"Common topics found across top-ranking content\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"contentGaps\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"description\": \"Content gaps identified in competitor analysis\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"properties\": {\n\t\t\t\t\t\"gap\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"The content gap identified\"\n\t\t\t\t\t},\n\t\t\t\t\t\"opportunity\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"The opportunity this gap presents\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"competitorStrengths\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"description\": \"Strengths identified in competitor content\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"recommendations\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"description\": \"Actionable recommendations for content creation\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"properties\": {\n\t\t\t\t\t\"priority\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"Priority level (high, medium, low)\"\n\t\t\t\t\t},\n\t\t\t\t\t\"action\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"Recommended action to take\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"suggestedOutline\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"description\": \"Suggested content outline with section titles\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}"
},
"id": "26579a12-5887-4d93-95a3-ebf4dc4d4e66",
"name": "Gap Analysis Report Structure",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.3,
"position": [
3656,
528
]
},
{
"parameters": {
"formTitle": "SEO Content Gap Analysis",
"formDescription": "Enter a keyword to analyze top-ranking content and identify content gaps",
"formFields": {
"values": [
{
"fieldLabel": "Target Keyword",
"fieldName": "keyword",
"requiredField": true
}
]
},
"options": {
"appendAttribution": false,
"buttonLabel": "Analyze Keyword"
}
},
"id": "cd50148a-2977-40c2-9753-38b0c7fc7acf",
"name": "Enter Keyword",
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.5,
"position": [
2176,
304
],
"webhookId": ""
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "0e051a28-aaf2-48e7-ae5d-7b15b0e30cb2",
"name": "output.commonTopics",
"value": "={{ $json.output.commonTopics[0] }}{{ $json.output.commonTopics[1] }}{{ $json.output.commonTopics[2] }}{{ $json.output.commonTopics[3] }}",
"type": "string"
},
{
"id": "e1d6c864-87ab-404d-abbf-1b3e816b73f0",
"name": "output.contentGaps",
"value": "=\n{{'Gap: ' + $json[\"output\"][\"contentGaps\"][0].gap + ', Opportunity: ' + $json[\"output\"][\"contentGaps\"][0].opportunity}}\n{{'Gap: ' + $json[\"output\"][\"contentGaps\"][1].gap + ', Opportunity: ' + $json[\"output\"][\"contentGaps\"][1].opportunity}}{{'Gap: ' + $json[\"output\"][\"contentGaps\"][2].gap + ', Opportunity: ' + $json[\"output\"][\"contentGaps\"][2].opportunity}}{{'Gap: ' + $json[\"output\"][\"contentGaps\"][3].gap + ', Opportunity: ' + $json[\"output\"][\"contentGaps\"][3].opportunity}}{{'Gap: ' + $json[\"output\"][\"contentGaps\"][4].gap + ', Opportunity: ' + $json[\"output\"][\"contentGaps\"][4].opportunity}}",
"type": "string"
},
{
"id": "3052815d-3d6e-4158-b57e-e881a9dc7ed5",
"name": "output.competitorStrengths",
"value": "={{ $json.output.competitorStrengths[0] }}{{ $json.output.competitorStrengths[1] }}{{ $json.output.competitorStrengths[2] }}{{ $json.output.competitorStrengths[3] }}",
"type": "string"
},
{
"id": "6641704c-fcd3-4e4d-835d-16b779554b75",
"name": "output.recommendations",
"value": "=\n{{'Priority: ' + $json[\"output\"][\"recommendations\"][0].priority + ', Action: ' + $json[\"output\"][\"recommendations\"][0].action}}\n{{'Priority: ' + $json[\"output\"][\"recommendations\"][1].priority + ', Action: ' + $json[\"output\"][\"recommendations\"][1].action}}\n{{'Priority: ' + $json[\"output\"][\"recommendations\"][2].priority + ', Action: ' + $json[\"output\"][\"recommendations\"][2].action}}\n{{'Priority: ' + $json[\"output\"][\"recommendations\"][3].priority + ', Action: ' + $json[\"output\"][\"recommendations\"][3].action}}\n{{'Priority: ' + $json[\"output\"][\"recommendations\"][4].priority + ', Action: ' + $json[\"output\"][\"recommendations\"][4].action}}\n{{'Priority: ' + $json[\"output\"][\"recommendations\"][5].priority + ', Action: ' + $json[\"output\"][\"recommendations\"][5].action}}\n{{'Priority: ' + $json[\"output\"][\"recommendations\"][6].priority + ', Action: ' + $json[\"output\"][\"recommendations\"][6].action}}",
"type": "string"
},
{
"id": "75d95437-6489-4c3b-bf83-4740881ec999",
"name": "output.suggestedOutline",
"value": "={{ $json.output.suggestedOutline[0] }}{{ $json.output.suggestedOutline[1] }}{{ $json.output.suggestedOutline[2] }}{{ $json.output.suggestedOutline[3] }}{{ $json.output.suggestedOutline[4] }}{{ $json.output.suggestedOutline[5] }}",
"type": "string"
}
]
},
"includeOtherFields": true,
"options": {}
},
"id": "4e5b9d02-6fe4-4c95-9e03-c37c5524e013",
"name": "Prepare Report Data",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
3872,
304
]
},
{
"parameters": {
"operation": "toText",
"sourceProperty": "output",
"options": {}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
4096,
304
],
"id": "3ccccc9e-12b1-46e4-a3d4-79278cc4f8d9",
"name": "Convert to File"
}
],
"pinData": {},
"connections": {
"Gemini AI Model": {
"ai_languageModel": [
[
{
"node": "Content Gap AI Analyzer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Search Google via SerpAPI": {
"main": [
[
{
"node": "Extract Top URLs",
"type": "main",
"index": 0
}
]
]
},
"Extract Top URLs": {
"main": [
[
{
"node": "Fetch Page Content",
"type": "main",
"index": 0
}
]
]
},
"Fetch Page Content": {
"main": [
[
{
"node": "Extract Content",
"type": "main",
"index": 0
}
]
]
},
"Extract Content": {
"main": [
[
{
"node": "Combine All Results",
"type": "main",
"index": 0
}
]
]
},
"Combine All Results": {
"main": [
[
{
"node": "Content Gap AI Analyzer",
"type": "main",
"index": 0
}
]
]
},
"Content Gap AI Analyzer": {
"main": [
[
{
"node": "Prepare Report Data",
"type": "main",
"index": 0
}
]
]
},
"Gap Analysis Report Structure": {
"ai_outputParser": [
[
{
"node": "Content Gap AI Analyzer",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Enter Keyword": {
"main": [
[
{
"node": "Search Google via SerpAPI",
"type": "main",
"index": 0
}
]
]
},
"Prepare Report Data": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate",
"availableInMCP": false
},
"versionId": "",
"meta": {},
"id": "FDeW8ZsJMcZj7oHQ",
"tags": []
}