N8n Advanced Course (6/8) - Build a full example problem

i follow the clip to learn n8n.
In loop over items node, how show status: 200 data and other data? My’s loop over items node always show “URL_list”: “google.com” data.

thank you very much.

Information on your n8n setup
n8n version: 1.78.1
Database (default: SQLite): No
n8n EXECUTIONS_PROCESS setting (default: own, main): no
Running n8n via (Docker, npm, n8n cloud, desktop app): run n8n
Operating system: windows 10

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Here’s an example:

the advance example is via if node to output data to loop over items

my n8n IF Node output data have status 200 and other data.

when http request run second time. It cannot get data. HTTP Request still get URL_List: google data to fetch data.

how to solve the second time HTTP Request fetch data. Thank you very much.

Could you share your workflow JSON? Just select everything and copy it, then paste it as a code block in here.

This is my n8n json code. Thank you very much.

</>
{
“name”: “a 6”,
“nodes”: [
{
“parameters”: {
“formTitle”: “Submit URL form”,
“formFields”: {
“values”: [
{
“fieldLabel”: “URL”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.formTrigger”,
“typeVersion”: 2.2,
“position”: [
-640,
0
],
“id”: “b537d4fb-0633-407f-9db5-8ff619959e6a”,
“name”: “On form submission”,
“webhookId”: “a79a0be1-f913-444a-b576-ee7937cb909a”
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “56fe0e33-deb3-483e-92a7-30a2f2ecc78e”,
“name”: “URL_list”,
“value”: “={{ $json.URL.split(‘,’) }}”,
“type”: “array”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
-380,
0
],
“id”: “e9b34931-67c9-4877-b92b-7046aadf63cd”,
“name”: “Edit Fields”
},
{
“parameters”: {
“fieldToSplitOut”: “URL_list”,
“options”: {}
},
“type”: “n8n-nodes-base.splitOut”,
“typeVersion”: 1,
“position”: [
-160,
0
],
“id”: “99aa4662-2edc-494b-a8b3-2ffb641da4d9”,
“name”: “Split Out”
},
{
“parameters”: {
“options”: {
“reset”: false
}
},
“type”: “n8n-nodes-base.splitInBatches”,
“typeVersion”: 3,
“position”: [
40,
0
],
“id”: “7d982dc2-c308-4d1d-925a-146405da29d7”,
“name”: “Loop Over Items”
},
{
“parameters”: {
“url”: “https://api.peopledatalabs.com/v5/company/search”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendBody”: true,
“bodyParameters”: {
“parameters”: [
{
“name”: “size”,
“value”: “1”
},
{
“name”: “sql”,
“value”: “={{ "SELECT * FROM company WHERE website=‘" + $json.URL_list + "’"}}”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
220,
160
],
“id”: “70f768bc-eccf-41f7-9c9d-0ea789de518f”,
“name”: “HTTP Request”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “7WnvshCamNrQOwYs”,
“name”: “Header Auth account”
}
}
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “loose”,
“version”: 2
},
“conditions”: [
{
“id”: “afe4c65d-d28d-49d8-9406-4201efc1661e”,
“leftValue”: “={{ $json.status }}”,
“rightValue”: 200,
“operator”: {
“type”: “number”,
“operation”: “notEquals”
}
}
],
“combinator”: “and”
},
“looseTypeValidation”: true,
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
440,
160
],
“id”: “a3c26d93-15d5-4c7c-b4b3-c45fdd03fd94”,
“name”: “If”
},
{
“parameters”: {
“errorMessage”: “Error on PDL enrichment”
},
“type”: “n8n-nodes-base.stopAndError”,
“typeVersion”: 1,
“position”: [
720,
0
],
“id”: “80f2766a-eea0-457c-984c-14c4cddc0bb2”,
“name”: “Stop and Error”
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “02e35ee1-496b-45b8-82d3-bddb63fb3cdf”,
“name”: “name”,
“value”: “{{ $json.data[0].name }}”,
“type”: “string”
},
{
“id”: “eaaee7b9-eb36-4054-bed8-43b5bd0c7273”,
“name”: “employees”,
“value”: “={{ $json.data[0].employee_count }}”,
“type”: “number”
},
{
“id”: “4ce756b9-5100-403c-8745-d691ab86e1b2”,
“name”: “country”,
“value”: “{{ $json.data[0].location.contient}}”,
“type”: “string”
}
]
},
“includeOtherFields”: true,
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
360,
-120
],
“id”: “8e86f3ca-af5f-4347-8066-0f587031b8ef”,
“name”: “Edit Fields1”
}
],
“pinData”: {},
“connections”: {
“On form submission”: {
“main”: [
[
{
“node”: “Edit Fields”,
“type”: “main”,
“index”: 0
}
]
]
},
“Edit Fields”: {
“main”: [
[
{
“node”: “Split Out”,
“type”: “main”,
“index”: 0
}
]
]
},
“Split Out”: {
“main”: [
[
{
“node”: “Loop Over Items”,
“type”: “main”,
“index”: 0
}
]
]
},
“Loop Over Items”: {
“main”: [
[
{
“node”: “Edit Fields1”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request”: {
“main”: [
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
[
{
“node”: “Stop and Error”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Loop Over Items”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: false,
“settings”: {
“executionOrder”: “v1”
},
“versionId”: “acce04e0-85e0-40aa-a66f-4cdae3265ae5”,
“meta”: {
“instanceId”: “d69f5cdce43c830c922c3f27c9cbb4685ba007b56e876fc4150da4afe349b9ab”
},
“id”: “FD8IbquYAnd1RiqT”,
“tags”:
}
</>

This is your original workflow:

This is what I have:

I tried entering google.com, microsoft.com in the form submission, and in the end, got this output (the one in the right)

Based on the discussion so far, looks like that’s what you want to achieve? If yes, it appears to be working.

i found input “google.com, n8n.io, facebook.com, pennylane.com, spendesk.com”. Peopledatalabs cannot find facebook data. So, it show “The resoure you are requesting could not be found” error message. I workflow is right. Peopledatalabs is no facebook data.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.