The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Tienda Nube \u2192 Sheets + Docs (Etiquetas CABA/GBA)",
"nodes": [
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"unit": "minutes",
"value": 5
}
]
}
},
"id": "cron-5m",
"name": "Schedule Trigger (5m)",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
-1200,
0
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "GET",
"url": "https://api.tiendanube.com/v1/{{STORE_ID}}/orders",
"jsonParameters": true,
"queryParametersUi": {
"parameter": [
{
"name": "status",
"value": "paid"
},
{
"name": "per_page",
"value": "50"
}
]
},
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{ACCESS_TOKEN}}"
},
{
"name": "User-Agent",
"value": "PragaBasics (tuemail@dominio.com)"
}
]
}
},
"id": "http-tiendanube",
"name": "HTTP Request \u2014 Tienda Nube (paid orders)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
-960,
0
]
},
{
"parameters": {
"functionCode": "const o = item.json || {};\nconst shipping = o.shipping_address || {};\nconst customer = o.customer || {};\nconst shippingOption = o.shipping_option || {};\nconst direccionParts = [shipping.address, shipping.number, shipping.floor, shipping.apartment].filter(Boolean);\nconst direccion = direccionParts.join(' ');\nconst localidad = shipping.city || shipping.province || '';\nconst cpostal = shipping.zip_code || shipping.zip || '';\nconst telefono = shipping.phone || customer.phone || '';\nconst email = customer.email || o.contact_email || '';\nconst nombre = shipping.name || customer.name || '';\nconst nota = o.note || o.additional_info || o.observations || '';\nconst fecha_retiro = o.shipping_pickup_date || o.delivery_date || '';\nconst n_orden = o.id || o.number || o.order_number || o.id;\nconst envio_nombre = String(shippingOption.name || shippingOption.display_name || (o.shipping_carrier && o.shipping_carrier.name) || '').toLowerCase();\nreturn { json: { n_orden, nombre, direccion, localidad, cpostal, telefono, email, nota, fecha_retiro, estado: 'PENDIENTE', envio_nombre } };"
},
"id": "fn-map",
"name": "Normaliza Pedido",
"type": "n8n-nodes-base.functionItem",
"typeVersion": 1,
"position": [
-720,
0
]
},
{
"parameters": {
"dataType": "string",
"value1": "={{$json.envio_nombre}}",
"rules": {
"rules": [
{
"operation": "regex",
"value": "caba"
},
{
"operation": "regex",
"value": "gba"
}
]
}
},
"id": "switch-caba-gba",
"name": "Switch CABA vs GBA",
"type": "n8n-nodes-base.switch",
"typeVersion": 3,
"position": [
-480,
0
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://sheets.googleapis.com/v4/spreadsheets/{{SPREADSHEET_ID_CABA}}/values/A:J:append?valueInputOption=RAW&insertDataOption=INSERT_ROWS",
"jsonParameters": true,
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{GOOGLE_ACCESS_TOKEN}}"
}
]
},
"bodyParametersJson": "={{ { \"majorDimension\": \"ROWS\", \"values\": [[ $json.n_orden, $json.nombre, $json.direccion, $json.localidad, $json.cpostal, $json.telefono, $json.email, $json.nota, $json.fecha_retiro, $json.estado ]] } }}"
},
"id": "gsheets-caba",
"name": "Append a Sheets (CABA)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
-240,
-200
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://docs.googleapis.com/v1/documents/{{DOC_ID}}:batchUpdate",
"jsonParameters": true,
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{GOOGLE_ACCESS_TOKEN}}"
}
]
},
"bodyParametersJson": "={{ { \"requests\": [ { \"insertTable\": { \"rows\": 6, \"columns\": 2, \"endOfSegmentLocation\": {} } } ] } }}"
},
"id": "gdocs-insert-caba",
"name": "Docs: Insert Table (CABA)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
0,
-200
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "GET",
"url": "https://docs.googleapis.com/v1/documents/{{DOC_ID}}",
"jsonParameters": true,
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{GOOGLE_ACCESS_TOKEN}}"
}
]
}
},
"id": "gdocs-get-caba",
"name": "Docs: Get Document (CABA)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
240,
-200
]
},
{
"parameters": {
"functionCode": "const doc = items[0].json || {};\nconst content = (doc.body && doc.body.content) ? doc.body.content : [];\nlet table = null;\nfor (let i = content.length - 1; i >= 0; i--) { if (content[i].table) { table = content[i].table; break; } }\nif (!table) { return [{ json: { error: 'No table found' } }]; }\nfunction cellStartIndex(cell) { if (!cell || !cell.content || !cell.content[0]) return null; const first = cell.content[0]; const idx = (first.startIndex != null) ? first.startIndex : (first.paragraph && first.paragraph.elements && first.paragraph.elements[0] && first.paragraph.elements[0].startIndex) || null; return (idx != null) ? idx + 1 : null; }\nconst c = {};\nfor (let r = 0; r < 6; r++) { for (let col = 0; col < 2; col++) { const idx = cellStartIndex(table.tableRows[r].tableCells[col]); c[`r${r}c${col}`] = idx; } }\nreturn [{ json: { cellIndex: c } }];"
},
"id": "fn-indices-caba",
"name": "Indices Tabla (CABA)",
"type": "n8n-nodes-base.function",
"typeVersion": 2,
"position": [
480,
-200
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://docs.googleapis.com/v1/documents/{{DOC_ID}}:batchUpdate",
"jsonParameters": true,
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{GOOGLE_ACCESS_TOKEN}}"
}
]
},
"bodyParametersJson": "={{ { \"requests\": [ {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r0c0}, \"text\": \"Nombre y Apellido\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r0c1}, \"text\": $node[\"Normaliza Pedido\"].json[\"nombre\"]}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r1c0}, \"text\": \"Calle y Altura\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r1c1}, \"text\": $node[\"Normaliza Pedido\"].json[\"direccion\"]}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r2c0}, \"text\": \"Localidad y CP\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r2c1}, \"text\": ($node[\"Normaliza Pedido\"].json[\"localidad\"] || '') + ' ' + ($node[\"Normaliza Pedido\"].json[\"cpostal\"] || '')}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r3c0}, \"text\": \"Celular\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r3c1}, \"text\": $node[\"Normaliza Pedido\"].json[\"telefono\"]}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r4c0}, \"text\": \"Nota\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r4c1}, \"text\": $node[\"Normaliza Pedido\"].json[\"nota\"]}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r5c0}, \"text\": \"N\u00famero de Orden\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r5c1}, \"text\": String($node[\"Normaliza Pedido\"].json[\"n_orden\"])}} ] } }}"
},
"id": "gdocs-fill-caba",
"name": "Docs: Fill Table (CABA)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
720,
-200
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://sheets.googleapis.com/v4/spreadsheets/{{SPREADSHEET_ID_GBA}}/values/A:J:append?valueInputOption=RAW&insertDataOption=INSERT_ROWS",
"jsonParameters": true,
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{GOOGLE_ACCESS_TOKEN}}"
}
]
},
"bodyParametersJson": "={{ { \"majorDimension\": \"ROWS\", \"values\": [[ $json.n_orden, $json.nombre, $json.direccion, $json.localidad, $json.cpostal, $json.telefono, $json.email, $json.nota, $json.fecha_retiro, $json.estado ]] } }}"
},
"id": "gsheets-gba",
"name": "Append a Sheets (GBA)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
-240,
220
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://docs.googleapis.com/v1/documents/{{DOC_ID}}:batchUpdate",
"jsonParameters": true,
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{GOOGLE_ACCESS_TOKEN}}"
}
]
},
"bodyParametersJson": "={{ { \"requests\": [ { \"insertTable\": { \"rows\": 6, \"columns\": 2, \"endOfSegmentLocation\": {} } } ] } }}"
},
"id": "gdocs-insert-gba",
"name": "Docs: Insert Table (GBA)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
0,
220
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "GET",
"url": "https://docs.googleapis.com/v1/documents/{{DOC_ID}}",
"jsonParameters": true,
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{GOOGLE_ACCESS_TOKEN}}"
}
]
}
},
"id": "gdocs-get-gba",
"name": "Docs: Get Document (GBA)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
240,
220
]
},
{
"parameters": {
"functionCode": "const doc = items[0].json || {};\nconst content = (doc.body && doc.body.content) ? doc.body.content : [];\nlet table = null;\nfor (let i = content.length - 1; i >= 0; i--) { if (content[i].table) { table = content[i].table; break; } }\nif (!table) { return [{ json: { error: 'No table found' } }]; }\nfunction cellStartIndex(cell) { if (!cell || !cell.content || !cell.content[0]) return null; const first = cell.content[0]; const idx = (first.startIndex != null) ? first.startIndex : (first.paragraph && first.paragraph.elements && first.paragraph.elements[0] && first.paragraph.elements[0].startIndex) || null; return (idx != null) ? idx + 1 : null; }\nconst c = {};\nfor (let r = 0; r < 6; r++) { for (let col = 0; col < 2; col++) { const idx = cellStartIndex(table.tableRows[r].tableCells[col]); c[`r${r}c${col}`] = idx; } }\nreturn [{ json: { cellIndex: c } }];"
},
"id": "fn-indices-gba",
"name": "Indices Tabla (GBA)",
"type": "n8n-nodes-base.function",
"typeVersion": 2,
"position": [
480,
220
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://docs.googleapis.com/v1/documents/{{DOC_ID}}:batchUpdate",
"jsonParameters": true,
"headerParametersUi": {
"parameter": [
{
"name": "Authorization",
"value": "Bearer {{GOOGLE_ACCESS_TOKEN}}"
}
]
},
"bodyParametersJson": "={{ { \"requests\": [ {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r0c0}, \"text\": \"Nombre y Apellido\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r0c1}, \"text\": $node[\"Normaliza Pedido\"].json[\"nombre\"]}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r1c0}, \"text\": \"Calle y Altura\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r1c1}, \"text\": $node[\"Normaliza Pedido\"].json[\"direccion\"]}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r2c0}, \"text\": \"Localidad y CP\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r2c1}, \"text\": ($node[\"Normaliza Pedido\"].json[\"localidad\"] || '') + ' ' + ($node[\"Normaliza Pedido\"].json[\"cpostal\"] || '')}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r3c0}, \"text\": \"Celular\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r3c1}, \"text\": $node[\"Normaliza Pedido\"].json[\"telefono\"]}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r4c0}, \"text\": \"Nota\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r4c1}, \"text\": $node[\"Normaliza Pedido\"].json[\"nota\"]}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r5c0}, \"text\": \"N\u00famero de Orden\"}}, {\"insertText\": {\"location\": {\"index\": $json.cellIndex.r5c1}, \"text\": String($node[\"Normaliza Pedido\"].json[\"n_orden\"])}} ] } }}"
},
"id": "gdocs-fill-gba",
"name": "Docs: Fill Table (GBA)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
720,
220
]
}
],
"connections": {
"Schedule Trigger (5m)": {
"main": [
[
{
"node": "HTTP Request \u2014 Tienda Nube (paid orders)",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request \u2014 Tienda Nube (paid orders)": {
"main": [
[
{
"node": "Normaliza Pedido",
"type": "main",
"index": 0
}
]
]
},
"Normaliza Pedido": {
"main": [
[
{
"node": "Switch CABA vs GBA",
"type": "main",
"index": 0
}
]
]
},
"Switch CABA vs GBA": {
"main": [
[
{
"node": "Append a Sheets (CABA)",
"type": "main",
"index": 0
}
],
[
{
"node": "Append a Sheets (GBA)",
"type": "main",
"index": 0
}
]
]
},
"Append a Sheets (CABA)": {
"main": [
[
{
"node": "Docs: Insert Table (CABA)",
"type": "main",
"index": 0
}
]
]
},
"Docs: Insert Table (CABA)": {
"main": [
[
{
"node": "Docs: Get Document (CABA)",
"type": "main",
"index": 0
}
]
]
},
"Docs: Get Document (CABA)": {
"main": [
[
{
"node": "Indices Tabla (CABA)",
"type": "main",
"index": 0
}
]
]
},
"Indices Tabla (CABA)": {
"main": [
[
{
"node": "Docs: Fill Table (CABA)",
"type": "main",
"index": 0
}
]
]
},
"Append a Sheets (GBA)": {
"main": [
[
{
"node": "Docs: Insert Table (GBA)",
"type": "main",
"index": 0
}
]
]
},
"Docs: Insert Table (GBA)": {
"main": [
[
{
"node": "Docs: Get Document (GBA)",
"type": "main",
"index": 0
}
]
]
},
"Docs: Get Document (GBA)": {
"main": [
[
{
"node": "Indices Tabla (GBA)",
"type": "main",
"index": 0
}
]
]
},
"Indices Tabla (GBA)": {
"main": [
[
{
"node": "Docs: Fill Table (GBA)",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Tienda Nube → Sheets + Docs (Etiquetas CABA/GBA). Uses httpRequest, functionItem. Scheduled trigger; 14 nodes.
Source: https://gist.github.com/GonzaloAguilera06/62485e1899e236620cfcb71a2b3778ec — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
AI-Powered Short-Form Video Generator with OpenAI, Flux, Kling, and ElevenLabs and upload to all .... Uses httpRequest, googleDrive, discord, googleSheets. Scheduled trigger; 51 nodes.
Free Support: Setting up and getting the workflow tailord to your needs. One small free adjustment included.
Continuous quality checks for your production LLM prompts. Keeps a golden test set in n8n Data Tables, runs it on a schedule against any OpenAI-compatible API, compares each run to a blessed baseline,
This workflow aims to help you and your team track your expenses with OpenAI It automatically collects your OpenAI organization’s API usage and cost data every few days and saves it to a ready-to-use
This n8n workflow automates Kubernetes root cause analysis (RCA) and incident alerting by integrating with Loki, Prometheus, and Slack. It streamlines log collection, cluster health monitoring, and AI