Describe the issue/error/question
I’m querying my database to then retrieve corresponding entries in Pipedrive. The thing is that Pipedrive will usually not return as many items as I send it.
However, I need the data from the first Postgres node to be matched with the output of Pipedrive, but I can’t find a way to skip the items in the Postgres data that have failed for Pipedrive.
For now, I get the following result
Postgres → [a,b,c] → Pipedrive → [A, null, C]
It will merge to [{a, A}, {b, C}]
What I would like to do is only pick Postgres items corresponding to succeded Pipedrive requests.
I tried several things even with the split in batches node, to make a loop to treat all the elements one by one but I can’t figure it out.
I hope I was clear.
PS: I removed info from the workflow cause it’s for work so it’s normal that it’s not complete, I just need an example
Please share the workflow
{
"nodes": [
{
"parameters": {
"resource": "note",
"content": ""
}
},
"name": "add note1",
"type": "n8n-nodes-base.pipedrive",
"typeVersion": 1,
"position": [
1780,
2180
],
"credentials": {
"pipedriveApi": {
"id": "5",
"name": "Pipedrive account"
}
}
},
{
"parameters": {
"operation": "executeQuery",
"query": "",
"additionalFields": {}
},
"name": "select organizations with new users",
"type": "n8n-nodes-base.postgres",
"typeVersion": 1,
"position": [
1120,
2160
],
"credentials": {
"postgres": {
"id": "4",
"name": "Prod Read Only Postgres"
}
}
},
{
"parameters": {},
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
1580,
2180
]
},
{
"parameters": {
"options": {}
},
"name": "SplitInBatches",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 1,
"position": [
1400,
2360
]
}
],
"connections": {
"select organizations with new users": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Merge": {
"main": [
[
{
"node": "add note1",
"type": "main",
"index": 0
}
]
]
}
}
}