CustomJS APIを使用して複数のPDFファイルをダウンロード・結合

中級

これはOther, Building Blocks分野の自動化ワークフローで、7個のノードを含みます。主にCode, SplitOut, HttpRequest, ManualTrigger, ReadWriteFileなどのノードを使用。 URL から複数の PDF ファイルをダウンロードして結合する CustomJS API

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "b503899dfd9ae32bbf8e1f446a1f2c9b3c59f80c79b274c49b1606b7ae9579e1",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "19f32c25-df26-426d-8e28-f1d29c8571b1",
      "name": "分割出力",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -200,
        -240
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "7360c3f9-2e11-4839-b105-ecab66a39af2",
      "name": "HTTP リクエスト1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        20,
        -240
      ],
      "parameters": {
        "url": "={{ $json.data }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "49cb0c7b-c9d8-4bf1-afa5-5afab9e7967e",
      "name": "ディスクファイル読み書き2",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        460,
        -240
      ],
      "parameters": {
        "options": {},
        "fileName": "test.pdf",
        "operation": "write"
      },
      "typeVersion": 1
    },
    {
      "id": "05ef1b18-481d-40f8-a6b3-712bb9ba2b6f",
      "name": "ディスクファイル読み書き3",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        680,
        -240
      ],
      "parameters": {
        "options": {},
        "fileSelector": "test.pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "c8f0971c-e1e0-4add-83cb-932902f80b56",
      "name": "クリック時 ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -640,
        -240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b83c51ea-9afc-411a-baad-429776e843f3",
      "name": "PDF Array",
      "type": "n8n-nodes-base.code",
      "position": [
        -420,
        -240
      ],
      "parameters": {
        "jsCode": "return { data: [\n  \"https://www.intewa.com/fileadmin/documents/pdf-file.pdf\", \"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\"\n]}"
      },
      "typeVersion": 2
    },
    {
      "id": "b122b6e4-2dfa-4f1f-8547-36ba91ca93f9",
      "name": "マージ PDF",
      "type": "@custom-js/n8n-nodes-pdf-toolkit.mergePdfs",
      "position": [
        240,
        -240
      ],
      "parameters": {},
      "credentials": {
        "customJsApi": {
          "id": "BFGbk0a71fKWY967",
          "name": "CustomJS account"
        }
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Merge PDF": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b83c51ea-9afc-411a-baad-429776e843f3": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Merge PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk2": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "b83c51ea-9afc-411a-baad-429776e843f3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - その他, ビルディングブロック

有料ですか?

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

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

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

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34