Publication des paramètres de taux de change SAP
Ceci est unAI, IT Opsworkflow d'automatisation du domainecontenant 22 nœuds.Utilise principalement des nœuds comme Set, Limit, Switch, Webhook, SplitOut, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. Téléverse flexible des taux de change SAP B1 avec validation IA et sources de données multiples
- •Point de terminaison HTTP Webhook (généré automatiquement par n8n)
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
- •Informations d'identification Google Sheets API
- •Clé API OpenAI
Nœuds utilisés (22)
{
"id": "orfFmTSduPuXzA9M",
"meta": {
"instanceId": "06b3271522ae4bedcb94de9dac3219d19e1a4e5fcd0a448a4abc68198b391077",
"templateCredsSetupCompleted": true
},
"name": "SAP SetCurrencyRate publicar",
"tags": [],
"nodes": [
{
"id": "3995b39d-8f9e-4ed8-9919-cfb8b7df4555",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-400,
200
],
"webhookId": "b81a1fa5-2138-4b70-80ee-945fa44e69ce",
"parameters": {
"path": "b81a1fa5-2138-4b70-80ee-945fa44e69ce",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 1
},
{
"id": "c0fca1fe-e89f-448f-914a-986609e349ab",
"name": "Commutateur",
"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": "Envoyer 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": "Connecter 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": {
"id": "m9hMdVOqOAfRvsja",
"name": "Microsoft SQL account"
}
},
"typeVersion": 1.1
},
{
"id": "591a6fab-dfc2-4c23-889a-dc82701cbe8b",
"name": "Extraire Requête",
"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": "Envoyer 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": "Limite",
"type": "n8n-nodes-base.limit",
"position": [
880,
40
],
"parameters": {
"maxItems": 10
},
"typeVersion": 1
},
{
"id": "08588a10-01f2-4e3d-86f6-ee7a4393d986",
"name": "Envoyer SAP (MANUEL)",
"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 único que contiene arrays anidados.\n- Un array de objetos directamente.\n\nDevuélveme un JSON así:\n\n{\n \"rate\": [\n { ... },\n { ... },\n ...\n ]\n}\n\nEste formato es para procesar fácilmente cada objeto por separado en n8n usando `Item Lists → 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": {
"id": "bzsMy0qoZwAw3BhM",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "86f8976a-1715-4192-9228-14ae2a451631",
"name": "Diviser",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "cd66ebf5-9266-47dd-9e46-012a64f06fdb",
"name": "Envoyer SAP (FEUILLE)",
"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": "Succès",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "54807d8b-df01-4932-8f65-750853fe828c",
"name": "Échec",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "b32f9a30-3ba4-4b45-9bb5-edd3feca7277",
"name": "Succès1",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "f41ae072-181a-4480-bb4a-759418409e6f",
"name": "Vérifier Date",
"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úrate de que:\n- El campo `RateDate` esté 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⚠️ Si el campo `RateDate` ya está en formato `yyyyMMdd`, déjalo igual.\n\nDevuélveme 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": {
"id": "bzsMy0qoZwAw3BhM",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "88eed1d3-bf5e-4338-b829-a7031134bcba",
"name": "Échec1",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "6def1d6b-c496-4cb4-91e3-683fe346ffcf",
"name": "Succès2",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "68da45f2-3480-4133-b71c-a2116eff7e25",
"name": "Échec2",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "d4bcbae9-d8b8-4e0d-aabb-290adb3a3a84",
"name": "Succès3",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "029f31d2-3c97-4a66-83f9-e2405053d32c",
"name": "Échec3",
"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": {
"id": "5UMhhnm7ZoIEGIE4",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "79345188-a7cb-4dc1-beaf-e020fe859782",
"connections": {
"99a4e171-2b5a-447c-bbf6-a6d29c82084c": {
"main": [
[
{
"node": "f41ae072-181a-4480-bb4a-759418409e6f",
"type": "main",
"index": 0
}
]
]
},
"15295241-b9d4-4019-a24d-f902e789a49e": {
"main": [
[
{
"node": "86f8976a-1715-4192-9228-14ae2a451631",
"type": "main",
"index": 0
}
]
]
},
"c0fca1fe-e89f-448f-914a-986609e349ab": {
"main": [
[
{
"node": "15295241-b9d4-4019-a24d-f902e789a49e",
"type": "main",
"index": 0
}
],
[
{
"node": "591a6fab-dfc2-4c23-889a-dc82701cbe8b",
"type": "main",
"index": 0
}
],
[
{
"node": "77b9008d-ff45-4ce9-866d-178fa4d0f2c4",
"type": "main",
"index": 0
}
],
[
{
"node": "08588a10-01f2-4e3d-86f6-ee7a4393d986",
"type": "main",
"index": 0
}
]
]
},
"3995b39d-8f9e-4ed8-9919-cfb8b7df4555": {
"main": [
[
{
"node": "51aa4842-0177-40d4-9931-cdf90b09f9d8",
"type": "main",
"index": 0
}
]
]
},
"86f8976a-1715-4192-9228-14ae2a451631": {
"main": [
[
{
"node": "f47c38b0-67fa-4f0d-98c6-b088253fe06f",
"type": "main",
"index": 0
}
]
]
},
"51aa4842-0177-40d4-9931-cdf90b09f9d8": {
"main": [
[
{
"node": "c0fca1fe-e89f-448f-914a-986609e349ab",
"type": "main",
"index": 0
}
]
]
},
"591a6fab-dfc2-4c23-889a-dc82701cbe8b": {
"main": [
[
{
"node": "b5fb4c29-f1ca-4dca-b830-975ed1a5d76e",
"type": "main",
"index": 0
}
]
]
},
"77b9008d-ff45-4ce9-866d-178fa4d0f2c4": {
"main": [
[
{
"node": "cd66ebf5-9266-47dd-9e46-012a64f06fdb",
"type": "main",
"index": 0
}
]
]
},
"b5fb4c29-f1ca-4dca-b830-975ed1a5d76e": {
"main": [
[
{
"node": "99a4e171-2b5a-447c-bbf6-a6d29c82084c",
"type": "main",
"index": 0
}
]
]
},
"f41ae072-181a-4480-bb4a-759418409e6f": {
"main": [
[
{
"node": "293eaf33-7cb3-4b0e-a37e-513607fdca83",
"type": "main",
"index": 0
}
]
]
},
"293eaf33-7cb3-4b0e-a37e-513607fdca83": {
"main": [
[
{
"node": "b32f9a30-3ba4-4b45-9bb5-edd3feca7277",
"type": "main",
"index": 0
}
],
[
{
"node": "88eed1d3-bf5e-4338-b829-a7031134bcba",
"type": "main",
"index": 0
}
]
]
},
"f47c38b0-67fa-4f0d-98c6-b088253fe06f": {
"main": [
[
{
"node": "fe249d41-6cf2-4bee-bc02-16abb9c58339",
"type": "main",
"index": 0
}
],
[
{
"node": "54807d8b-df01-4932-8f65-750853fe828c",
"type": "main",
"index": 0
}
]
]
},
"cd66ebf5-9266-47dd-9e46-012a64f06fdb": {
"main": [
[
{
"node": "6def1d6b-c496-4cb4-91e3-683fe346ffcf",
"type": "main",
"index": 0
}
],
[
{
"node": "68da45f2-3480-4133-b71c-a2116eff7e25",
"type": "main",
"index": 0
}
]
]
},
"08588a10-01f2-4e3d-86f6-ee7a4393d986": {
"main": [
[
{
"node": "d4bcbae9-d8b8-4e0d-aabb-290adb3a3a84",
"type": "main",
"index": 0
}
],
[
{
"node": "029f31d2-3c97-4a66-83f9-e2405053d32c",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Intelligence Artificielle, Opérations IT
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Raquel Giugliano
@raquelgiuglianoPartager ce workflow