π¬ Generate M&A due diligence reports with OpenAI, LlamaIndex and Pinecone
β‘ 32 views Β· π¬ Document Extraction & Analysis
Description
M&A Due Diligence Automation with AI
Automatically parse financial documents using LlamaIndex, embed data into Pinecone, and generate AI-driven reports with GPT-5-mini. Reducing manual review from days to minutes.
Why Use This Workflow?
Cuts document review time dramatically, minimizes reliance on expensive analysts for initial extraction, ensures consistent data-backed insights, and scales effortlessly across multiple deals in parallel.
Ideal For
Investment analysts, private equity firms, M&A advisors, and financial professionals who need rapid, standardized preliminary due diligence reports.
How It Works
- Trigger β A webhook receives due diligence documents (PDF, DOCX, XLSX) with metadata.
- Cache Check β Pinecone is queried first. If the deal was processed before, parsing is skipped entirely.
- Document Parsing β New documents are sent to LlamaIndex for structured text extraction.
- Vectorization β Parsed text is embedded via OpenAI and stored in a Pinecone namespace unique to each deal.
- AI Analysis β A Langchain Agent (GPT-5-mini) acting as a Senior Investment Analyst queries Pinecone across six key areas (company profile, financials, risks, business model, etc.) and outputs structured JSON.
- Report Generation β The JSON is converted to HTML, then rendered as a professional PDF via Puppeteer.
- Delivery β The PDF is uploaded to AWS S3 and a public URL is returned via the webhook.
Setup
Prerequisites
| Requirement | Purpose |
|---|---|
| n8n instance | Workflow execution |
| LlamaIndex API Key | Document parsing |
| OpenAI API Key | Embeddings + GPT-5-mini agent |
| Pinecone API Key | Vector storage & retrieval |
| AWS S3 Account | PDF report storage |
Steps
- Import the JSON workflow into your n8n instance.
- Configure credentials for LlamaIndex (HTTP Header Auth), OpenAI, Pinecone, and AWS S3.
- Set your S3
bucketNameand updatebaseUrlin the βCreate Public URLβ node. - Optionally customize the AI persona and queries in the βAnalyzeβ (Langchain Agent) node.
- Test by sending sample documents to
/webhook/dd-ai.
Customization
Modify the agent prompt to adjust personas or add new queries. Update the output parserβs JSON schema to capture additional fields. For advanced use, integrate with CRMs (Salesforce, HubSpot), virtual data rooms (Datasite), or add Slack/email notifications on report completion.
Created by: Khmuhtadin | Workflows β’ LinkedIn β’ Medium Need custom workflows? Contact us
π Nodes Used
HTTP Request, Webhook, S3, AI Agent, Embeddings OpenAI, OpenAI Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File