Describe the problem/error/question
I have a Merge Node to verify e-mails with a tool. It’s working for some rows, but for some I don’t get the new values from Input 2, and so my workflow is not working properly in the end (I’m losing many lines).
I’m pretty stuck on what to check & how to fix it. sharing the full workflow below, but giving a short explanation here since the WF is pretty long:
"I have some steps related to verifying e-mail addresses with Zerobounce. I connect to that tool via their API.
After checking, I Rename the Keys to add “zb_status” & “zb_sub_status” on the line of the file. Then, I set the values on the line with: zb_status = {{ $json.zb_status }}, zb_sub_status = {{ $json.zb_sub_status }} , & Email = {{ $json.address }}.
After that, I have a Merge node that it’s bugging (= it appears as it’s not taking all of the zb_status & zb_sub_status information):
It’s a Combine & Merge by Fields node.
As Input Fields 1 and 2 I have Email, and the Output Type is to Enrich Input 1.
Please share your workflow
{
"meta": {
"instanceId": "81a6941fb453731dcece0c54e92c6a2270feae43cadf0ab3b7899f3f01564c7d"
},
"nodes": [
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"Email\"]}}",
"operation": "contains",
"value2": "=@"
}
]
}
},
"name": "IF no email1",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
12700,
3000
],
"id": "8ba94c96-3ab4-4393-8db7-e5fa79399bc2"
},
{
"parameters": {
"authentication": "queryAuth",
"url": "=https://api.zerobounce.net/v2/validate",
"options": {
"batchInterval": 200,
"batchSize": 1
},
"queryParametersUi": {
"parameter": [
{
"name": "email",
"value": "={{$json[\"Email\"]}}"
},
{
"name": "ip_address"
}
]
}
},
"name": "Zerobounce email validation",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
12740,
3660
],
"id": "6030be27-01ab-4fa5-b3ae-e26482d83e70",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"httpQueryAuth": {
"id": "10",
"name": "Query Auth account 2"
}
}
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"zb_status\"]}}",
"value2": "valid"
},
{
"value1": "={{$json[\"zb_status\"]}}",
"value2": "catch-all"
}
]
},
"combineOperation": "any"
},
"name": "IF email is Valid",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
13920,
3640
],
"id": "3e283248-016c-4881-8fca-d46b7b9a907c"
},
{
"parameters": {
"keys": {
"key": [
{
"currentKey": "status",
"newKey": "zb_status"
},
{
"currentKey": "sub_status",
"newKey": "zb_sub_status"
}
]
},
"additionalOptions": {}
},
"name": "Rename Keys",
"type": "n8n-nodes-base.renameKeys",
"typeVersion": 1,
"position": [
12920,
3660
],
"id": "b7549202-4f14-4a10-91dd-00bd25dd7026"
},
{
"parameters": {
"mode": "combine",
"mergeByFields": {
"values": [
{
"field1": "Email",
"field2": "Email"
}
]
},
"joinMode": "enrichInput1",
"options": {}
},
"id": "b31ec60e-5ef8-47e6-ab96-d02a79b8fda1",
"name": "Merge2",
"type": "n8n-nodes-base.merge",
"typeVersion": 2.1,
"position": [
13720,
3640
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "zb_status",
"value": "={{ $json.zb_status }}"
},
{
"name": "zb_sub_status",
"value": "={{ $json.zb_sub_status }}"
},
{
"name": "Email",
"value": "={{ $json.address }}"
}
]
},
"options": {}
},
"id": "7864f214-50a4-4d3e-a522-7365de86cde7",
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 2,
"position": [
13080,
3660
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.Email }}",
"operation": "isNotEmpty"
}
]
}
},
"id": "f0aef703-9a67-489a-94ed-1d64b62f0589",
"name": "Email is not empty",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
14240,
3040
]
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "https://docs.google.com/spreadsheets/d/1tHzym1OVNjCN3gneLZ_Xgp6igkFY3Q2ZvWxfsLre5JI/edit#gid=317796169",
"mode": "url"
},
"sheetName": {
"__rl": true,
"value": "317796169",
"mode": "id"
},
"columns": {
"mappingMode": "autoMapInputData",
"value": {},
"matchingColumns": [],
"schema": [
{
"id": "isDuplicate",
"displayName": "isDuplicate",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Email",
"displayName": "Email",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Phone",
"displayName": "Phone",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "linkedin_profile__c",
"displayName": "linkedin_profile__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Company",
"displayName": "Company",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "FirstName",
"displayName": "FirstName",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "LastName",
"displayName": "LastName",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Title",
"displayName": "Title",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Website",
"displayName": "Website",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Date_Sent_SDR__c",
"displayName": "Date_Sent_SDR__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "RecordTypeId",
"displayName": "RecordTypeId",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "LeadSource",
"displayName": "LeadSource",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "LeadSourceCampaignName__c",
"displayName": "LeadSourceCampaignName__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Country_Code__c",
"displayName": "Country_Code__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Industry",
"displayName": "Industry",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Nombre_d_employ_s__c",
"displayName": "Nombre_d_employ_s__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "NumberOfEmployees",
"displayName": "NumberOfEmployees",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "insee_activiteprincipaleunitelegale__c",
"displayName": "insee_activiteprincipaleunitelegale__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "insee_codepostaletablissement__c",
"displayName": "insee_codepostaletablissement__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Siret__c",
"displayName": "Siret__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Comments__c",
"displayName": "Comments__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "zb_status",
"displayName": "zb_status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "zb_sub_status",
"displayName": "zb_sub_status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Legal_Form",
"displayName": "Legal_Form",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "linkedin_company_id__c",
"displayName": "linkedin_company_id__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "personarank",
"displayName": "personarank",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Founded_Year__c",
"displayName": "Founded_Year__c",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "City",
"displayName": "City",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "PostalCode",
"displayName": "PostalCode",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "AnnualRevenue",
"displayName": "AnnualRevenue",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
]
},
"options": {}
},
"id": "4150229d-49f5-44b1-b9ca-57810cfb4074",
"name": "No/Invalid Email Sheet",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
14740,
3220
],
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "hdAQwhBQlxBWl2tK",
"name": "Google Julia Solias Account"
}
}
}
],
"connections": {
"IF no email1": {
"main": [
[
{
"node": "Zerobounce email validation",
"type": "main",
"index": 0
},
{
"node": "Merge2",
"type": "main",
"index": 0
}
],
[
{
"node": "No/Invalid Email Sheet",
"type": "main",
"index": 0
}
]
]
},
"Zerobounce email validation": {
"main": [
[
{
"node": "Rename Keys",
"type": "main",
"index": 0
}
]
]
},
"IF email is Valid": {
"main": [
[
{
"node": "Email is not empty",
"type": "main",
"index": 0
}
],
[
{
"node": "No/Invalid Email Sheet",
"type": "main",
"index": 0
}
]
]
},
"Rename Keys": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Merge2": {
"main": [
[
{
"node": "IF email is Valid",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Merge2",
"type": "main",
"index": 1
}
]
]
},
"Email is not empty": {
"main": [
null,
[
{
"node": "No/Invalid Email Sheet",
"type": "main",
"index": 0
}
]
]
}
}
}```
## Information on your n8n setup
- **n8n version:** [email protected]