Analyseur d'images unli.dev
Ceci est unInvoice Processing, Multimodal AIworkflow d'automatisation du domainecontenant 6 nœuds.Utilise principalement des nœuds comme Set, Code, Telegram, HttpRequest, TelegramTrigger. Extraire des enregistrements de transactions à partir d'images avec unli.dev Vision API et Telegram
- •Token Bot Telegram
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
Nœuds utilisés (6)
{
"id": "7CdWmTSFuTCbGS5F",
"meta": {
"instanceId": "c2650793f644091dc80fb900fe63448ad1f4b774008de9608064d67294f8307c",
"templateCredsSetupCompleted": true
},
"name": "Image Analyzer with unli.dev",
"tags": [],
"nodes": [
{
"id": "311a97ac-7c23-4fae-8572-bdd869e44460",
"name": "📤 Envoyer la réponse",
"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 en 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": "Définir la requête",
"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": "📥 Télécharger l'image",
"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 Déclencheur",
"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": "Appeler 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
}
]
]
}
}
}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é ?
Intermédiaire - Traitement des factures, IA Multimodale
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
Khairul Muhtadin
@khmuhtadinPartager ce workflow