Repository navigation
Expand file tree
/
Copy pathworkflow.json
More file actions
137 lines (137 loc) · 3.25 KB
/
Copy pathworkflow.json
File metadata and controls
137 lines (137 loc) · 3.25 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
{
"name": "Apify google-trends-scraper (scheduled)",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
1
],
"triggerAtHour": 8
}
]
}
},
"id": "fd2fa484-2a8e-4c22-9f32-171668d25144",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.apify.com/v2/acts/lagenuina_agency~google-trends-scraper/run-sync-get-dataset-items",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"searchTerms\": [\n \"chatgpt\",\n \"gemini\"\n ],\n \"geo\": \"US\",\n \"timeRange\": \"today 3-m\",\n \"includeInterestByRegion\": false\n}",
"options": {
"timeout": 300000
}
},
"id": "41621163-e751-4048-b0fa-c3e192187a35",
"name": "Run Apify actor",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
240,
0
],
"credentials": {
"httpHeaderAuth": {
"id": "",
"name": "Apify API token"
}
}
},
{
"parameters": {
"jsCode": "// One row per keyword and week.\nconst rows = [];\nfor (const { json } of $input.all()) {\n for (const p of json.timeline ?? []) {\n rows.push({ json: { searchTerm: json.searchTerm, geo: json.geo, date: p.date.slice(0, 10), value: p.value } });\n }\n}\nreturn rows;"
},
"id": "23e1ea41-d0e3-421e-ad73-bdc13e020176",
"name": "Flatten timeline",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
480,
0
]
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_GOOGLE_SHEET_ID"
},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Sheet1"
},
"columns": {
"mappingMode": "autoMapInputData",
"value": {}
},
"options": {}
},
"id": "6ccaa6bf-cd07-4796-8f81-94398f381c14",
"name": "Append to Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
720,
0
]
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Run Apify actor",
"type": "main",
"index": 0
}
]
]
},
"Run Apify actor": {
"main": [
[
{
"node": "Flatten timeline",
"type": "main",
"index": 0
}
]
]
},
"Flatten timeline": {
"main": [
[
{
"node": "Append to Google Sheets",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"pinData": {},
"active": false
}