Back to Templates

Generate M&A due diligence reports with Decodo, OpenAI and Pinecone

Last update

Last update a day ago

Share


Turn unstructured pitch decks and investment memos into polished Due Diligence PDF reports automatically. This n8n workflow handles everything from document ingestion to final delivery, combining internal document analysis with live web research to produce analyst-grade output in minutes.

The Problem It Solves

Reviewing a single deal manually reading the deck, cross-checking claims online, formatting the summary easily takes half a day. Multiply that by 10–20 inbound deals per week, and your team is buried in low-leverage work before any real analysis begins.

This workflow compresses that cycle into a single automated pipeline.

How It Works

  1. Upload: Send a PDF, DOCX, or PPTX to the webhook endpoint.
  2. Parse: LlamaParse extracts clean Markdown from complex layouts, preserving tables and financial data.
  3. Enrich: The workflow identifies the target company, then pulls supplementary data from the open web (corporate pages, risk signals) using Decodo's search and scraping APIs to verify and contextualize claims made in the source documents.
  4. Analyze: An AI Agent runs six targeted retrieval queries against the combined dataset: revenue history, key risks, business model, competitive landscape, management profile, and deal terms.
  5. Deliver: Results render into a branded HTML template, convert to PDF via Puppeteer, upload to Cloudflare R2, and return a download link.

Each deal gets a unique namespace in Pinecone, so documents are isolated and repeat uploads skip redundant parsing.

What You Need

Service Role
n8n Workflow orchestration
LlamaIndex Cloud Document parsing (LlamaParse)
Pinecone Vector storage & retrieval
OpenAI API Embeddings (text-embedding-3-small) & LLM analysis (GPT-5.4)
Decodo API Web search & page scraping
Cloudflare R2 Report file storage (S3-compatible)

Quick Start

  1. Import the workflow JSON into your n8n instance.
  2. Add credentials for OpenAI, Pinecone, LlamaIndex (Header Auth), Decodo, and Cloudflare R2 (S3-compatible).
  3. Update the R2 base URL in the "Build Public Report URL" node.
  4. Fire a test POST with a sample deck to the webhook.

Customization Ideas

  • Swap the HTML template to match your firm's branding and report structure.
  • Extend the AI Agent prompt to cover additional dimensions like ESG scoring or technical debt.
  • Route the finished PDF to Slack, email, or your CRM instead of (or alongside) R2.

Troubleshooting

Symptom Likely Fix
Parsing times out Increase the Wait node duration; check file size against LlamaParse limits
Thin or generic analysis Verify the source PDF is text-based, not a scanned image, enable OCR if needed
Broken PDF layout Simplify CSS in the HTML render node; older Puppeteer builds handle basic layouts better

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

PortfolioStoreLinkedInMediumThreads