Skip to main content

Generate AI-powered investment due diligence PDF reports with OpenAI, LlamaParse and Decodo

Workflow preview

Workflow preview
100%
Generate AI-powered investment due diligence PDF reports with OpenAI, LlamaParse and Decodo preview
Open on n8n.io

1. Workflow Overview

Transform raw investment memorandums and financial decks into comprehensive, professional Due Diligence (DD) PDF reports. This workflow automates document parsing via LlamaParse, enriches internal ...

Best for

  • Document Extraction automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsopenai, @n8n/n8n-nodes-langchain.documentdefaultdataloader, n8n-nodes-base.aggregate

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Khairul Muhtadin.

Original n8n.io source

1.1 Workflow description

Title
Generate AI-powered investment due diligence PDF reports with OpenAI, LlamaParse and Decodo
Workflow name
Generate AI-powered investment due diligence PDF reports with OpenAI, LlamaParse and Decodo

Transform raw investment memorandums and financial decks into comprehensive, professional Due Diligence (DD) PDF reports. This workflow automates document parsing via LlamaParse, enriches internal data with real-time web intelligence using Decodo, and utilizes an AI Agent to synthesize structured financial analysis, risk assessments, and investment theses.

Why Use This Workflow?

  • Time Savings: Reduces initial deal screening and report generation from 6–8 hours of manual analysis to under 5 minutes.
  • Accuracy & Depth: Employs a multi-query RAG (Retrieval-Augmented Generation) strategy that cross-references internal deal documents with verified external web evidence.
  • Cost Reduction: Eliminates the need for expensive junior analyst hours for preliminary data gathering and document summarization.
  • Scalability: Effortlessly processes multiple deals simultaneously, maintaining a consistent reporting standard across your entire pipeline.

Ideal For

  • Venture Capital & Private Equity: Rapidly assessing incoming pitch decks and CIMs (Confidential Information Memorandums).
  • M&A Advisory Teams: Automating the creation of standardized target company profiles and risk summaries.
  • Investment Analysts: Generating structured data from unstructured PDFs to feed into internal valuation models.

How It Works

  1. Trigger: A webhook receives document uploads (PDF, DOCX, PPTX) via a custom portal or API.
  2. Data Collection: LlamaParse converts complex document layouts into clean Markdown, preserving tables and financial structures.
  3. Processing: The workflow generates a unique "Deal ID" based on filenames to ensure data isolation and implements a caching layer via Pinecone to avoid redundant parsing.
  4. Intelligence Layer:
  • Web Enrichment: The workflow derives the target company name and uses Decodo to scrape official websites for "About" and "Commercial Risk" data.
  • Multi-Query RAG: An OpenAI-powered agent executes six specific retrieval queries (Financials, Risks, Business Model, etc.) to gather evidence from all sources.
  1. Output & Delivery: Analysis is mapped to a structured template, rendered into a professional HTML report, and converted to a high-quality PDF using Puppeteer.
  2. Storage & Logging: The final report is uploaded to Cloudflare R2, and a public, secure URL is returned to the user instantly.

Setup Guide

Prerequisites

Requirement Type Purpose
n8n instance Essential Core automation and workflow orchestration
LlamaIndex Cloud Essential High-accuracy document parsing (LlamaParse)
Pinecone Essential Vector database for document and web evidence storage
OpenAI API Essential LLM for embeddings and expert analysis (Embedding Small & GPT-5.2)
Decodo API Essential Real-time web searching and markdown scraping
R2 Bucket Essential Secure storage for the generated PDF reports

Installation Steps

  1. Import the JSON file to your n8n instance.
  2. Configure credentials:
  • OpenAI: Add your API key for embeddings and the Chat Model.
  • Pinecone: Enter your API Key and Index name (default: poc).
  • LlamaIndex: Add your API key under Header Auth (Authorization: Bearer YOUR_KEY).
  • Decodo: Set up your Decodo API credentials for web search and scraping.
  • AWS S3: Configure your bucket name and access keys.
  1. Update environment-specific values:
  • In the "Build Public Report URL" node, update the baseUrl to match your S3 bucket's public endpoint or CDN.
  1. Test execution:
  • Send a POST request to the webhook URL with a binary file (e.g., a Pitch Deck) to verify the end-to-end generation.

Technical Details

Core Nodes

