unli.dev 画像アナライザー

中級

これはInvoice Processing, Multimodal AI分野の自動化ワークフローで、6個のノードを含みます。主にSet, Code, Telegram, HttpRequest, TelegramTriggerなどのノードを使用。 unli.dev Vision APIとTelegramを使って画像から取引履歴を抽出

前提条件
  • Telegram Bot Token
  • ターゲットAPIの認証情報が必要な場合あり
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "7CdWmTSFuTCbGS5F",
  "meta": {
    "instanceId": "c2650793f644091dc80fb900fe63448ad1f4b774008de9608064d67294f8307c",
    "templateCredsSetupCompleted": true
  },
  "name": "Image Analyzer with unli.dev",
  "tags": [],
  "nodes": [
    {
      "id": "311a97ac-7c23-4fae-8572-bdd869e44460",
      "name": "📤 応答送信",
      "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": "Base64変換",
      "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": "リクエスト設定",
      "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": "📥 画像ダウンロード",
      "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 トリガー",
      "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": "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": {
          "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
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - 請求書処理, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
中級
ノード数6
カテゴリー2
ノードタイプ5
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34