Analizador de imágenes de unli.dev
Este es unInvoice Processing, Multimodal AIflujo de automatización del dominio deautomatización que contiene 6 nodos.Utiliza principalmente nodos como Set, Code, Telegram, HttpRequest, TelegramTrigger. Usar unli.dev Vision API y Telegram para extraer registros de transacciones de imágenes
- •Bot Token de Telegram
- •Pueden requerirse credenciales de autenticación para la API de destino
Nodos utilizados (6)
{
"id": "7CdWmTSFuTCbGS5F",
"meta": {
"instanceId": "c2650793f644091dc80fb900fe63448ad1f4b774008de9608064d67294f8307c",
"templateCredsSetupCompleted": true
},
"name": "Image Analyzer with unli.dev",
"tags": [],
"nodes": [
{
"id": "311a97ac-7c23-4fae-8572-bdd869e44460",
"name": "📤 Enviar Respuesta",
"type": "n8n-nodes-base.telegram",
"position": [
528,
416
],
"webhookId": "ebeb27ef-0f91-4313-ad5c-e60de9e7b80e",
"parameters": {
"text": "=📸 **Image Analysis Result**\n\n{{ $json.choices[0].message.content }}\n\nModel: {{ $json.model }}\nprompt tokens: {{ $json.usage.prompt_tokens }}\ncompletion tokens: {{ $json.usage.completion_tokens }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"parse_mode": "Markdown"
}
},
"credentials": {
"telegramApi": {
"id": "wlH3um2hoPAGI8XX",
"name": "Khaisa Dev Bot"
}
},
"typeVersion": 1.2
},
{
"id": "c9bd6275-58e2-4b16-a200-6b8f1070fa1b",
"name": "Convertir a Base",
"type": "n8n-nodes-base.code",
"position": [
-80,
416
],
"parameters": {
"jsCode": "const binaryData = $input.first().binary.data;\n\n// Access buffer property and convert to base64\nconst base64Image = binaryData.data.toString('base64');\n\n// Get the caption from the original Telegram message if it exists\nconst caption = $('Telegram Trigger').item.json.message.caption || 'What is in this image?';\n\nreturn [{ \n json: { \n base64Image: base64Image,\n prompt: caption,\n chatId: $('Telegram Trigger').item.json.message.chat.id,\n messageId: $('Telegram Trigger').item.json.message.message_id\n } \n}];"
},
"typeVersion": 2
},
{
"id": "49b95148-ca6f-4392-97f3-d664f5d5d273",
"name": "Configurar Solicitud",
"type": "n8n-nodes-base.set",
"position": [
128,
416
],
"parameters": {
"fields": {
"values": [
{
"name": "model",
"stringValue": "auto"
},
{
"name": "base64Image",
"stringValue": "={{ $json.base64Image }}"
},
{
"name": "userPrompt",
"stringValue": "extract the trancastion on this image. output in md format"
}
]
},
"options": {}
},
"typeVersion": 3
},
{
"id": "1309d7db-82d3-47d4-99f3-2045664bc78f",
"name": "📥 Descargar Imagen",
"type": "n8n-nodes-base.telegram",
"position": [
-288,
416
],
"webhookId": "7d9d13d4-ec19-40d7-a905-0b44b58867d9",
"parameters": {
"fileId": "={{ $('Telegram Trigger').item.json.message.photo[3].file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "wlH3um2hoPAGI8XX",
"name": "Khaisa Dev Bot"
}
},
"typeVersion": 1.2
},
{
"id": "50024d75-3377-45ef-95c9-683766b87fa8",
"name": "Telegram Disparador",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-496,
416
],
"webhookId": "f460f87e-fb6b-4854-a012-46de743f7695",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "wlH3um2hoPAGI8XX",
"name": "Khaisa Dev Bot"
}
},
"typeVersion": 1.2
},
{
"id": "03857f42-2145-4a91-b49d-88d0cedb9eb5",
"name": "Llamar a Vision API",
"type": "n8n-nodes-base.httpRequest",
"position": [
336,
416
],
"parameters": {
"url": "https://api.unli.dev/v1/chat/completions",
"method": "POST",
"options": {
"timeout": 120000
},
"jsonBody": "={\n \"model\": \"{{ $json.model }}\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"data:image/jpeg;base64,{{ $json.base64Image }}\"\n }\n },\n {\n \"type\": \"text\",\n \"text\": \"{{ $json.prompt }}\"\n }\n ]\n }\n ]\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "orxLpGp8WTDwNIaF",
"name": "Unli.dev - Jon"
}
},
"typeVersion": 4.2
}
],
"active": true,
"pinData": {
"Telegram Trigger": [
{
"json": {
"message": {
"chat": {
"id": 621412350,
"type": "private",
"username": "Khmuhtadin",
"first_name": "khairul"
},
"date": 1755771042,
"from": {
"id": 621412350,
"is_bot": false,
"username": "Khmuhtadin",
"first_name": "khairul",
"language_code": "en"
},
"photo": [
{
"width": 42,
"height": 90,
"file_id": "AgACAgUAAxkBAAIrV2im8KIxcwHODUo6awNsS68yvjPxAAJ90TEbFQ45VT_PGhSGK0w_AQADAgADcwADNgQ",
"file_size": 1276,
"file_unique_id": "AQADfdExGxUOOVV4"
},
{
"width": 148,
"height": 320,
"file_id": "AgACAgUAAxkBAAIrV2im8KIxcwHODUo6awNsS68yvjPxAAJ90TEbFQ45VT_PGhSGK0w_AQADAgADbQADNgQ",
"file_size": 16029,
"file_unique_id": "AQADfdExGxUOOVVy"
},
{
"width": 369,
"height": 800,
"file_id": "AgACAgUAAxkBAAIrV2im8KIxcwHODUo6awNsS68yvjPxAAJ90TEbFQ45VT_PGhSGK0w_AQADAgADeAADNgQ",
"file_size": 68479,
"file_unique_id": "AQADfdExGxUOOVV9"
},
{
"width": 591,
"height": 1280,
"file_id": "AgACAgUAAxkBAAIrV2im8KIxcwHODUo6awNsS68yvjPxAAJ90TEbFQ45VT_PGhSGK0w_AQADAgADeQADNgQ",
"file_size": 92733,
"file_unique_id": "AQADfdExGxUOOVV-"
}
],
"message_id": 11095
},
"update_id": 602987959
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "19150b3b-1dc8-4310-870d-6d735f59214e",
"connections": {
"49b95148-ca6f-4392-97f3-d664f5d5d273": {
"main": [
[
{
"node": "03857f42-2145-4a91-b49d-88d0cedb9eb5",
"type": "main",
"index": 0
}
]
]
},
"03857f42-2145-4a91-b49d-88d0cedb9eb5": {
"main": [
[
{
"node": "311a97ac-7c23-4fae-8572-bdd869e44460",
"type": "main",
"index": 0
}
]
]
},
"c9bd6275-58e2-4b16-a200-6b8f1070fa1b": {
"main": [
[
{
"node": "49b95148-ca6f-4392-97f3-d664f5d5d273",
"type": "main",
"index": 0
}
]
]
},
"50024d75-3377-45ef-95c9-683766b87fa8": {
"main": [
[
{
"node": "1309d7db-82d3-47d4-99f3-2045664bc78f",
"type": "main",
"index": 0
}
]
]
},
"1309d7db-82d3-47d4-99f3-2045664bc78f": {
"main": [
[
{
"node": "c9bd6275-58e2-4b16-a200-6b8f1070fa1b",
"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 - Procesamiento de facturas, 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
Khairul Muhtadin
@khmuhtadinCompartir este flujo de trabajo