This workflow corresponds to n8n.io template #4931 — we link there as the canonical source.
This workflow follows the Google Sheets → HTTP Request recipe pattern — see all workflows that pair these two integrations.
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 →
{
"id": "orfFmTSduPuXzA9M",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "SAP SetCurrencyRate publicar",
"tags": [],
"nodes": [
{
"id": "3995b39d-8f9e-4ed8-9919-cfb8b7df4555",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-400,
200
],
"parameters": {
"path": "b81a1fa5-2138-4b70-80ee-945fa44e69ce",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 1
},
{
"id": "c0fca1fe-e89f-448f-914a-986609e349ab",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
120,
160
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "JSON",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "92e037df-a8ef-402e-ba21-7ae482659d64",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Webhook').item.json.body.origen }}",
"rightValue": "JSON"
}
]
},
"renameOutput": true
},
{
"outputKey": "SQL",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cc611430-1094-4ff3-a7ff-a33839f95da3",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Webhook').item.json.body.origen }}",
"rightValue": "SQL"
}
]
},
"renameOutput": true
},
{
"outputKey": "SHEETS",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "50e8b710-12d1-4bf1-8293-bdf84f77bb06",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Webhook').item.json.body.origen }}",
"rightValue": "GoogleSheets"
}
]
},
"renameOutput": true
},
{
"outputKey": "MANUAL",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5e5bc8db-919f-4040-9663-9b2f0742017f",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Webhook').item.json.body.origen }}",
"rightValue": "Manual"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2,
"alwaysOutputData": false
},
{
"id": "f47c38b0-67fa-4f0d-98c6-b088253fe06f",
"name": "Enviar SAP (JSON)",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
1140,
-180
],
"parameters": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"body": "={\n \"Currency\": \"{{ $json.Currency }}\",\n \"Rate\": \"{{ $json.Rate }}\",\n \"RateDate\": \"{{ $json.RateDate }}\"\n}\n",
"method": "POST",
"options": {
"allowUnauthorizedCerts": true
},
"sendBody": true,
"contentType": "raw",
"sendHeaders": true,
"rawContentType": "application/json",
"headerParameters": {
"parameters": [
{
"name": "Cookie",
"value": "=B1SESSION={{ $('Conectar SAP').item.json.SessionId }}"
}
]
}
},
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "51aa4842-0177-40d4-9931-cdf90b09f9d8",
"name": "Conectar SAP",
"type": "n8n-nodes-base.httpRequest",
"position": [
-160,
200
],
"parameters": {
"url": "={{ $vars.url_sap }}Login",
"method": "POST",
"options": {
"allowUnauthorizedCerts": true
},
"jsonBody": "={\n \"UserName\": \"{{ $vars.user_sap }}\",\n \"Password\": \"{{ $vars.password_sap }}\",\n \"CompanyDB\": \"{{ $vars.company_db }}\"\n}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "b5fb4c29-f1ca-4dca-b830-975ed1a5d76e",
"name": "Microsoft SQL",
"type": "n8n-nodes-base.microsoftSql",
"position": [
660,
40
],
"parameters": {
"query": "{{ $json.select_sql }}",
"operation": "executeQuery"
},
"credentials": {
"microsoftSql": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "591a6fab-dfc2-4c23-889a-dc82701cbe8b",
"name": "Extraer Query",
"type": "n8n-nodes-base.set",
"position": [
420,
40
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ffd45f1e-2e64-43cd-b885-1954cf490d41",
"name": "select_sql",
"type": "string",
"value": "={{ $('Webhook').item.json.body.sql }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "293eaf33-7cb3-4b0e-a37e-513607fdca83",
"name": "Enviar SAP (SQL)",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
1600,
40
],
"parameters": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"body": "={\n \"Currency\": \"{{ $json.message.content.Currency }}\",\n \"Rate\": \"{{ $json.message.content.Rate }}\",\n \"RateDate\": \"{{ $json.message.content.RateDate }}\"\n}",
"method": "POST",
"options": {
"allowUnauthorizedCerts": true
},
"sendBody": true,
"contentType": "raw",
"sendHeaders": true,
"rawContentType": "application/json",
"headerParameters": {
"parameters": [
{
"name": "Cookie",
"value": "=B1SESSION={{ $('Conectar SAP').item.json.SessionId }}"
}
]
}
},
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "99a4e171-2b5a-447c-bbf6-a6d29c82084c",
"name": "Limit",
"type": "n8n-nodes-base.limit",
"position": [
880,
40
],
"parameters": {
"maxItems": 10
},
"typeVersion": 1
},
{
"id": "08588a10-01f2-4e3d-86f6-ee7a4393d986",
"name": "Enviar SAP (MANUAL)",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
440,
700
],
"parameters": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"body": "={\n \"Currency\": \"{{ $('Webhook').item.json.body.currency }}\",\n \"Rate\": \"{{ $('Webhook').item.json.body.rate }}\",\n \"RateDate\": \"{{ $('Webhook').item.json.body.rateDate }}\"\n}",
"method": "POST",
"options": {
"allowUnauthorizedCerts": true
},
"sendBody": true,
"contentType": "raw",
"sendHeaders": true,
"rawContentType": "application/json",
"headerParameters": {
"parameters": [
{
"name": "Cookie",
"value": "=B1SESSION={{ $json.SessionId }}"
}
]
}
},
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "15295241-b9d4-4019-a24d-f902e789a49e",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
420,
-180
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=Tengo un JSON con estructura variable. Quiero que lo transformes en un JSON uniforme que tenga un solo array llamado `rate`, donde cada objeto del array represente una entrada individual.\n\nNo importa si los datos vienen en:\n- Un objeto con una clave como `data`, `results`, `rows`, etc.\n- Un objeto \u00fanico que contiene arrays anidados.\n- Un array de objetos directamente.\n\nDevu\u00e9lveme un JSON as\u00ed:\n\n{\n \"rate\": [\n { ... },\n { ... },\n ...\n ]\n}\n\nEste formato es para procesar f\u00e1cilmente cada objeto por separado en n8n usando `Item Lists \u2192 Split Out Items`.\n\nSolo quiero que me devuelvas el JSON transformado. No expliques nada ni incluyas comentarios.\n\nEste es el json que tienes que arreglar:\n{{ $('Webhook').item.json.body.json }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "86f8976a-1715-4192-9228-14ae2a451631",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
880,
-180
],
"parameters": {
"options": {},
"fieldToSplitOut": "message.content.rate"
},
"typeVersion": 1
},
{
"id": "77b9008d-ff45-4ce9-866d-178fa4d0f2c4",
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
420,
340
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xFcJSzQyhPOaC-zeX2dJ7LaUxpg-vxiN3EAOBxLTQ4g/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1xFcJSzQyhPOaC-zeX2dJ7LaUxpg-vxiN3EAOBxLTQ4g",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1xFcJSzQyhPOaC-zeX2dJ7LaUxpg-vxiN3EAOBxLTQ4g/edit?usp=drivesdk",
"cachedResultName": "RATE"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "cd66ebf5-9266-47dd-9e46-012a64f06fdb",
"name": "Enviar SAP (SHEET)",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
660,
340
],
"parameters": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"body": "={\n \"Currency\": \"{{ $json.Currency }}\",\n \"Rate\": \"{{ $json.Rate }}\",\n \"RateDate\": \"{{ $json.RateDate }}\"\n}",
"method": "POST",
"options": {
"allowUnauthorizedCerts": true
},
"sendBody": true,
"contentType": "raw",
"sendHeaders": true,
"rawContentType": "application/json",
"headerParameters": {
"parameters": [
{
"name": "Cookie",
"value": "=B1SESSION={{ $('Conectar SAP').item.json.SessionId }}"
}
]
}
},
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "fe249d41-6cf2-4bee-bc02-16abb9c58339",
"name": "Success",
"type": "n8n-nodes-base.googleSheets",
"position": [
1420,
-380
],
"parameters": {
"columns": {
"value": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"json": "={\n \"Currency\": \"{{ $('Split Out').item.json.Currency }}\",\n \"Rate\": \"{{ $('Split Out').item.json.Rate }}\",\n \"RateDate\": \"{{ $('Split Out').item.json.RateDate }}\"\n}",
"method": "POST",
"message": "=Enviado correctamente a SAP, pero sin contenido",
"workflow": "SAPB1-1SBOBobService_SetCurrencyRate",
"status_code": "=204"
},
"schema": [
{
"id": "workflow",
"type": "string",
"display": true,
"required": false,
"displayName": "workflow",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "method",
"type": "string",
"display": true,
"required": false,
"displayName": "method",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "json",
"type": "string",
"display": true,
"required": false,
"displayName": "json",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status_code",
"type": "string",
"display": true,
"required": false,
"displayName": "status_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit?usp=drivesdk",
"cachedResultName": "LOGS_N8N"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "54807d8b-df01-4932-8f65-750853fe828c",
"name": "Fallo",
"type": "n8n-nodes-base.googleSheets",
"position": [
1420,
-200
],
"parameters": {
"columns": {
"value": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"json": "={\n \"Currency\": \"{{ $json.Currency }}\",\n \"Rate\": \"{{ $json.Rate }}\",\n \"RateDate\": \"{{ $json.RateDate }}\"\n}",
"method": "POST",
"message": "={{ $json.error.message }}",
"workflow": "SAPB1-1SBOBobService_SetCurrencyRate",
"status_code": "={{ $json.error.status }}"
},
"schema": [
{
"id": "workflow",
"type": "string",
"display": true,
"required": false,
"displayName": "workflow",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "method",
"type": "string",
"display": true,
"required": false,
"displayName": "method",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "json",
"type": "string",
"display": true,
"required": false,
"displayName": "json",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status_code",
"type": "string",
"display": true,
"required": false,
"displayName": "status_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit?usp=drivesdk",
"cachedResultName": "LOGS_N8N"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "b32f9a30-3ba4-4b45-9bb5-edd3feca7277",
"name": "Success1",
"type": "n8n-nodes-base.googleSheets",
"position": [
1860,
-100
],
"parameters": {
"columns": {
"value": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"json": "={\n \"Currency\": \"{{ $('Comprobar Fecha').item.json.message.content.Currency }}\",\n \"Rate\": \"{{ $('Comprobar Fecha').item.json.message.content.Rate }}\",\n \"RateDate\": \"{{ $('Comprobar Fecha').item.json.message.content.RateDate }}\"\n}",
"method": "POST",
"message": "=Enviado correctamente a SAP, pero sin contenido",
"workflow": "SAPB1-1SBOBobService_SetCurrencyRate",
"status_code": "=204"
},
"schema": [
{
"id": "workflow",
"type": "string",
"display": true,
"required": false,
"displayName": "workflow",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "method",
"type": "string",
"display": true,
"required": false,
"displayName": "method",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "json",
"type": "string",
"display": true,
"required": false,
"displayName": "json",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status_code",
"type": "string",
"display": true,
"required": false,
"displayName": "status_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit?usp=drivesdk",
"cachedResultName": "LOGS_N8N"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "f41ae072-181a-4480-bb4a-759418409e6f",
"name": "Comprobar Fecha",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1120,
40
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=Quiero que verifiques y transformes el campo `RateDate` en un JSON.\n\nToma cualquier JSON que te pase y aseg\u00farate de que:\n- El campo `RateDate` est\u00e9 en formato `yyyyMMdd` (por ejemplo, `20250612`).\n- Si `RateDate` viene como:\n - `YYYY-MM-DD` (ejemplo: `2025-06-12`)\n - `YYYY-MM-DDTHH:mm:ss.sssZ` (ejemplo: `2025-06-12T00:00:00.000Z`)\n - Timestamp (ejemplo: `1686528000000`)\n - O cualquier otra variante\n Entonces debes **convertirlo al formato exacto `yyyyMMdd` como string**.\n\n\u26a0\ufe0f Si el campo `RateDate` ya est\u00e1 en formato `yyyyMMdd`, d\u00e9jalo igual.\n\nDevu\u00e9lveme el JSON transformado **con el campo `RateDate` corregido**. No incluyas explicaciones ni comentarios, solo el nuevo JSON.\n\nJSON a comprobar:\n{\n \"Currency\": \"{{ $json.Currency }}\",\n \"Rate\": \"{{ $json.Rate }}\",\n \"RateDate\": \"{{ $json.RateDate }}\"\n}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "88eed1d3-bf5e-4338-b829-a7031134bcba",
"name": "Fallo1",
"type": "n8n-nodes-base.googleSheets",
"position": [
1860,
120
],
"parameters": {
"columns": {
"value": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"json": "={\n \"Currency\": \"{{ $json.Currency }}\",\n \"Rate\": \"{{ $json.Rate }}\",\n \"RateDate\": \"{{ $json.RateDate }}\"\n}",
"method": "POST",
"message": "={{ $json.error.message }}",
"workflow": "SAPB1-1SBOBobService_SetCurrencyRate",
"status_code": "={{ $json.error.status }}"
},
"schema": [
{
"id": "workflow",
"type": "string",
"display": true,
"required": false,
"displayName": "workflow",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "method",
"type": "string",
"display": true,
"required": false,
"displayName": "method",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "json",
"type": "string",
"display": true,
"required": false,
"displayName": "json",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status_code",
"type": "string",
"display": true,
"required": false,
"displayName": "status_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit?usp=drivesdk",
"cachedResultName": "LOGS_N8N"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "6def1d6b-c496-4cb4-91e3-683fe346ffcf",
"name": "Success2",
"type": "n8n-nodes-base.googleSheets",
"position": [
900,
220
],
"parameters": {
"columns": {
"value": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"json": "={\n \"Currency\": \"{{ $('Google Sheets').item.json.Currency }}\",\n \"Rate\": \"{{ $('Google Sheets').item.json.Rate }}\",\n \"RateDate\": \"{{ $('Google Sheets').item.json.RateDate }}\"\n}",
"method": "POST",
"message": "=Enviado correctamente a SAP, pero sin contenido",
"workflow": "SAPB1-1SBOBobService_SetCurrencyRate",
"status_code": "=204"
},
"schema": [
{
"id": "workflow",
"type": "string",
"display": true,
"required": false,
"displayName": "workflow",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "method",
"type": "string",
"display": true,
"required": false,
"displayName": "method",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "json",
"type": "string",
"display": true,
"required": false,
"displayName": "json",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status_code",
"type": "string",
"display": true,
"required": false,
"displayName": "status_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit?usp=drivesdk",
"cachedResultName": "LOGS_N8N"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "68da45f2-3480-4133-b71c-a2116eff7e25",
"name": "Fallo2",
"type": "n8n-nodes-base.googleSheets",
"position": [
900,
440
],
"parameters": {
"columns": {
"value": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"json": "={\n \"Currency\": \"{{ $json.Currency }}\",\n \"Rate\": \"{{ $json.Rate }}\",\n \"RateDate\": \"{{ $json.RateDate }}\"\n}",
"method": "POST",
"message": "={{ $json.error.message }}",
"workflow": "SAPB1-1SBOBobService_SetCurrencyRate",
"status_code": "={{ $json.error.status }}"
},
"schema": [
{
"id": "workflow",
"type": "string",
"display": true,
"required": false,
"displayName": "workflow",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "method",
"type": "string",
"display": true,
"required": false,
"displayName": "method",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "json",
"type": "string",
"display": true,
"required": false,
"displayName": "json",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status_code",
"type": "string",
"display": true,
"required": false,
"displayName": "status_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit?usp=drivesdk",
"cachedResultName": "LOGS_N8N"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "d4bcbae9-d8b8-4e0d-aabb-290adb3a3a84",
"name": "Success3",
"type": "n8n-nodes-base.googleSheets",
"position": [
660,
580
],
"parameters": {
"columns": {
"value": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"json": "={\n \"Currency\": \"{{ $('Webhook').item.json.body.currency }}\",\n \"Rate\": \"{{ $('Webhook').item.json.body.rate }}\",\n \"RateDate\": \"{{ $('Webhook').item.json.body.rateDate }}\"\n}",
"method": "POST",
"message": "=Enviado correctamente a SAP, pero sin contenido",
"workflow": "SAPB1-1SBOBobService_SetCurrencyRate",
"status_code": "=204"
},
"schema": [
{
"id": "workflow",
"type": "string",
"display": true,
"required": false,
"displayName": "workflow",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "method",
"type": "string",
"display": true,
"required": false,
"displayName": "method",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "json",
"type": "string",
"display": true,
"required": false,
"displayName": "json",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status_code",
"type": "string",
"display": true,
"required": false,
"displayName": "status_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit?usp=drivesdk",
"cachedResultName": "LOGS_N8N"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "029f31d2-3c97-4a66-83f9-e2405053d32c",
"name": "Fallo3",
"type": "n8n-nodes-base.googleSheets",
"position": [
660,
780
],
"parameters": {
"columns": {
"value": {
"url": "={{ $vars.url_sap }}SBOBobService_SetCurrencyRate",
"json": "={\n \"Currency\": \"{{ $('Webhook').item.json.body.currency }}\",\n \"Rate\": \"{{ $('Webhook').item.json.body.rate }}\",\n \"RateDate\": \"{{ $('Webhook').item.json.body.rateDate }}\"\n}",
"method": "POST",
"message": "={{ $json.error.message }}",
"workflow": "SAPB1-1SBOBobService_SetCurrencyRate",
"status_code": "={{ $json.error.status }}"
},
"schema": [
{
"id": "workflow",
"type": "string",
"display": true,
"required": false,
"displayName": "workflow",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "method",
"type": "string",
"display": true,
"required": false,
"displayName": "method",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "json",
"type": "string",
"display": true,
"required": false,
"displayName": "json",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status_code",
"type": "string",
"display": true,
"required": false,
"displayName": "status_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D0qRdFRf8EHH4gAf9JD3tLDofOf8lqcBBXzMl7cmpDM/edit?usp=drivesdk",
"cachedResultName": "LOGS_N8N"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "79345188-a7cb-4dc1-beaf-e020fe859782",
"connections": {
"Limit": {
"main": [
[
{
"node": "Comprobar Fecha",
"type": "main",
"index": 0
}
]
]
},
"OpenAI": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
],
[
{
"node": "Extraer Query",
"type": "main",
"index": 0
}
],
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
],
[
{
"node": "Enviar SAP (MANUAL)",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Conectar SAP",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Enviar SAP (JSON)",
"type": "main",
"index": 0
}
]
]
},
"Conectar SAP": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Extraer Query": {
"main": [
[
{
"node": "Microsoft SQL",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets": {
"main": [
[
{
"node": "Enviar SAP (SHEET)",
"type": "main",
"index": 0
}
]
]
},
"Microsoft SQL": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
},
"Comprobar Fecha": {
"main": [
[
{
"node": "Enviar SAP (SQL)",
"type": "main",
"index": 0
}
]
]
},
"Enviar SAP (SQL)": {
"main": [
[
{
"node": "Success1",
"type": "main",
"index": 0
}
],
[
{
"node": "Fallo1",
"type": "main",
"index": 0
}
]
]
},
"Enviar SAP (JSON)": {
"main": [
[
{
"node": "Success",
"type": "main",
"index": 0
}
],
[
{
"node": "Fallo",
"type": "main",
"index": 0
}
]
]
},
"Enviar SAP (SHEET)": {
"main": [
[
{
"node": "Success2",
"type": "main",
"index": 0
}
],
[
{
"node": "Fallo2",
"type": "main",
"index": 0
}
]
]
},
"Enviar SAP (MANUAL)": {
"main": [
[
{
"node": "Success3",
"type": "main",
"index": 0
}
],
[
{
"node": "Fallo3",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleSheetsOAuth2ApimicrosoftSqlopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automates currency rate uploads into SAP Business One via Service Layer, using flexible input sources such as JSON (API), SQL Server, Google Sheets, or manual values. It leverages logic branching, AI validation, and logging for complete control and traceability.
Source: https://n8n.io/workflows/4931/ — 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.
Instantly map all internal URLs, perform AI-powered (ChatGPT) analysis, and deliver results in HTML via webhook, Google Sheets, or email. All from your own n8n instance!
Watch on Youtube▶️
This workflow is perfect for marketing agencies, SEO consultants, and growth specialists who need to scale personalized outreach without spending hours on manual research.
This workflow automates the creation of Journal Entries in SAP Business One (SAP B1). Depending on the source of the input data, it dynamically transforms and sends accounting records in the appropria
How it works: Send notes from Obsidian via Webhook to start the audio conversion OpenAI converts your text to natural-sounding audio and generates episode descriptions Audio files are stored in Cloudi