I have a list of URLs and want it to be processed via an HTTP request. This means that the HTTP request should be executed once for each entry in the list. How do I implement this? Currently, only the first entry is executed.
{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-780,
-20
],
“id”: “332d51bf-42b7-4eef-ad8d-30b7bc049acb”,
“name”: “When clicking ‘Test workflow’”
},
{
“parameters”: {},
“type”: “n8n-nodes-base.wait”,
“typeVersion”: 1.1,
“position”: [
-320,
-20
],
“id”: “e79fd5ce-70ed-4356-9415-5bb434093483”,
“name”: “Wait”,
“webhookId”: “5f9f5ed6-d9e9-43a2-a3e0-c39d306cec0a”
},
{
“parameters”: {
“url”: “https://maps.googleapis.com/maps/api/place/textsearch/json?”,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “query”,
“value”: “='Personalberatung ’ + {{ $json.districts }}”
},
{
“name”: “key”,
“value”: “AIzaSyDPtECkw2AdxVCvZPBmt5ZUUzHb4nyF22M”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
-180,
-20
],
“id”: “1a13945b-6e69-4310-9984-147c0bc43084”,
“name”: “HTTP Request”
},
{
“parameters”: {
“mode”: “runOnceForEachItem”,
“jsCode”: “// Add a new field called ‘myNewField’ to the JSON of the item\n$input.item.json.myNewField = 1;\n\nreturn $input.item;”
},
“type”: “n8n-nodes-base.code”,
“typeVersion”: 2,
“position”: [
-480,
-20
],
“id”: “70700489-1e36-45e2-8da5-47428c52f5fa”,
“name”: “Code”
}
],
“connections”: {
“When clicking ‘Test workflow’”: {
“main”: [
[
{
“node”: “Code”,
“type”: “main”,
“index”: 0
}
]
]
},
“Wait”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request”: {
“main”: [
]
},
“Code”: {
“main”: [
[
{
“node”: “Wait”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {
“When clicking ‘Test workflow’”: [
{
“districts”: [
“Altstadt-Lehel”,
“Ludwigsvorstadt-Isarvorstadt”,
“Maxvorstadt”,
“Schwabing-West”,
“Au-Haidhausen”,
“Sendling”,
“Sendling-Westpark”,
“Schwanthalerhöhe”,
“Neuhausen-Nymphenburg”,
“Moosach”,
“Milbertshofen-Am Hart”,
“Schwabing-Freimann”,
“Bogenhausen”,
“Berg am Laim”,
“Trudering-Riem”,
“Ramersdorf-Perlach”,
“Obergiesing-Fasangarten”,
“Untergiesing-Harlaching”,
“Thalkirchen-Obersendling-Forstenried-Fürstenried-Solln”,
“Hadern”,
“Pasing-Obermenzing”,
“Aubing-Lochhausen-Langwied”,
“Allach-Untermenzing”,
“Feldmoching-Hasenbergl”,
“Laim”
]
}
]
},
“meta”: {
“instanceId”: “8bed3f7b1ca022958a48947a85da79e156f67ad502d7c10d003f0496bacab21b”
}
}