Hello Shirobachi 
I hope you’re going well and thank you for your answer!
I managed to do looping and it’s working pretty, but I still can’t manage to get the good URL (which is not on our MongoDB) after our IF. I don’t know how to get only the URL that we don’t already have. Of course, when I search for an URL that we don’t have I get a blank json.
Do you have any idea how to fix that please ?
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
1480,
140
]
},
{
"parameters": {
"url": "https://core.piloterr.com/api/v1/linkedin/similar_companies",
"options": {},
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer "
}
]
},
"queryParametersUi": {
"parameter": [
{
"name": "q",
"value": "https://www.linkedin.com/company/leslipfrancais/"
},
{
"name": "cookie",
"value": "AQEDATcpkxs"
}
]
}
},
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1740,
140
]
},
{
"parameters": {
"collection": "tam_linkedin",
"options": {},
"query": "={\"regular_company_url\":\"{{$node[\"SplitInBatches\"].json[\"url\"]}}\"}"
},
"name": "MongoDB3",
"type": "n8n-nodes-base.mongoDb",
"typeVersion": 1,
"position": [
2840,
340
],
"alwaysOutputData": true,
"credentials": {
"mongoDb": {
"id": "2",
"name": "MongoDB account"
}
},
"continueOnFail": true
},
{
"parameters": {
"operation": "aggregateItems",
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "data"
}
]
},
"options": {}
},
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
2000,
200
]
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"name": "Item Lists1",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
2220,
200
]
},
{
"parameters": {
"fieldToSplitOut": "items",
"options": {}
},
"name": "Item Lists2",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
2440,
200
]
},
{
"parameters": {
"values": {
"string": [
{
"name": "regular_company_url",
"value": "={{$node[\"SplitInBatches\"].json[\"url\"]}}"
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
3500,
-40
]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"name": "SplitInBatches",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 1,
"position": [
2640,
220
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"value": "="
}
]
},
"options": {}
},
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
3420,
400
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{$node[\"MongoDB3\"].json[\"regular_company_url\"]}}",
"value2": "={{$node[\"SplitInBatches\"].json[\"url\"]}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
3180,
260
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "Item Lists",
"type": "main",
"index": 0
}
]
]
},
"MongoDB3": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
},
{
"node": "SplitInBatches",
"type": "main",
"index": 0
}
]
]
},
"Item Lists": {
"main": [
[
{
"node": "Item Lists1",
"type": "main",
"index": 0
}
]
]
},
"Item Lists1": {
"main": [
[
{
"node": "Item Lists2",
"type": "main",
"index": 0
}
]
]
},
"Item Lists2": {
"main": [
[
{
"node": "SplitInBatches",
"type": "main",
"index": 0
}
]
]
},
"SplitInBatches": {
"main": [
[
{
"node": "MongoDB3",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
],
[
{
"node": "Set1",
"type": "main",
"index": 0
}
]
]
}
}
}```
Thank you for your help