{
  "name": "Generate M&A due diligence reports with Decodo, OpenAI and Pinecone",
  "nodes": [
    {
      "id": "6688b756-2970-42f6-8e23-8e9153acc05b",
      "name": "Retrieve Parsed Content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        848,
        -128
      ]
    },
    {
      "id": "d9480c54-6c62-487c-a2c3-84fcb5995c39",
      "name": "Receive Upload Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1280,
        -144
      ]
    },
    {
      "id": "0d442877-1d5d-4de8-9bfc-cce6b9d3ac66",
      "name": "Split Uploaded Files + Build Deal ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -1056,
        -144
      ]
    },
    {
      "id": "cd76b011-6dba-44fb-83a3-bf1bbe9e21d1",
      "name": "Iterate Files for Parsing",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -128,
        -128
      ]
    },
    {
      "id": "ff4f824c-4a75-4dab-b7c1-4db4124c5f53",
      "name": "Get Pinecone Index Stats",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -832,
        -144
      ]
    },
    {
      "id": "fae9cf29-3210-425a-897d-2eb47f5c5eef",
      "name": "Upsert Chunks to Pinecone",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        1232,
        -128
      ]
    },
    {
      "id": "2260f3e1-ac3e-40e4-a43c-1684faa7b72a",
      "name": "Generate Embeddings (Ingest)",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1232,
        -16
      ]
    },
    {
      "id": "7d8dc719-ad64-44ec-beaa-aab69e357f1f",
      "name": "Prepare Parsed Text Document",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1424,
        -16
      ]
    },
    {
      "id": "e0dd6cd9-ddd3-4292-8fc1-a05501dede95",
      "name": "Collect Ingested Deal IDs",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        64,
        -624
      ]
    },
    {
      "id": "411ddd47-8033-4951-b9ca-adeae3a50cca",
      "name": "Prepare Analysis Context",
      "type": "n8n-nodes-base.code",
      "position": [
        -144,
        -624
      ]
    },
    {
      "id": "c3cd7b37-7c90-4d46-8ff8-810615797343",
      "name": "Run Due Diligence AI Analysis",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3472,
        -560
      ]
    },
    {
      "id": "effa0a6c-1e52-44e5-bea8-5011faf7e908",
      "name": " OpenAI Chat Model (5-mini)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3328,
        -448
      ]
    },
    {
      "id": "02ce8124-3a2b-4a30-86b7-324863092101",
      "name": "Parse Structured Analysis JSON",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3744,
        -448
      ]
    },
    {
      "id": "f0ce179e-eb36-4fc8-b409-16f24d109d6f",
      "name": " Generate Embeddings (Retrieval)",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        3568,
        -352
      ]
    },
    {
      "id": "0eff02e2-045f-47fc-8964-15f977775d0b",
      "name": "Map Analysis to Report Fields",
      "type": "n8n-nodes-base.code",
      "position": [
        3952,
        -512
      ]
    },
    {
      "id": "0773b0d5-709a-42c5-a40f-4d4ed64e6b99",
      "name": "Render DD Report HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        3584,
        -208
      ]
    },
    {
      "id": "84a87c7e-e44a-4557-95a6-3b642cda42b4",
      "name": "Render PDF from HTML",
      "type": "n8n-nodes-puppeteer.puppeteer",
      "position": [
        3808,
        -208
      ]
    },
    {
      "id": "8f4ef527-4c3b-4410-86c9-30f8679cf279",
      "name": "Convert PDF Base64 to Binary File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        4032,
        -208
      ]
    },
    {
      "id": "14b8fceb-4c56-4af8-940f-a57b256a239b",
      "name": "Upload Report PDF to S3",
      "type": "n8n-nodes-base.s3",
      "position": [
        4480,
        -208
      ]
    },
    {
      "id": "280a68bd-ab8e-4cb0-9a96-83bca3e7bccb",
      "name": "Build Public Report URL",
      "type": "n8n-nodes-base.code",
      "position": [
        4704,
        -208
      ]
    },
    {
      "id": "f8ea8c89-eccf-4b9a-a6f0-7b4e157150ad",
      "name": " Merge Analysis + Report URL",
      "type": "n8n-nodes-base.merge",
      "position": [
        4272,
        -544
      ]
    },
    {
      "id": "da95d545-b7db-49a6-ac5b-ab114e2ea3fd",
      "name": "Is Parsing Job Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        464,
        -112
      ]
    },
    {
      "id": "52a8e8bd-ae59-4b99-990d-6dbacff0ea26",
      "name": "Upload File to LlamaParse",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        96,
        -112
      ]
    },
    {
      "id": "ebde6a4b-5aa4-4803-a1ba-23c1ec6bad4a",
      "name": "Check LlamaParse Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        288,
        -112
      ]
    },
    {
      "id": "1c0d2632-3656-41aa-ba0e-06410b1e7830",
      "name": "Wait 10s Before Recheck",
      "type": "n8n-nodes-base.wait",
      "position": [
        640,
        -96
      ]
    },
    {
      "id": "bb6238c2-c2d1-4a2a-b3e9-a3415a20e9f9",
      "name": "Return API Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        4720,
        -544
      ]
    },
    {
      "id": "71bcafab-7d80-4aa0-990f-3cbe028b11bc",
      "name": "Normalize Parsed Text Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        1056,
        -128
      ]
    },
    {
      "id": "9bccd041-e39e-419c-a9c5-70bf8b40c428",
      "name": "Cache Hit?",
      "type": "n8n-nodes-base.if",
      "position": [
        -384,
        -144
      ]
    },
    {
      "id": "af834630-8789-4a25-a1f1-00f310a4b8c1",
      "name": "Prepare S3 File Metadata",
      "type": "n8n-nodes-base.code",
      "position": [
        4256,
        -208
      ]
    },
    {
      "id": "2c931666-2b98-42ad-b452-97359da5ab11",
      "name": "Derive Company Seed",
      "type": "n8n-nodes-base.code",
      "position": [
        272,
        -624
      ]
    },
    {
      "id": "a668fb86-a110-42af-aa51-58fdebbbce3f",
      "name": "Build Domain Candidates",
      "type": "n8n-nodes-base.code",
      "position": [
        672,
        -624
      ]
    },
    {
      "id": "f2bb8172-ed14-4a74-82c1-1e77da43f768",
      "name": "Iterate Domain Candidates",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        864,
        -624
      ]
    },
    {
      "id": "cefcae70-069f-421b-9cae-5857f525259a",
      "name": "Decodo Verify Official Domain",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        1040,
        -528
      ]
    },
    {
      "id": "a099198d-09b1-44a9-9b0f-647b656b43d3",
      "name": "Score Domain Match",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        -528
      ]
    },
    {
      "id": "32d67839-fc2c-4d3c-bcff-f7a14ca650cf",
      "name": "Collect Domain Scores",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1040,
        -688
      ]
    },
    {
      "id": "740c3c57-7a60-4d32-b04b-505821b6c5fa",
      "name": "Select Canonical Domain",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        -688
      ]
    },
    {
      "id": "1d00006f-d9c1-4a5d-877e-92567f304b7f",
      "name": "Iterate Enrichment URLs",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1680,
        -592
      ]
    },
    {
      "id": "196fdbb1-8c82-4420-a794-75cf6297ecbb",
      "name": "Profile Page?",
      "type": "n8n-nodes-base.if",
      "position": [
        1920,
        -432
      ]
    },
    {
      "id": "cc8961fc-4457-4106-94d7-3de024d77aa6",
      "name": "Decodo Scrape Company Profile",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        2112,
        -448
      ]
    },
    {
      "id": "c44deabd-9988-466e-adad-83b841cffe38",
      "name": "Decodo Scrape Commercial and Risk",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        2112,
        -256
      ]
    },
    {
      "id": "7c053d89-5fd6-48de-ad3d-0c45db398124",
      "name": "Normalize External Evidence",
      "type": "n8n-nodes-base.code",
      "position": [
        2304,
        -368
      ]
    },
    {
      "id": "93178829-b1c2-4d89-b412-d6d680712411",
      "name": "Collect External Evidence",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1904,
        -608
      ]
    },
    {
      "id": "de844c02-d42b-476a-a7cd-0d2aa5c3021c",
      "name": "Evidence Coverage Metrics",
      "type": "n8n-nodes-base.code",
      "position": [
        2112,
        -608
      ]
    },
    {
      "id": "5f353e85-edd6-4c8e-a4bb-cc6e05d89285",
      "name": "Has External Evidence?",
      "type": "n8n-nodes-base.if",
      "position": [
        2336,
        -608
      ]
    },
    {
      "id": "3183ddf5-6572-4f60-8553-069cb972d747",
      "name": "Prepare External Evidence Document",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        2800,
        -512
      ]
    },
    {
      "id": "b91a09d6-6c79-4f5b-b545-a6c946e45e72",
      "name": "Generate Embeddings (External)",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        2608,
        -512
      ]
    },
    {
      "id": "00d503a4-163e-4c97-b999-16b6e567c00d",
      "name": "Upsert External Evidence to Pinecone",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        2608,
        -624
      ]
    },
    {
      "id": "a78ac7a2-4e90-4482-a65f-ed5a838e7477",
      "name": "Prepare AI Input with Evidence",
      "type": "n8n-nodes-base.code",
      "position": [
        3088,
        -560
      ]
    },
    {
      "id": "3aed2a48-44ab-4ef0-902d-93a25185f596",
      "name": "Augment Report with Evidence",
      "type": "n8n-nodes-base.code",
      "position": [
        3360,
        -208
      ]
    },
    {
      "id": "5552be97-8992-4a59-9d08-f9f5a6dfd4d4",
      "name": "Prepare API Response Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        4496,
        -544
      ]
    },
    {
      "id": "86681c72-ac7b-4a87-9dd9-cd4f93075832",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        3456,
        -448
      ]
    },
    {
      "id": "0e0ddf23-c4da-4dc8-971a-e8a37ab68dfd",
      "name": "Check Deal Namespace Cache",
      "type": "n8n-nodes-base.code",
      "position": [
        -608,
        -144
      ]
    },
    {
      "id": "cf5b5a13-cf0f-41af-bd6f-f8e4848d0e61",
      "name": "Decodo Search Official Site",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        464,
        -624
      ]
    },
    {
      "id": "db8edcb6-78e1-488d-81b7-896391bc4e64",
      "name": "Canonical Domain Acceptable?",
      "type": "n8n-nodes-base.if",
      "position": [
        1424,
        -576
      ]
    },
    {
      "id": "dabddbd9-abb7-4a16-be47-5dd4556f7b52",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1888,
        -944
      ],
      "parameters": {
        "width": 500,
        "height": 750,
        "content": "## Due Diligence AI: Ingest, Enrich & Report\n\n### How it works\n1. Receive uploaded deal files via webhook, split multiple files, and generate a unified dealId.\n2. Parse documents with LlamaParse, norm"
      }
    },
    {
      "id": "07eba514-18bf-415d-b614-29ace85f506c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1344,
        -288
      ],
      "parameters": {
        "width": 1104,
        "height": 464,
        "content": "## Intake + Cache Check\nReceives file uploads, splits them into per-file items, builds a deal ID, and checks if this deal was already ingested."
      }
    },
    {
      "id": "12e033ad-8171-4ec2-bc4d-bec47b06191a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -288
      ],
      "parameters": {
        "width": 1792,
        "height": 464,
        "content": "## Parse Documents + Store Vectors\nUploads each file for parsing, polls until ready, normalizes the extracted text, then embeds and stores chunks for later retrieval."
      }
    },
    {
      "id": "bfc0f03b-fbfd-4cbe-86e8-0f05fcd886bd",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -768
      ],
      "parameters": {
        "width": 1792,
        "height": 464,
        "content": "## Find + Validate Official Website\nInfers a company name from filenames, searches for the official domain, verifies candidates, and picks the best canonical site to use for enrichment."
      }
    },
    {
      "id": "40b9aaf2-bd33-4822-9f67-c773e2ee1c79",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        -720
      ],
      "parameters": {
        "width": 1664,
        "height": 784,
        "content": "## Scrape External Evidence + Index It\nScrapes key pages from the selected site, tags the content as profile or risk evidence, measures coverage, and stores the web evidence for the deal"
      }
    },
    {
      "id": "29be529a-b062-4fa6-be07-9ffe83d7a0ee",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3280,
        -720
      ],
      "parameters": {
        "width": 1792,
        "height": 784,
        "content": "## AI Due Diligence + Report Delivery\nQueries the deal knowledge base, generates a structured diligence summary, builds a PDF report, uploads it, and returns the report link and key fields via API."
      }
    },
    {
      "id": "23cf1626-33c9-4c0e-9c52-eb80f2698355",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1344,
        -944
      ],
      "parameters": {
        "width": 1028,
        "height": 638,
        "content": "![M&A Decodo Home](https://raw.githubusercontent.com/khmuhtadin/n8n-template/main/M%26A%20Decodo/home.png)"
      }
    }
  ],
  "connections": {
    "Cache Hit?": {
      "main": [
        [
          {
            "node": "Prepare Analysis Context",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Iterate Files for Parsing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Profile Page?": {
      "main": [
        [
          {
            "node": "Decodo Scrape Company Profile",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Decodo Scrape Commercial and Risk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Domain Match": {
      "main": [
        [
          {
            "node": "Iterate Domain Candidates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Derive Company Seed": {
      "main": [
        [
          {
            "node": "Decodo Search Official Site",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Render PDF from HTML": {
      "main": [
        [
          {
            "node": "Convert PDF Base64 to Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Domain Scores": {
      "main": [
        [
          {
            "node": "Select Canonical Domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "ai_tool": [
        [
          {
            "node": "Run Due Diligence AI Analysis",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Render DD Report HTML": {
      "main": [
        [
          {
            "node": "Render PDF from HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has External Evidence?": {
      "main": [
        [
          {
            "node": "Upsert External Evidence to Pinecone",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare AI Input with Evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Upload Request": {
      "main": [
        [
          {
            "node": "Split Uploaded Files + Build Deal ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Domain Candidates": {
      "main": [
        [
          {
            "node": "Iterate Domain Candidates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Public Report URL": {
      "main": [
        [
          {
            "node": " Merge Analysis + Report URL",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Iterate Enrichment URLs": {
      "main": [
        [
          {
            "node": "Collect External Evidence",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Profile Page?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Parsed Content": {
      "main": [
        [
          {
            "node": "Normalize Parsed Text Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Canonical Domain": {
      "main": [
        [
          {
            "node": "Canonical Domain Acceptable?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Report PDF to S3": {
      "main": [
        [
          {
            "node": "Build Public Report URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10s Before Recheck": {
      "main": [
        [
          {
            "node": "Check LlamaParse Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Pinecone Index Stats": {
      "main": [
        [
          {
            "node": "Check Deal Namespace Cache",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Parsing Job Complete?": {
      "main": [
        [
          {
            "node": "Retrieve Parsed Content",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 10s Before Recheck",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Analysis Context": {
      "main": [
        [
          {
            "node": "Derive Company Seed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare S3 File Metadata": {
      "main": [
        [
          {
            "node": "Upload Report PDF to S3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect External Evidence": {
      "main": [
        [
          {
            "node": "Evidence Coverage Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Ingested Deal IDs": {
      "main": [
        [
          {
            "node": "Prepare Analysis Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evidence Coverage Metrics": {
      "main": [
        [
          {
            "node": "Has External Evidence?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Domain Candidates": {
      "main": [
        [
          {
            "node": "Collect Domain Scores",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Decodo Verify Official Domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Files for Parsing": {
      "main": [
        [
          {
            "node": "Collect Ingested Deal IDs",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload File to LlamaParse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload File to LlamaParse": {
      "main": [
        [
          {
            "node": "Check LlamaParse Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsert Chunks to Pinecone": {
      "main": [
        [
          {
            "node": "Iterate Files for Parsing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Deal Namespace Cache": {
      "main": [
        [
          {
            "node": "Cache Hit?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " OpenAI Chat Model (5-mini)": {
      "ai_languageModel": [
        [
          {
            "node": "Run Due Diligence AI Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check LlamaParse Job Status": {
      "main": [
        [
          {
            "node": "Is Parsing Job Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decodo Search Official Site": {
      "main": [
        [
          {
            "node": "Build Domain Candidates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize External Evidence": {
      "main": [
        [
          {
            "node": "Iterate Enrichment URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " Merge Analysis + Report URL": {
      "main": [
        [
          {
            "node": "Prepare API Response Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Augment Report with Evidence": {
      "main": [
        [
          {
            "node": "Render DD Report HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Canonical Domain Acceptable?": {
      "main": [
        [
          {
            "node": "Iterate Enrichment URLs",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare AI Input with Evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Embeddings (Ingest)": {
      "ai_embedding": [
        [
          {
            "node": "Upsert Chunks to Pinecone",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Prepare API Response Payload": {
      "main": [
        [
          {
            "node": "Return API Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Parsed Text Document": {
      "ai_document": [
        [
          {
            "node": "Upsert Chunks to Pinecone",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Decodo Scrape Company Profile": {
      "main": [
        [
          {
            "node": "Normalize External Evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decodo Verify Official Domain": {
      "main": [
        [
          {
            "node": "Score Domain Match",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Analysis to Report Fields": {
      "main": [
        [
          {
            "node": "Augment Report with Evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Parsed Text Payload": {
      "main": [
        [
          {
            "node": "Upsert Chunks to Pinecone",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Due Diligence AI Analysis": {
      "main": [
        [
          {
            "node": "Map Analysis to Report Fields",
            "type": "main",
            "index": 0
          },
          {
            "node": " Merge Analysis + Report URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Embeddings (External)": {
      "ai_embedding": [
        [
          {
            "node": "Upsert External Evidence to Pinecone",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Parse Structured Analysis JSON": {
      "ai_outputParser": [
        [
          {
            "node": "Run Due Diligence AI Analysis",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Prepare AI Input with Evidence": {
      "main": [
        [
          {
            "node": "Run Due Diligence AI Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " Generate Embeddings (Retrieval)": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Convert PDF Base64 to Binary File": {
      "main": [
        [
          {
            "node": "Prepare S3 File Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decodo Scrape Commercial and Risk": {
      "main": [
        [
          {
            "node": "Normalize External Evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare External Evidence Document": {
      "ai_document": [
        [
          {
            "node": "Upsert External Evidence to Pinecone",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Split Uploaded Files + Build Deal ID": {
      "main": [
        [
          {
            "node": "Get Pinecone Index Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsert External Evidence to Pinecone": {
      "main": [
        [
          {
            "node": "Prepare AI Input with Evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}