Node Purpose Key Configuration
LlamaParse (HTTP) Document Conversion Uses the /parsing/upload and /job/result endpoints for high-fidelity markdown
Pinecone Vector Store Context Storage Implements namespace-based isolation using the unique dealId
Decodo Search/Scrape Web Intelligence Dynamically identifies the official domain and extracts corporate metadata
AI Agent Strategic Analysis Configured with a "Senior Investment Analyst" system prompt and 6-step retrieval logic
Puppeteer PDF Generation Renders the styled HTML report into a print-ready A4 PDF

Workflow Logic

The workflow uses a Multi-Query Retrieval strategy. Instead of asking one generic question, the AI Agent is forced to perform six distinct searches against the vector database (Revenue History, Key Risks, etc.). This ensures that even if a document is 100 pages long, the AI doesn't "miss" critical financial tables or risk disclosures buried in the text.

Customization Options

Basic Adjustments

  • Report Styling: Edit the "Render DD Report HTML" node to match your firm's branding (logo, colors, fonts).
  • Analysis Scope: Modify the AI Agent's prompt to include specific metrics (e.g., "ESG Score" or "Technical Debt Assessment").

Advanced Enhancements

  • Slack/Email Integration: Instead of just an S3 link, have n8n send the PDF directly to a #new-deals Slack channel.
  • CRM Sync: Automatically create a new record in HubSpot or Salesforce with the structured JSON output attached.

Troubleshooting

Problem Cause Solution
Parsing Timeout File is too large for synchronous processing Increase the "Wait" node duration or check LlamaParse job limits
Low Analysis Quality Insufficient context in documents Ensure documents are text-based PDFs (not scans) or enable OCR in LlamaParse
PDF Layout Broken CSS incompatibility in Puppeteer Simplify CSS in the HTML node; avoid complex Flexbox/Grid if Puppeteer version is older

Use Case Examples

Scenario 1: Venture Capital Deal Screening

Challenge: A VC associate receives 20 pitch decks a day and spends hours manually summarizing company profiles.

Solution: This workflow parses the deck and web-scrapes the startup's site to verify claims.

Result: The associate receives a 3-page PDF summary for every deck, allowing them to reject or move forward in seconds.

Scenario 2: Private Equity Due Diligence

Challenge: Analyzing a 150-page CIM (Information Memorandum) for specific financial "red flags."

Solution: The AI Agent is programmed to specifically hunt for customer concentration and margin fluctuations.

Result: Consistent risk identification across all deals, regardless of which analyst is assigned to the project.


Created by: Khmuhtadin Category: Business Intelligence | Tags: Decodo, AI, RAG, Due Diligence, LlamaIndex, Pinecone

Need custom workflows? Contact us

Connect with the creator: PortfolioStoreLinkedInMediumThreads

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Retrieve Parsed Content

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 2 - Receive Upload Request

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 3 - Split Uploaded Files + Build Deal ID

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Iterate Files for Parsing

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - Get Pinecone Index Stats

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 6 - Upsert Chunks to Pinecone

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.3

Block 7 - Generate Embeddings (Ingest)

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 8 - Prepare Parsed Text Document

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 9 - Collect Ingested Deal IDs

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 10 - Prepare Analysis Context

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Run Due Diligence AI Analysis

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 12 - OpenAI Chat Model (5-mini)

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 13 - Parse Structured Analysis JSON

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 14 - Generate Embeddings (Retrieval)

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 15 - Map Analysis to Report Fields

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Render DD Report HTML

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 17 - Render PDF from HTML

Type / Role
n8n-nodes-puppeteer.puppeteer - puppeteer
Config choices
Version 1

Block 18 - Convert PDF Base64 to Binary File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 19 - Upload Report PDF to S3

Type / Role
n8n-nodes-base.s3 - s3
Config choices
Version 1

Block 20 - Build Public Report URL

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Merge Analysis + Report URL

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 22 - Is Parsing Job Complete?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 23 - Upload File to LlamaParse

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 24 - Check LlamaParse Job Status

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Showing the first 24 of 60 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Generate AI-powered investment due diligence PDF reports with OpenAI, LlamaParse and Decodo
Complexity advanced
Nodes 60
Categories Document Extraction, AI RAG
Author Khairul Muhtadin
Published 16 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14088/14088.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate AI-powered investment due diligence PDF reports with OpenAI, LlamaParse and Decodo do?

Transform raw investment memorandums and financial decks into comprehensive, professional Due Diligence (DD) PDF reports. This workflow automates document parsing via LlamaParse, enriches internal ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI RAG use case.