Google DriveとLLM解析を使用したバッチPDFからMarkdownへの変換

中級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、8個のノードを含みます。主にIf, Set, Code, Slack, GoogleDriveなどのノードを使用。 Google DriveとLLM駆動の解析でバッチPDFをMarkdownに変換

前提条件
  • Slack Bot Token または Webhook URL
  • Google Drive API認証情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "placeholder"
  },
  "nodes": [
    {
      "id": "info-note",
      "name": "ワークフロー情報",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        250,
        150
      ],
      "parameters": {
        "content": "## Batch PDF Converter\n\nThis workflow converts PDFs to Markdown in bulk.\n\nSupported sources:\n- Direct URLs\n- Google Drive\n- Dropbox\n- Local files"
      },
      "typeVersion": 1
    },
    {
      "id": "google-drive",
      "name": "Google Drive - PDF一覧取得",
      "type": "n8n-nodes-base.googleDrive",
      "notes": "List all PDFs from specified folder",
      "position": [
        450,
        300
      ],
      "parameters": {
        "fileId": "={{ $json.folderId }}",
        "operation": "list"
      },
      "typeVersion": 1
    },
    {
      "id": "filter-pdfs",
      "name": "PDFのみフィルタリング",
      "type": "n8n-nodes-base.if",
      "position": [
        650,
        300
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.mimeType }}",
              "value2": "application/pdf"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "pdfvector-convert",
      "name": "PDF Vector - Markdown変換",
      "type": "n8n-nodes-pdfvector.pdfVector",
      "notes": "Convert each PDF to Markdown",
      "position": [
        850,
        300
      ],
      "parameters": {
        "useLlm": "auto",
        "resource": "document",
        "operation": "parse",
        "documentUrl": "={{ $json.webViewLink }}"
      },
      "typeVersion": 1
    },
    {
      "id": "prepare-output",
      "name": "出力準備",
      "type": "n8n-nodes-base.code",
      "position": [
        1050,
        300
      ],
      "parameters": {
        "functionCode": "const fileName = $json.name.replace('.pdf', '.md');\nconst content = $json.content;\nconst metadata = {\n  originalFile: $json.name,\n  convertedAt: new Date().toISOString(),\n  pageCount: $json.pageCount || 'unknown',\n  credits: $json.creditsUsed || 0\n};\n\nreturn {\n  fileName,\n  content,\n  metadata\n};"
      },
      "typeVersion": 1
    },
    {
      "id": "save-markdown",
      "name": "Markdownファイル保存",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1250,
        300
      ],
      "parameters": {
        "name": "={{ $json.fileName }}",
        "content": "={{ $json.content }}",
        "parents": [
          "{{ $json.outputFolderId }}"
        ],
        "operation": "upload"
      },
      "typeVersion": 1
    },
    {
      "id": "summary-stats",
      "name": "変換サマリー",
      "type": "n8n-nodes-base.set",
      "position": [
        1450,
        300
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "summary",
              "value": "=Converted {{ $items().length }} PDFs to Markdown\nTotal credits used: {{ $items().reduce((sum, item) => sum + (item.json.metadata.credits || 0), 0) }}"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "notify-complete",
      "name": "通知送信",
      "type": "n8n-nodes-base.slack",
      "position": [
        1650,
        300
      ],
      "parameters": {
        "message": "=Batch Conversion Complete!\n\n{{ $json.summary }}\n\nFiles saved to Google Drive.",
        "additionalFields": {}
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "prepare-output": {
      "main": [
        [
          {
            "node": "save-markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "filter-pdfs": {
      "main": [
        [
          {
            "node": "pdfvector-convert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "summary-stats": {
      "main": [
        [
          {
            "node": "notify-complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "save-markdown": {
      "main": [
        [
          {
            "node": "summary-stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "google-drive": {
      "main": [
        [
          {
            "node": "filter-pdfs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "pdfvector-convert": {
      "main": [
        [
          {
            "node": "prepare-output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - コンテンツ作成, マルチモーダルAI

有料ですか?

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

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

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

作成者
PDF Vector

PDF Vector

@pdfvector

A fully featured PDF APIs for developers - Parse any PDF or Word document, extract structured data, and access millions of academic papers - all through simple APIs.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34