AutomationFlowsSlack & Telegram › Extract Transactions From Images Using Unli.dev Vision API & Telegram

Extract Transactions From Images Using Unli.dev Vision API & Telegram

ByKhairul Muhtadin @khmuhtadin on n8n.io

unli.dev + n8n + Telegram

Event trigger★★★★☆ complexity6 nodesTelegramTelegram TriggerHTTP Request
Slack & Telegram Trigger: Event Nodes: 6 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #7704 — we link there as the canonical source.

This workflow follows the HTTP Request → Telegram 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 →

Download .json
{
  "id": "7CdWmTSFuTCbGS5F",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Image Analyzer with unli.dev",
  "tags": [],
  "nodes": [
    {
      "id": "311a97ac-7c23-4fae-8572-bdd869e44460",
      "name": "\ud83d\udce4 Send Response",
      "type": "n8n-nodes-base.telegram",
      "position": [
        528,
        416
      ],
      "parameters": {
        "text": "=\ud83d\udcf8 **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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c9bd6275-58e2-4b16-a200-6b8f1070fa1b",
      "name": "Convert to 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": "Set Request",
      "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": "\ud83d\udce5 Download Image",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -288,
        416
      ],
      "parameters": {
        "fileId": "={{ $('Telegram Trigger').item.json.message.photo[3].file_id }}",
        "resource": "file",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "50024d75-3377-45ef-95c9-683766b87fa8",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -496,
        416
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "03857f42-2145-4a91-b49d-88d0cedb9eb5",
      "name": "Call 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "19150b3b-1dc8-4310-870d-6d735f59214e",
  "connections": {
    "Set Request": {
      "main": [
        [
          {
            "node": "Call Vision API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Vision API": {
      "main": [
        [
          {
            "node": "\ud83d\udce4 Send Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Base": {
      "main": [
        [
          {
            "node": "Set Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "\ud83d\udce5 Download Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udce5 Download Image": {
      "main": [
        [
          {
            "node": "Convert to Base",
            "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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

unli.dev + n8n + Telegram

Source: https://n8n.io/workflows/7704/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

N8N Complete Final. Uses telegramTrigger, dataTable, telegram, mqtt. Event-driven trigger; 58 nodes.

Telegram Trigger, Data Table, Telegram +3
Slack & Telegram

TextMain. Uses telegramTrigger, stopAndError, telegram, httpRequest. Event-driven trigger; 56 nodes.

Telegram Trigger, Stop And Error, Telegram +2
Slack & Telegram

Pede Ai. Uses httpRequest, telegram, postgres, telegramTrigger. Event-driven trigger; 53 nodes.

HTTP Request, Telegram, Postgres +1
Slack & Telegram

📄 Documentation: Notion Guide

Telegram Trigger, @Blotato/N8N Nodes Blotato, Telegram +1
Slack & Telegram

Telegram Wait. Uses stickyNote, httpRequest, redis, noOp. Event-driven trigger; 36 nodes.

HTTP Request, Redis, Telegram +1