ダン・バー氏社 Reports 構造化データ抽出(GPT-4o)

中級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、11個のノードを含みます。主にHttpRequest, ConvertToFile, Agent, ExtractFromFile, LmChatOpenAiなどのノードを使用。 GPT-4o を使って邓白氏公司報告から構造化データを抽出

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c0768748-9099-4bb4-8d23-d4ceb1c404b7",
      "name": "付箋10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1872,
        8464
      ],
      "parameters": {
        "width": 400,
        "height": 1312,
        "content": "## Setup Instructions\n\n\n### 🏢 Fetch Company Data from D&B (Data Blocks)\n\n1. Add a new **HTTP Request** node and name it `Data Blocks`  \n2. Configure it as follows:  \n   - **Authentication:** None (token is passed in headers)  \n   - **Method:** `GET`  \n   - **URL:**  \n     ```\n     https://plus.dnb.com/v1/data/duns/{{ $json.duns }}?blockIDs=paymentinsight_L4_v1&tradeUp=hq&customerReference=customer%20reference%20text&orderReason=6332\n     ```  \n     > This dynamically uses the `duns` value from input JSON.  \n3. Under **Headers**, add:  \n   - `Accept = application/json`  \n   - `Authorization = Bearer {{$json[\"access_token\"]}}`  \n     > Replace the hardcoded token with the dynamic token output from your **Get Bearer Token** node.  \n4. Execute the node — you’ll receive structured company data from D&B’s **Data Blocks API**.  \n\n✅ You can now pass the response to other nodes (e.g., Google Sheets, databases, or CRMs).  \n\n\n---\n\n### 🔑 Set up D&B Auth HTTP Request node\n\n1. Add a new **HTTP Request** node in your workflow  \n2. Configure it as follows:  \n   - **Authentication:** Basic Auth (use your D&B **username** and **password**)  \n   - **Method:** `POST`  \n   - **URL:** `https://plus.dnb.com/v3/token`  \n3. Under **Body Parameters**, add:  \n   - `grant_type = client_credentials`  \n4. Under **Headers**, add:  \n   - `Accept = application/json`  \n5. Execute the node — the response will include an **access_token**  \n6. Use this token in downstream requests with:  \n   - `Authorization: Bearer {{$json[\"access_token\"]}}`  \n\n\n## 📬 Contact\n\nNeed help customizing this (e.g., routing the PDF to Drive, mapping JSON to your CRM, or expanding the schema)?\n\n📧 robert@ynteractive.com  \n🔗 https://www.linkedin.com/in/robert-breen-29429625/  \n🌐 https://ynteractive.com"
      },
      "typeVersion": 1
    },
    {
      "id": "0bb07b06-7c44-47d7-b634-0b671bbd4f05",
      "name": "OpenAI Chat Model6",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        128,
        9216
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "4l6TDfLZVFS24g3X",
          "name": "OpenAi account 4"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0dc8ad32-c434-4c56-9f97-8d6caf59a26f",
      "name": "OpenAI Chat Model7",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        384,
        9312
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "4l6TDfLZVFS24g3X",
          "name": "OpenAi account 4"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2a704e6a-4996-488b-831e-b757270b6518",
      "name": "付箋65",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        8864
      ],
      "parameters": {
        "color": 3,
        "width": 352,
        "height": 768,
        "content": "### 🏢 Fetch Company Data from D&B (Data Blocks)\n\n1. Add a new **HTTP Request** node and name it `Data Blocks`  \n2. Configure it as follows:  \n   - **Authentication:** None (token is passed in headers)  \n   - **Method:** `GET`  \n   - **URL:**  \n     ```\n     https://plus.dnb.com/v1/data/duns/{{ $json.duns }}?blockIDs=paymentinsight_L4_v1&tradeUp=hq&customerReference=customer%20reference%20text&orderReason=6332\n     ```  \n     > This dynamically uses the `duns` value from input JSON.  \n3. Under **Headers**, add:  \n   - `Accept = application/json`  \n   - `Authorization = Bearer {{$json[\"access_token\"]}}`  \n     > Replace the hardcoded token with the dynamic token output from your **Get Bearer Token** node.  \n4. Execute the node — you’ll receive structured company data from D&B’s **Data Blocks API**.  \n\n✅ You can now pass the response to other nodes (e.g., Google Sheets, databases, or CRMs).  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "a08d013f-f02c-4d97-b8a8-b39892f8f23d",
      "name": "付箋66",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        8640
      ],
      "parameters": {
        "color": 3,
        "width": 368,
        "height": 560,
        "content": "### 🔑 Set up D&B Auth HTTP Request node\n\n1. Add a new **HTTP Request** node in your workflow  \n2. Configure it as follows:  \n   - **Authentication:** Basic Auth (use your D&B **username** and **password**)  \n   - **Method:** `POST`  \n   - **URL:** `https://plus.dnb.com/v3/token`  \n3. Under **Body Parameters**, add:  \n   - `grant_type = client_credentials`  \n4. Under **Headers**, add:  \n   - `Accept = application/json`  \n5. Execute the node — the response will include an **access_token**  \n6. Use this token in downstream requests with:  \n   - `Authorization: Bearer {{$json[\"access_token\"]}}`  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "565c3c60-61e4-4b82-81ae-d532377a2c80",
      "name": "D&Bレポート",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -976,
        9520
      ],
      "parameters": {
        "url": "https://plus.dnb.com/v1/reports/duns/804735132?productId=birstd&inLanguage=en-US&reportFormat=PDF&orderReason=6332&tradeUp=hq&customerReference=customer%20reference%20text",
        "options": {},
        "authentication": "headerAuth",
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "e6d764bd-3b2d-40d3-949e-8aa39c220668",
      "name": "PDFファイルに変換",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -544,
        9392
      ],
      "parameters": {
        "options": {},
        "operation": "toBinary",
        "sourceProperty": "contents[0].contentObject"
      },
      "typeVersion": 1.1
    },
    {
      "id": "eaf944cd-eda8-4b39-80c5-66378e92dddc",
      "name": "バイナリ抽出",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -208,
        9392
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "7c82577c-cb5f-47df-9f29-7646107276e8",
      "name": "PDF分析",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        224,
        8848
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "You are a precision extractor. Read the provided business report PDF and return only a single flat JSON object with the fields below. Keep it minimal and focused on overall scores.\n\nNo arrays/lists.\n\nNo prose.\n\nIf a value is missing, output null.\n\nDates must be YYYY-MM-DD.\n\nNumbers must be plain numerics (no commas or $).\n\nOutput Format\n\nReturn only in JSON object:\n\n\nRules\n\nPrefer the most recent or highest-level “overall” values if multiple are shown.\n\nNever include arrays, nested structures, or text outside of the JSON object.",
          "passthroughBinaryImages": true
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "0bf7ddc4-910a-4c15-8265-c959ddf16e7a",
      "name": "構造化出力",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        368,
        9120
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"report_date\": \"\",\n  \"company_name\": \"\",\n  \"duns\": \"\",\n  \"dnb_rating_overall\": \"\",\n  \"composite_credit_appraisal\": \"\",\n  \"viability_score\": \"\",\n  \"portfolio_comparison_score\": \"\",\n  \"paydex_3mo\": \"\",\n  \"paydex_24mo\": \"\",\n  \"credit_limit_conservative\": \"\"\n}\n"
      },
      "typeVersion": 1.3
    },
    {
      "id": "f8126ea2-1265-45fc-adf8-2e507a23df14",
      "name": "トークン取得",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -400,
        9072
      ],
      "parameters": {
        "url": "https://plus.dnb.com/v3/token",
        "options": {},
        "requestMethod": "POST",
        "authentication": "basicAuth",
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "grant_type",
              "value": "client_credentials"
            }
          ]
        },
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Content-Type",
              "value": "application/x-www-form-urlencoded"
            }
          ]
        }
      },
      "credentials": {},
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "565c3c60-61e4-4b82-81ae-d532377a2c80": {
      "main": [
        [
          {
            "node": "e6d764bd-3b2d-40d3-949e-8aa39c220668",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "eaf944cd-eda8-4b39-80c5-66378e92dddc": {
      "main": [
        [
          {
            "node": "7c82577c-cb5f-47df-9f29-7646107276e8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0bf7ddc4-910a-4c15-8265-c959ddf16e7a": {
      "ai_outputParser": [
        [
          {
            "node": "7c82577c-cb5f-47df-9f29-7646107276e8",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "0bb07b06-7c44-47d7-b634-0b671bbd4f05": {
      "ai_languageModel": [
        [
          {
            "node": "7c82577c-cb5f-47df-9f29-7646107276e8",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "0dc8ad32-c434-4c56-9f97-8d6caf59a26f": {
      "ai_languageModel": [
        [
          {
            "node": "0bf7ddc4-910a-4c15-8265-c959ddf16e7a",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "e6d764bd-3b2d-40d3-949e-8aa39c220668": {
      "main": [
        [
          {
            "node": "eaf944cd-eda8-4b39-80c5-66378e92dddc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

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

有料ですか?

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

関連ワークフロー

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

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

作成者
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34