8
n8n 中文网amn8n.com

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": "## 🟣 **分割、下载、保存**"
      },
      "typeVersion": 1
    },
    {
      "id": "ead01399-4c0a-47f6-8e1d-92a35a3a5c57",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        416
      ],
      "parameters": {
        "width": 368,
        "height": 608,
        "content": "## 🟡 **通过VLM Run提取图像 - 设置指南**"
      },
      "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": "## 🟢 监控和下载"
      },
      "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": "## 🧾 图像提取流水线"
      },
      "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": {
    "Split Out": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File": {
      "main": [
        [
          {
            "node": "Extract Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Save Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monitor Uploads": {
      "main": [
        [
          {
            "node": "Download File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Image Links": {
      "main": [
        [
          {
            "node": "Split Out",
            "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 查看

分享此工作流