Investigación de números de aduana V2
Este es unDocument Extraction, Multimodal AIflujo de automatización del dominio deautomatización que contiene 14 nodos.Utiliza principalmente nodos como Set, Gmail, Aggregate, HttpRequest, GoogleSheets. Automatizar la consulta y enriquecimiento de códigos HS con Google Sheets y API de aduanas
- •Cuenta de Google y credenciales de API de Gmail
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Credenciales de API de Google Sheets
Nodos utilizados (14)
{
"id": "LdR1WNr3yM5Lw9X8",
"meta": {
"instanceId": "509eaff0b96002e800c9adf0e9388b12a38c09e15983331392a1f621addc4db4"
},
"name": "Customs_Tariff_Number_Research V2",
"tags": [],
"nodes": [
{
"id": "ec7c3dd9-74ee-4008-b32c-da57d6069e30",
"name": "Disparador de chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-336,
336
],
"webhookId": "170756e8-3be9-43f5-81ce-284e8cf78635",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "0f817acd-9c17-4756-90ba-ff1106edad53",
"name": "Customs Tariff API Query",
"type": "n8n-nodes-base.httpRequest",
"position": [
-144,
336
],
"parameters": {
"url": "=https://www.zolltarifnummern.de/api/v2/cnSuggest?term={{ encodeURIComponent($json.chatInput) }}&lang=de",
"options": {
"timeout": 10000,
"response": {
"response": {
"responseFormat": "json"
}
},
"allowUnauthorizedCerts": true
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "n8n-workflow/1.0"
}
]
}
},
"typeVersion": 4.2,
"continueOnFail": true
},
{
"id": "8d670dda-9b23-4542-bb8f-ce7074beac64",
"name": "Output Customs Tariff Number",
"type": "n8n-nodes-base.set",
"position": [
48,
336
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "assignment-1",
"name": "text",
"type": "string",
"value": "={{ $json.suggestions[1].code }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "9b92a873-ecb8-43cc-929f-9514bed35c5e",
"name": "Read Item Descriptions",
"type": "n8n-nodes-base.googleSheets",
"position": [
128,
560
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nJ_VAeCwOnFwF-t7rFlbftbkAuT35gig9d7YCGsurHs/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1nJ_VAeCwOnFwF-t7rFlbftbkAuT35gig9d7YCGsurHs",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nJ_VAeCwOnFwF-t7rFlbftbkAuT35gig9d7YCGsurHs/edit?usp=drivesdk",
"cachedResultName": "Customs Numbers"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "axR2eMzXvoqKjDp2",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "f95221b2-9d6d-4dd2-bd22-7faab04341f9",
"name": "Recorrer elementos",
"type": "n8n-nodes-base.splitInBatches",
"position": [
384,
560
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "60ddfdb2-b326-4cae-bc20-10cf2631a6ae",
"name": "Write Customs Tariff to Sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
992,
576
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "Artikelbeschreibung",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Artikelbeschreibung",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Zolltarifnummer",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Zolltarifnummer",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [
"Artikelbeschreibung"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nJ_VAeCwOnFwF-t7rFlbftbkAuT35gig9d7YCGsurHs/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1nJ_VAeCwOnFwF-t7rFlbftbkAuT35gig9d7YCGsurHs",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nJ_VAeCwOnFwF-t7rFlbftbkAuT35gig9d7YCGsurHs/edit?usp=drivesdk",
"cachedResultName": "Customs Numbers"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "axR2eMzXvoqKjDp2",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "9b5f275d-136a-4227-9a62-120bc32e0c0e",
"name": "Customs Tariff API Query Batch",
"type": "n8n-nodes-base.httpRequest",
"position": [
592,
576
],
"parameters": {
"url": "=https://www.zolltarifnummern.de/api/v2/cnSuggest?term={{ encodeURIComponent($json['Artikelbeschreibung']) }}&lang=de",
"options": {
"timeout": 10000,
"response": {
"response": {
"responseFormat": "json"
}
},
"allowUnauthorizedCerts": true
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "n8n-workflow/1.0"
}
]
}
},
"typeVersion": 4.2,
"continueOnFail": true
},
{
"id": "653ef025-1c47-4115-94f3-867138e1f654",
"name": "Send Completion Correo electrónico",
"type": "n8n-nodes-base.gmail",
"position": [
784,
352
],
"webhookId": "efe6ce0f-0470-4be7-9056-af5752cf2798",
"parameters": {
"sendTo": "test@example.com",
"message": "Job completed successfully",
"options": {},
"subject": "Completed: Customs Tariff Number Research Finished"
},
"credentials": {
"gmailOAuth2": {
"id": "a26hQ5L1HIRZTOqY",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "b02dc4a3-b4e0-4bb1-9d8a-112ac0301b87",
"name": "Agregar",
"type": "n8n-nodes-base.aggregate",
"position": [
560,
352
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "bb6f42bd-de6e-4adb-97d2-b89867709d5c",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
256
],
"parameters": {
"color": 6,
"width": 640,
"height": 256,
"content": "## Manual Single Query for Customs Tariff Number\nEnter item description and receive suggestion #1 from the API query"
},
"typeVersion": 1
},
{
"id": "6229ef15-b823-48f2-82bb-f81d07f7f976",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-384,
528
],
"parameters": {
"width": 1552,
"height": 256,
"content": "## Batch Query from List\nAll entries in column A \nwill be enriched with customs \ntariff numbers in column B\n(select Google Sheet and tab)"
},
"typeVersion": 1
},
{
"id": "7c9e9844-9995-41d6-9ec2-db4a3af10160",
"name": "Nota adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
272,
256
],
"parameters": {
"color": 4,
"width": 896,
"height": 256,
"content": "## Completion\nNotification email that process \nis finished (configure desired email address)"
},
"typeVersion": 1
},
{
"id": "18289af3-a07a-46ef-abed-10d4bc6aec29",
"name": "Inicio Query",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-48,
560
],
"parameters": {},
"typeVersion": 1
},
{
"id": "31ef430b-a463-4742-bf36-57509464a684",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-816,
256
],
"parameters": {
"color": 3,
"width": 416,
"height": 256,
"content": "### [Video Tutorial](https://youtu.be/UccIqmMmq7w)\n@[youtube](UccIqmMmq7w)"
},
"typeVersion": 1
},
{
"id": "18d3e9ef-6168-482f-bcd7-d05ae1789975",
"name": "prepare data",
"type": "n8n-nodes-base.set",
"position": [
800,
576
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "assignment-1",
"name": "Zolltarifnummer",
"type": "string",
"value": "={{ $json.suggestions && $json.suggestions[1] ? $json.suggestions[1].code : 'Nicht gefunden' }}"
},
{
"id": "assignment-3",
"name": "Artikelbeschreibung",
"type": "string",
"value": "={{ $('Loop Over Items').item.json['Artikelbeschreibung'] }}"
},
{
"id": "bb2fbbce-b66b-42b6-a639-baa949b763e8",
"name": "Beschreibung der Zolltarifnummer",
"type": "string",
"value": "={{ $json.suggestions[1].value.split(/<br\\s*\\/?>/i)[1].trim() }}"
},
{
"id": "f4389d75-a1f3-4ccd-9a62-0f7544923e02",
"name": "Score",
"type": "string",
"value": "={{ ($json.suggestions[1].score * 100).toFixed(1) + '%' }}"
}
]
}
},
"typeVersion": 3.4
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "7e35bde7-5057-41a1-a1a9-e332db984cff",
"connections": {
"Aggregate": {
"main": [
[
{
"node": "Send Completion Email",
"type": "main",
"index": 0
}
]
]
},
"Start Query": {
"main": [
[
{
"node": "9b92a873-ecb8-43cc-929f-9514bed35c5e",
"type": "main",
"index": 0
}
]
]
},
"Chat Trigger": {
"main": [
[
{
"node": "0f817acd-9c17-4756-90ba-ff1106edad53",
"type": "main",
"index": 0
}
]
]
},
"18d3e9ef-6168-482f-bcd7-d05ae1789975": {
"main": [
[
{
"node": "60ddfdb2-b326-4cae-bc20-10cf2631a6ae",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
],
[
{
"node": "9b5f275d-136a-4227-9a62-120bc32e0c0e",
"type": "main",
"index": 0
}
]
]
},
"9b92a873-ecb8-43cc-929f-9514bed35c5e": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"0f817acd-9c17-4756-90ba-ff1106edad53": {
"main": [
[
{
"node": "8d670dda-9b23-4542-bb8f-ce7074beac64",
"type": "main",
"index": 0
}
]
]
},
"60ddfdb2-b326-4cae-bc20-10cf2631a6ae": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"9b5f275d-136a-4227-9a62-120bc32e0c0e": {
"main": [
[
{
"node": "18d3e9ef-6168-482f-bcd7-d05ae1789975",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Extracción de documentos, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Thomas
@thomas-zCompartir este flujo de trabajo