Unable to merge two inputs correctly

Describe the problem/error/question

I am facing issue in merging input1 and input 2 into a google sheet. I have urls from input 1 and I have added a filter in the workflow for the urls where http request did not work. If I am sending 7 urls in a batch as Input 1 and only 6 urls result are extracted (1st url has some issue) from input 2. The data gets overlapped in the google sheet. Extracted data of 2nd url gets mapped in the first url and it makes the google sheet messy.

Please share your workflow

I am using Merge by Position Mode in Merge node and have mapped with row_number in google sheet.


Share the output returned by the last node

I kept row_number in Column A and mapping based on Column A only.

Information on your n8n setup

  • **Running n8n via n8n cloud
  • **Operating system: Windows

Hi @shu3ham, welcome to the community. I am sorry you are having trouble.

Can you share a few more details so I can reproduce your problem and get an idea what’s going on? Specifically I’d like to see the below details if the data coming from your merge node looks correct:

  1. The full JSON data you are sending to your Google Sheets node when running into this
  2. The Google Sheets node itself (simply copy it from your n8n canvas using Ctrl+C, then paste it here on the forum using Ctrl+V)

If the problem is with the Merge node itself, can you please share these details instead:

  1. The full JSON data you are sending to each input of your Merge node when running into this
  2. The JSON data currently returned by your Merge node
  3. The JSON data you would like to see returned by your Merge node instead

Thank you!

Hi @MutedJam

  1. The full JSON data you are sending to each input of your Merge node when running into this-
    Input: 7 items
    [

{

“row_number”: 2,

“urls”: “hiawasseeretreat.com/

},

{

“row_number”: 3,

“urls”: “labanquedefleuve.com/

},

{

“row_number”: 4,

“urls”: “vignonmanorfarm.com/

},

{

“row_number”: 5,

“urls”: “rockfieldmanor.com/

},

{

“row_number”: 6,

“urls”: “donaldsonbrown.com/

},

{

“row_number”: 7,

“urls”: “springhillmanor.com/

},

{

“row_number”: 8,

“urls”: “bohemiaoverlook.com/

}

]
2. The JSON data currently returned by your Merge node
Output: 5 items (totally fine, beacuse 2 urls failed to run and filtered out)
5 items

[

{

“row_number”: 2,

“urls”: “hiawasseeretreat.com/”,

“Business Name”: “The Retreat at Hiawassee River”,

“Phone”: “(706) 896-7400”,

“Email”: “[email protected]”,

“Address”: “15 Cabin Drive PO Box 738 Hiawassee, GA 30546”,

“Industry”: “Hospitality”

},

{

“row_number”: 3,

“urls”: “labanquedefleuve.com/”,

“Business Name”: “Vignon Manor Farm”,

“Phone”: “443-243-3637”,

“Email”: “[email protected]”,

“Address”: “425 Darlington Road, Havre De Grace, Maryland 21078”,

“Industry”: “Wedding Venue”

},

{

“row_number”: 4,

“urls”: “vignonmanorfarm.com/”,

“Business Name”: “Rockfield Manor”,

“Phone”: “410-638-4565”,

“Email”: “N/A”,

“Address”: “501 Churchville Rd. Bel Air, MD 21014”,

“Industry”: “N/A”

},

{

“row_number”: 5,

“urls”: “rockfieldmanor.com/”,

“Business Name”: “Donaldson Brown Riverfront Event Center”,

“Phone”: “+8 (123) 985 789”,

“Email”: “[email protected]”,

“Address”: “200 Mt Ararat Farm Road, Port Deposit, MD 21904”,

“Industry”: “Event Center”

},

{

“row_number”: 6,

“urls”: “donaldsonbrown.com/”,

“Business Name”: “Spring Hill Manor”,

“Phone”: “4106583815”,

“Email”: “[email protected]”,

“Address”: “455 Spring Hill Rd Rising Sun, MD, 21911 USA”,

“Industry”: “Wedding Venues”

}

]

  1. The Google Sheets node itself (simply copy it from your n8n canvas using Ctrl+C, then paste it here on the forum using Ctrl+V)
    {
    “meta”: {
    “instanceId”: “9fe149203cbb6ac03282479565cad3d03f4571b307d41d99bd46bb18d7640b2a”
    },
    “nodes”: [
    {
    “parameters”: {
    “operation”: “update”,
    “documentId”: {
    “__rl”: true,
    “value”: “https://docs.google.com/spreadsheets/d/1-ck9SOGaoN9jo5Je0-K-AiS-41fUPbd8flLcV_XoBoI/edit#gid=0”,
    “mode”: “url”
    },
    “sheetName”: {
    “__rl”: true,
    “value”: 855341281,
    “mode”: “list”,
    “cachedResultName”: “Sheet3”,
    “cachedResultUrl”: “https://docs.google.com/spreadsheets/d/1-ck9SOGaoN9jo5Je0-K-AiS-41fUPbd8flLcV_XoBoI/edit#gid=855341281
    },
    “columns”: {
    “mappingMode”: “autoMapInputData”,
    “value”: {},
    “matchingColumns”: [
    “row_number”
    ],
    “schema”: [
    {
    “id”: “row_number”,
    “displayName”: “row_number”,
    “required”: false,
    “defaultMatch”: false,
    “display”: true,
    “type”: “string”,
    “canBeUsedToMatch”: true,
    “removed”: false
    },
    {
    “id”: “urls”,
    “displayName”: “urls”,
    “required”: false,
    “defaultMatch”: false,
    “display”: true,
    “type”: “string”,
    “canBeUsedToMatch”: true
    },
    {
    “id”: “Business Name”,
    “displayName”: “Business Name”,
    “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”: “Email”,
    “displayName”: “Email”,
    “required”: false,
    “defaultMatch”: false,
    “display”: true,
    “type”: “string”,
    “canBeUsedToMatch”: true
    },
    {
    “id”: “Address”,
    “displayName”: “Address”,
    “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”: “Website”,
    “displayName”: “Website”,
    “required”: false,
    “defaultMatch”: false,
    “display”: true,
    “type”: “string”,
    “canBeUsedToMatch”: true
    }
    ]
    },
    “options”: {}
    },
    “id”: “62c8a9ce-0f2b-4e8b-9fcb-527b44a42bd2”,
    “name”: “Update Google Sheets”,
    “type”: “n8n-nodes-base.googleSheets”,
    “typeVersion”: 4,
    “position”: [
    2560,
    240
    ],
    “credentials”: {
    “googleSheetsOAuth2Api”: {
    “id”: “IlOvPmFJkJwNdV6g”,
    “name”: “Google Sheets account”
    }
    }
    }
    ],
    “connections”: {}
    }
  2. The JSON data you would like to see returned by your Merge node instead
    I would like to map data with their correct url. If I am sending 7 urls and input 1 and to Merge and only 5 urls are being processed from input 2. I would like to map the input 2 data with their respective urls in input 1 and the remaining url from input 1 should be left as blank.
    Please let me know if you require more information.

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