Describe the problem/error/question
I have a Google Sheets Node with the Append Row action, I have it configured with the "Map Each Column Manually", and it should only find the corresponding columns and adding the row. This works just fine 90% of the time, but at some point it ignores the columns and adds more columns and even erases the previos ones. It not only happens with that node, but also other google sheets nodes with the Append Row action in other workflows, same behavior.
Here is an example of the correct columns in the Google Sheets node:
Here is an example of the problem, after an execution the google sheets node updated the sheet and ended like this:
Here is my node and its configuration:
What is the error message (if any)?
Please share your workflow/screenshots/recording
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
⚠️ WARNING ⚠️ If you have sensitive data in your workflow (like API keys), please remove it before sharing.
I'm going to paste the node that is currently experiencing the error, and also the two nodes prior to it:
{
"nodes": [
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "1XlZSqqnKaLM_dVXvg0RJYPq4GOIRAdsQ5QTHjXbs87g",
"mode": "list",
"cachedResultName": "BDD input sheets",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XlZSqqnKaLM_dVXvg0RJYPq4GOIRAdsQ5QTHjXbs87g/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XlZSqqnKaLM_dVXvg0RJYPq4GOIRAdsQ5QTHjXbs87g/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Estado": "={{ $json.state }}",
"País": "=Mexico",
"Company Name": "={{ $json.output[0].content[0].text.razon_social }}",
"Email": "={{ 'ejemplo@'+$json.output[0].content[0].text.dominio_final }}",
"First Name": "Nombre_ficticio",
"Last Name": "Apellido_ficticio"
},
"matchingColumns": [],
"schema": [
{
"id": "First Name",
"displayName": "First Name",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Last Name",
"displayName": "Last Name",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Company Name",
"displayName": "Company Name",
"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": "Estado",
"displayName": "Estado",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "País",
"displayName": "País",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
4768,
848
],
"id": "bdf26a43-3053-4a8f-828f-a8b58281f298",
"name": "Append a hoja "BDD input sheets"",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"googleSheetsOAuth2Api": {
"name": "Gerardo - Google Sheets - GET"
}
}
},
{
"parameters": {
"jsCode": "// 1. DICCIONARIO DE ABREVIATURAS\nconst state_abbr_mapping = {\n "CDMX": "Ciudad de Mexico",\n "Mexico City": "Ciudad de Mexico",\n "D.F.": "Ciudad de Mexico",\n "Méx.": "Estado de Mexico",\n "Edo. Méx.": "Estado de Mexico",\n "Mex.": "Estado de Mexico",\n "Ags.": "Aguascalientes",\n "Ags": "Aguascalientes",\n "B.C.": "Baja California",\n "B.C.S.": "Baja California Sur",\n "Camp.": "Campeche",\n "Coah.": "Coahuila",\n "Col.": "Colima",\n "Chis.": "Chiapas",\n "Chih.": "Chihuahua",\n "Dgo.": "Durango",\n "Gto.": "Guanajuato",\n "Gro.": "Guerrero",\n "Hgo.": "Hidalgo",\n "Jal.": "Jalisco",\n "Mich.": "Michoacán",\n "Mor.": "Morelos",\n "Nay.": "Nayarit",\n "N.L.": "Nuevo León",\n "Oax.": "Oaxaca",\n "Pue.": "Puebla",\n "Qro.": "Querétaro",\n "Q.R.": "Quintana Roo",\n "Q. Roo": "Quintana Roo",\n "S.L.P.": "San Luis Potosí",\n "Sin.": "Sinaloa",\n "Son.": "Sonora",\n "Tab.": "Tabasco",\n "Tamps.": "Tamaulipas",\n "Tlax.": "Tlaxcala",\n "Ver.": "Veracruz",\n "Yuc.": "Yucatán",\n "Zac.": "Zacatecas",\n "Naucalpan De Juárez": "Estado De Mexico",\n};\n\n// 2. DICCIONARIO CIUDAD -> ESTADO\nconst city_to_state_mapping = {\n "monterrey": "Nuevo León",\n "san pedro garza garcia": "Nuevo León",\n "san pedro": "Nuevo León",\n "santa catarina": "Nuevo León",\n "cdad. santa catarina": "Nuevo León",\n "apodaca": "Nuevo León",\n "guadalupe": "Nuevo León",\n "san nicolas de los garza": "Nuevo León",\n "general escobedo": "Nuevo León",\n "garcia": "Nuevo León",\n \n "guadalajara": "Jalisco",\n "zapopan": "Jalisco",\n "tlaquepaque": "Jalisco",\n "tlajomulco": "Jalisco",\n "tonala": "Jalisco",\n\n "ciudad de méxico": "Ciudad de Mexico",\n "ciudad de mexico": "Ciudad de Mexico",\n "cdmx": "Ciudad de Mexico",\n "naucalpan de juarez": "Estado de Mexico",\n "naucalpan": "Estado de Mexico",\n "tlalnepantla": "Estado de Mexico",\n "toluca": "Estado de Mexico",\n "ecatepec": "Estado de Mexico",\n "atizapan": "Estado de Mexico",\n "cuautitlan": "Estado de Mexico",\n "cuautitlan izcalli": "Estado de Mexico",\n "tepotzotlan": "Estado de Mexico",\n "tepotzotlán": "Estado de Mexico",\n "teoloyucan": "Estado de Mexico",\n \n "queretaro": "Querétaro",\n "santiago de queretaro": "Querétaro",\n "el marques": "Querétaro",\n "leon": "Guanajuato",\n "silao": "Guanajuato",\n "irapuato": "Guanajuato",\n "celaya": "Guanajuato",\n "san luis potosi": "San Luis Potosí",\n "puebla": "Puebla",\n "aguascalientes": "Aguascalientes",\n \n "tijuana": "Baja California",\n "mexicali": "Baja California",\n "hermosillo": "Sonora",\n "chihuahua": "Chihuahua",\n "juarez": "Chihuahua",\n "saltillo": "Coahuila",\n "torreon": "Coahuila",\n "reynosa": "Tamaulipas",\n "matamoros": "Tamaulipas",\n "tampico": "Tamaulipas",\n \n "merida": "Yucatán",\n "cancun": "Quintana Roo",\n "veracruz": "Veracruz",\n "villahermosa": "Tabasco",\n "culiacan": "Sinaloa",\n "mazatlan": "Sinaloa"\n};\n\n// 3. PROCESAMIENTO\nfor (const item of $input.all()) {\n // Obtenemos valores originales (con default vacío)\n // En JS usamos || "" en lugar de .get(key, "")\n let raw_state = item.json["state"] || "";\n let raw_city = item.json["city"] || "";\n \n // --- PASO A: LIMPIEZA GENERAL (Quitar números) ---\n // En JS usamos .replace con regex global (/g) para imitar re.sub\n // .trim() es el equivalente a .strip() de Python\n let clean_city_str = String(raw_city).replace(/\d+/g, '').trim().replace(" ,", "");\n let clean_state_str = String(raw_state).replace(/\d+/g, '').trim();\n \n // Guardamos la ciudad limpia de una vez\n item.json["city"] = clean_city_str;\n\n // --- PASO B: MAPEO DE ABREVIATURAS ---\n // Buscamos en el objeto, si no existe usamos el original\n let final_state = state_abbr_mapping[clean_state_str] || clean_state_str;\n\n // --- PASO C: INFERENCIA POR CIUDAD ---\n if (!final_state || final_state.length < 2) {\n // .toLowerCase() es el equivalente a .lower()\n let city_key = clean_city_str.toLowerCase();\n \n if (city_to_state_mapping.hasOwnProperty(city_key)) {\n final_state = city_to_state_mapping[city_key];\n }\n }\n\n // Asignamos el resultado final capitalizado (Simulación de .title())\n if (final_state) {\n // JS no tiene .title() nativo, esto convierte "ciudad de mexico" a "Ciudad De Mexico"\n item.json["state"] = final_state.toLowerCase().split(' ').map(word => {\n return word.charAt(0).toUpperCase() + word.slice(1);\n }).join(' ');\n } else {\n item.json["state"] = "";\n }\n}\n\nreturn $input.all();"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
4592,
704
],
"id": "172c37e6-3601-44b5-b92f-257f3a00cfc8",
"name": "Abreviaturas por estado",
"retryOnFail": true,
"maxTries": 5,
"waitBetweenTries": 5000
},
{
"parameters": {
"jsCode": "return $('If dominio valido').first();"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
4416,
528
],
"id": "b87cf886-aa95-4eb4-a8e2-a6974ebfa13c",
"name": "Variables"
}
],
"connections": {
"Append a hoja "BDD input sheets"": {
"main": [
[]
]
},
"Abreviaturas por estado": {
"main": [
[
{
"node": "Append a hoja "BDD input sheets"",
"type": "main",
"index": 0
}
]
]
},
"Variables": {
"main": [
[
{
"node": "Abreviaturas por estado",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "75c8ca9bfbd9fb831779b9b2c1f1a0209e5d18fe36b85deef8131f4ba85dea04"
}
}
Share the output returned by the last node
Last Node correct output:
[
{
"Estado": "",
"País": "Mexico",
"Company Name": "PASTEURIZADORA AGUASCALIENTES",
"Email": "ejemplo@lechesanmarcos.com.mx",
"First Name": "Nombre_ficticio",
"Last Name": "Apellido_ficticio"
}
]
Last Node Incorrect output:
[
{
"output": [
{
"id": "msg_04055beffbd836ba00698ae253d3d4819c9c7e50f2d12d30a9",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"logprobs": [],
"text": {
"es_match_oficial": true,
"razon_social": "PASTEURIZADORA DE LOS PRODUCTORES DE LECHE",
"nombre_comercial": "Leche Zaragoza",
"confianza": "ALTA",
"sitio_consultado": "https://lechezaragoza.com/",
"dominio_final": "lechezaragoza.com"
}
}
],
"role": "assistant"
}
],
"city": "",
"state": ""
}
]
Debug info (this i have not changed/modified, default values)
core
- n8nVersion: 2.2.5
- platform: docker (cloud)
- nodeJsVersion: 22.21.1
- nodeEnv: production
- database: sqlite
- executionMode: regular
- concurrency: 20
- license: enterprise (sandbox)
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: filesystem
pruning
- enabled: true
- maxAge: 720 hours
- maxCount: 25000 executions
client
- userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/144.0.0.0 safari/537.36
- isTouchDevice: false
Generated at: 2026-02-10T12:59:38.771Z}
Describe the problem/error/question
I have a Google Sheets Node with the Append Row action, I have it configured with the "Map Each Column Manually", and it should only find the corresponding columns and adding the row. This works just fine 90% of the time, but at some point it ignores the columns and adds more columns and even erases the previos ones. It not only happens with that node, but also other google sheets nodes with the Append Row action in other workflows, same behavior.
Here is an example of the correct columns in the Google Sheets node:
Here is an example of the problem, after an execution the google sheets node updated the sheet and ended like this:
Here is my node and its configuration:
What is the error message (if any)?
Please share your workflow/screenshots/recording
I'm going to paste the node that is currently experiencing the error, and also the two nodes prior to it:
{
"nodes": [
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "1XlZSqqnKaLM_dVXvg0RJYPq4GOIRAdsQ5QTHjXbs87g",
"mode": "list",
"cachedResultName": "BDD input sheets",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XlZSqqnKaLM_dVXvg0RJYPq4GOIRAdsQ5QTHjXbs87g/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XlZSqqnKaLM_dVXvg0RJYPq4GOIRAdsQ5QTHjXbs87g/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Estado": "={{ $json.state }}",
"País": "=Mexico",
"Company Name": "={{ $json.output[0].content[0].text.razon_social }}",
"Email": "={{ 'ejemplo@'+$json.output[0].content[0].text.dominio_final }}",
"First Name": "Nombre_ficticio",
"Last Name": "Apellido_ficticio"
},
"matchingColumns": [],
"schema": [
{
"id": "First Name",
"displayName": "First Name",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Last Name",
"displayName": "Last Name",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Company Name",
"displayName": "Company Name",
"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": "Estado",
"displayName": "Estado",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "País",
"displayName": "País",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
4768,
848
],
"id": "bdf26a43-3053-4a8f-828f-a8b58281f298",
"name": "Append a hoja "BDD input sheets"",
"retryOnFail": true,
"waitBetweenTries": 5000,
"credentials": {
"googleSheetsOAuth2Api": {
"name": "Gerardo - Google Sheets - GET"
}
}
},
{
"parameters": {
"jsCode": "// 1. DICCIONARIO DE ABREVIATURAS\nconst state_abbr_mapping = {\n "CDMX": "Ciudad de Mexico",\n "Mexico City": "Ciudad de Mexico",\n "D.F.": "Ciudad de Mexico",\n "Méx.": "Estado de Mexico",\n "Edo. Méx.": "Estado de Mexico",\n "Mex.": "Estado de Mexico",\n "Ags.": "Aguascalientes",\n "Ags": "Aguascalientes",\n "B.C.": "Baja California",\n "B.C.S.": "Baja California Sur",\n "Camp.": "Campeche",\n "Coah.": "Coahuila",\n "Col.": "Colima",\n "Chis.": "Chiapas",\n "Chih.": "Chihuahua",\n "Dgo.": "Durango",\n "Gto.": "Guanajuato",\n "Gro.": "Guerrero",\n "Hgo.": "Hidalgo",\n "Jal.": "Jalisco",\n "Mich.": "Michoacán",\n "Mor.": "Morelos",\n "Nay.": "Nayarit",\n "N.L.": "Nuevo León",\n "Oax.": "Oaxaca",\n "Pue.": "Puebla",\n "Qro.": "Querétaro",\n "Q.R.": "Quintana Roo",\n "Q. Roo": "Quintana Roo",\n "S.L.P.": "San Luis Potosí",\n "Sin.": "Sinaloa",\n "Son.": "Sonora",\n "Tab.": "Tabasco",\n "Tamps.": "Tamaulipas",\n "Tlax.": "Tlaxcala",\n "Ver.": "Veracruz",\n "Yuc.": "Yucatán",\n "Zac.": "Zacatecas",\n "Naucalpan De Juárez": "Estado De Mexico",\n};\n\n// 2. DICCIONARIO CIUDAD -> ESTADO\nconst city_to_state_mapping = {\n "monterrey": "Nuevo León",\n "san pedro garza garcia": "Nuevo León",\n "san pedro": "Nuevo León",\n "santa catarina": "Nuevo León",\n "cdad. santa catarina": "Nuevo León",\n "apodaca": "Nuevo León",\n "guadalupe": "Nuevo León",\n "san nicolas de los garza": "Nuevo León",\n "general escobedo": "Nuevo León",\n "garcia": "Nuevo León",\n \n "guadalajara": "Jalisco",\n "zapopan": "Jalisco",\n "tlaquepaque": "Jalisco",\n "tlajomulco": "Jalisco",\n "tonala": "Jalisco",\n\n "ciudad de méxico": "Ciudad de Mexico",\n "ciudad de mexico": "Ciudad de Mexico",\n "cdmx": "Ciudad de Mexico",\n "naucalpan de juarez": "Estado de Mexico",\n "naucalpan": "Estado de Mexico",\n "tlalnepantla": "Estado de Mexico",\n "toluca": "Estado de Mexico",\n "ecatepec": "Estado de Mexico",\n "atizapan": "Estado de Mexico",\n "cuautitlan": "Estado de Mexico",\n "cuautitlan izcalli": "Estado de Mexico",\n "tepotzotlan": "Estado de Mexico",\n "tepotzotlán": "Estado de Mexico",\n "teoloyucan": "Estado de Mexico",\n \n "queretaro": "Querétaro",\n "santiago de queretaro": "Querétaro",\n "el marques": "Querétaro",\n "leon": "Guanajuato",\n "silao": "Guanajuato",\n "irapuato": "Guanajuato",\n "celaya": "Guanajuato",\n "san luis potosi": "San Luis Potosí",\n "puebla": "Puebla",\n "aguascalientes": "Aguascalientes",\n \n "tijuana": "Baja California",\n "mexicali": "Baja California",\n "hermosillo": "Sonora",\n "chihuahua": "Chihuahua",\n "juarez": "Chihuahua",\n "saltillo": "Coahuila",\n "torreon": "Coahuila",\n "reynosa": "Tamaulipas",\n "matamoros": "Tamaulipas",\n "tampico": "Tamaulipas",\n \n "merida": "Yucatán",\n "cancun": "Quintana Roo",\n "veracruz": "Veracruz",\n "villahermosa": "Tabasco",\n "culiacan": "Sinaloa",\n "mazatlan": "Sinaloa"\n};\n\n// 3. PROCESAMIENTO\nfor (const item of $input.all()) {\n // Obtenemos valores originales (con default vacío)\n // En JS usamos || "" en lugar de .get(key, "")\n let raw_state = item.json["state"] || "";\n let raw_city = item.json["city"] || "";\n \n // --- PASO A: LIMPIEZA GENERAL (Quitar números) ---\n // En JS usamos .replace con regex global (/g) para imitar re.sub\n // .trim() es el equivalente a .strip() de Python\n let clean_city_str = String(raw_city).replace(/\d+/g, '').trim().replace(" ,", "");\n let clean_state_str = String(raw_state).replace(/\d+/g, '').trim();\n \n // Guardamos la ciudad limpia de una vez\n item.json["city"] = clean_city_str;\n\n // --- PASO B: MAPEO DE ABREVIATURAS ---\n // Buscamos en el objeto, si no existe usamos el original\n let final_state = state_abbr_mapping[clean_state_str] || clean_state_str;\n\n // --- PASO C: INFERENCIA POR CIUDAD ---\n if (!final_state || final_state.length < 2) {\n // .toLowerCase() es el equivalente a .lower()\n let city_key = clean_city_str.toLowerCase();\n \n if (city_to_state_mapping.hasOwnProperty(city_key)) {\n final_state = city_to_state_mapping[city_key];\n }\n }\n\n // Asignamos el resultado final capitalizado (Simulación de .title())\n if (final_state) {\n // JS no tiene .title() nativo, esto convierte "ciudad de mexico" a "Ciudad De Mexico"\n item.json["state"] = final_state.toLowerCase().split(' ').map(word => {\n return word.charAt(0).toUpperCase() + word.slice(1);\n }).join(' ');\n } else {\n item.json["state"] = "";\n }\n}\n\nreturn $input.all();"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
4592,
704
],
"id": "172c37e6-3601-44b5-b92f-257f3a00cfc8",
"name": "Abreviaturas por estado",
"retryOnFail": true,
"maxTries": 5,
"waitBetweenTries": 5000
},
{
"parameters": {
"jsCode": "return $('If dominio valido').first();"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
4416,
528
],
"id": "b87cf886-aa95-4eb4-a8e2-a6974ebfa13c",
"name": "Variables"
}
],
"connections": {
"Append a hoja "BDD input sheets"": {
"main": [
[]
]
},
"Abreviaturas por estado": {
"main": [
[
{
"node": "Append a hoja "BDD input sheets"",
"type": "main",
"index": 0
}
]
]
},
"Variables": {
"main": [
[
{
"node": "Abreviaturas por estado",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "75c8ca9bfbd9fb831779b9b2c1f1a0209e5d18fe36b85deef8131f4ba85dea04"
}
}
Share the output returned by the last node
Last Node correct output:
[
{
"Estado": "",
"País": "Mexico",
"Company Name": "PASTEURIZADORA AGUASCALIENTES",
"Email": "ejemplo@lechesanmarcos.com.mx",
"First Name": "Nombre_ficticio",
"Last Name": "Apellido_ficticio"
}
]
Last Node Incorrect output:
[
{
"output": [
{
"id": "msg_04055beffbd836ba00698ae253d3d4819c9c7e50f2d12d30a9",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"logprobs": [],
"text": {
"es_match_oficial": true,
"razon_social": "PASTEURIZADORA DE LOS PRODUCTORES DE LECHE",
"nombre_comercial": "Leche Zaragoza",
"confianza": "ALTA",
"sitio_consultado": "https://lechezaragoza.com/",
"dominio_final": "lechezaragoza.com"
}
}
],
"role": "assistant"
}
],
"city": "",
"state": ""
}
]
Debug info (this i have not changed/modified, default values)
core
storage
pruning
client
Generated at: 2026-02-10T12:59:38.771Z}