Google Driveドキュメントに埋め込まれた画像の抽出

中級

これは自動化ワークフローで、11個のノードを含みます。主にWebhook, SplitOut, GoogleDrive, HttpRequest, VlmRunなどのノードを使用。 VLM Run Agentを使ってGoogle Driveの文書から埋め込み画像を抽出

前提条件
  • HTTP Webhookエンドポイント(n8nが自動生成)
  • Google Drive API認証情報
  • ターゲットAPIの認証情報が必要な場合あり

カテゴリー

-
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "96d35e452e0d9a182973416b7532cfc5643239aaaa764a5bf74d52ca84f4a35c",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "7af41587-fbd1-4ff4-9ccb-55fe5aaf9305",
      "name": "ファイルをダウンロード",
      "type": "n8n-nodes-base.googleDrive",
      "notes": "Downloads receipt files from Google Drive for AI processing.",
      "position": [
        -784,
        768
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {
          "binaryPropertyName": "data"
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "zYyIOFMdGz258avn",
          "name": "Google Drive account 6"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "c5fe1983-8614-4ab9-862e-315c2e5aecaa",
      "name": "画像を抽出",
      "type": "@vlm-run/n8n-nodes-vlmrun.vlmRun",
      "position": [
        -560,
        800
      ],
      "parameters": {
        "operation": "executeAgent",
        "agentPrompt": "You are expert in extracting images from a document, complete the task accordingly so that urls can be extracted using json.body.response.extracted_images",
        "agentCallbackUrl": "https://playground.attensys.ai/webhook/image-extract-via-agent"
      },
      "credentials": {
        "vlmRunApi": {
          "id": "B7ZYM8AfBgjnOEOl",
          "name": "VLM Run account 5"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fda11e43-0198-45e6-b26a-ae289e1b6bc4",
      "name": "画像をダウンロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -64,
        880
      ],
      "parameters": {
        "url": "={{ $json['body.response.extracted_images'] }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0af9ff16-c3d3-4f6d-912c-de0b6efa7cec",
      "name": "画像を保存",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        64,
        880
      ],
      "parameters": {
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1XD17_AMlTFIWCyhQjvbQnuGd7jkn91A-",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1XD17_AMlTFIWCyhQjvbQnuGd7jkn91A-",
          "cachedResultName": "Extracted Image"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "zYyIOFMdGz258avn",
          "name": "Google Drive account 6"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "2cc88f73-15fb-4e54-817e-808335e5e59e",
      "name": "分割出力",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -192,
        880
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "body.response.extracted_images"
      },
      "typeVersion": 1
    },
    {
      "id": "da008962-c360-477b-98e4-1c327255092f",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        416
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 608,
        "content": "## 🟣 **Split, Download, Save**\n\n* ✂️ **Split Out** node iterates each link from `body.response.extracted_images`\n\nFor example- \n```json\n{\n  \"image_urls\": [\n    \"https://vlm.run/api/files/img1.jpg\",\n    \"https://vlm.run/api/files/img2.jpg\"\n  ]\n}\n```\n\n\n* ⬇️ **HTTP Request** downloads each image as a file\n\n* 💾 **Google Drive** node saves each image to the **Extracted Image** folder\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ead01399-4c0a-47f6-8e1d-92a35a3a5c57",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        416
      ],
      "parameters": {
        "width": 368,
        "height": 608,
        "content": "## 🟡 **Extract Images via VLM Run – Setup Guide**\n\n1. Set up an n8n Webhook node and copy its Production URL \n\n2. Configure a VLM Run agent with the image extraction prompt \n\n3. Paste the n8n URL into VLM Run’s Callback URL field \n\n4. Run the job on your document \n\n5. Receive extracted image URLs in n8n for processing.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "057cd13b-cd00-41b3-b5fb-2ff33a6a4fed",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        416
      ],
      "parameters": {
        "color": 7,
        "width": 384,
        "height": 608,
        "content": "## 🟢 Monitor & Download\n\n* ⏱️ Google Drive Trigger checks the target folder every minute for **fileCreated** events\n\n* 🗂️ Trigger scope: the receipts folder you selected\n\n* 🔗 Passes the new file’s **id** to the next node\n\n* ⬇️ Google Drive node downloads the file as binary under **data**\n\n* 📦 Output: the binary file is ready for processing in the next step"
      },
      "typeVersion": 1
    },
    {
      "id": "1fd80fe7-abf0-42a3-9755-29f9bef894f7",
      "name": "画像リンクを受信",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -384,
        800
      ],
      "webhookId": "3f24a439-fa54-40c2-ab55-4488d5398469",
      "parameters": {
        "path": "image-extract-via-agent",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "090c3b8d-eeb3-4b4a-bf49-47040a942590",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 992,
        "height": 320,
        "content": "## 🧾 Image Extraction Pipeline\n\n**Flow:** Google Drive upload → VLM Run extracts images → posts to n8n webhook → images split, downloaded, and saved to target Drive folder.\n\n**Use cases:** Receipts from PDFs, report images, ML-ready assets.\n\n**Requirements:**\n* VLM Run API credentials with access to Execute Agent\n\n* Google Drive OAuth2 for trigger, download, and save\n\n* n8n Webhook URL reachable at `image-extract-via-agent` (or other desired endpoint)\n\n* Proper folder IDs for the source watch folder and the destination folder\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c6b9a501-f300-48f5-8441-0ea6934ffa56",
      "name": "アップロードを監視",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "notes": "Monitors Google Drive folder for new receipt uploads and triggers processing automatically.",
      "position": [
        -960,
        768
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1S6baavqJn98MjUlbB6KtmARCWuWEekIZ",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1S6baavqJn98MjUlbB6KtmARCWuWEekIZ",
          "cachedResultName": "test_data"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "ZP9gjk9tgUdUxlxp",
          "name": "Google Drive account 6"
        }
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "2cc88f73-15fb-4e54-817e-808335e5e59e": {
      "main": [
        [
          {
            "node": "fda11e43-0198-45e6-b26a-ae289e1b6bc4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7af41587-fbd1-4ff4-9ccb-55fe5aaf9305": {
      "main": [
        [
          {
            "node": "c5fe1983-8614-4ab9-862e-315c2e5aecaa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fda11e43-0198-45e6-b26a-ae289e1b6bc4": {
      "main": [
        [
          {
            "node": "0af9ff16-c3d3-4f6d-912c-de0b6efa7cec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c6b9a501-f300-48f5-8441-0ea6934ffa56": {
      "main": [
        [
          {
            "node": "7af41587-fbd1-4ff4-9ccb-55fe5aaf9305",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1fd80fe7-abf0-42a3-9755-29f9bef894f7": {
      "main": [
        [
          {
            "node": "2cc88f73-15fb-4e54-817e-808335e5e59e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級

有料ですか?

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

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

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

作成者
Shahrear

Shahrear

@shahrear

I’m Shahrear, a Software Engineer with over 5 years of experience in full-stack development and workflow automation. I specialize in building intelligent automations using n8n, helping teams streamline operations and boost productivity. I’m also an expert in developing custom n8n nodes, with published work on npm - including the @vlm-run/n8n-nodes-vlmrun package. Linkedin - https://www.linkedin.com/in/shahrear-amin/ Email - shahrearbinamin33@gmail.com

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34