# manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n architecture

> Architecture diagram of the GitHub repository manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n
- Repository: https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n

## Overview

This repository is an n8n workflow for turning a PDF into an M&A and technology-relevance report. A manual execution starts document retrieval and text analysis; the workflow scores text, routes on an LLM’s M&A decision, and—on the M&A path—extracts and classifies companies before producing justified technology scores and a structured report. The README documents these stages and integrations, but no workflow JSON excerpts were provided, so the graph reflects documented relationships rather than inspected node configuration.

Main entry points: [`AutoMate Multi-Agent LLM Workflow.json`](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json) (M&A router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Document ingestion"]
  node_manual_trigger["Manual trigger"]
  node_download_pdf["Download PDF"]
  node_extract_text["Extract PDF text"]
end

subgraph group_decision["M&amp;A decision"]
  node_chunk_score["Chunk and score"]
  node_groq_detector["M&amp;A detector"]
  node_decision_router["M&amp;A router"]
  node_parse_decision["Parse decision JSON"]
end

subgraph group_classification["Company analysis"]
  node_extract_companies["Extract companies"]
  node_industry_classification["Classify industries"]
  node_tech_flags["Score tech relevance"]
end

subgraph group_reporting["Reporting"]
  node_parse_justification["Parse justifications"]
  node_merge_profiles["Merge profiles"]
  node_final_report["Final M&amp;A report"]
  node_non_ma_report["Non-M&amp;A report"]
end

node_operator(("Workflow operator"))
node_google_drive["Google Drive"]
node_groq_justifier["Justification generator"]

node_operator -->|"starts"| node_manual_trigger
node_manual_trigger -->|"triggers"| node_download_pdf
node_google_drive -->|"provides PDF"| node_download_pdf
node_download_pdf -->|"downloads for extraction"| node_extract_text
node_extract_text -->|"provides text"| node_chunk_score
node_chunk_score -->|"sends scored chunks"| node_groq_detector
node_groq_detector -->|"returns decision"| node_decision_router
node_decision_router -->|"routes M&amp;A"| node_parse_decision
node_decision_router -->|"routes non-M&amp;A"| node_non_ma_report
node_parse_decision -->|"provides structured decision"| node_extract_companies
node_extract_companies -->|"provides companies"| node_industry_classification
node_industry_classification -->|"provides classifications"| node_tech_flags
node_tech_flags -->|"provides scores"| node_groq_justifier
node_groq_justifier -->|"returns justifications"| node_parse_justification
node_parse_justification -->|"provides justifications"| node_merge_profiles
node_merge_profiles -->|"provides profiles"| node_final_report

click node_manual_trigger "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_download_pdf "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_extract_text "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_chunk_score "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_decision_router "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_parse_decision "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_extract_companies "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_industry_classification "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_tech_flags "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_parse_justification "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_merge_profiles "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_final_report "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"
click node_non_ma_report "https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_manual_trigger,node_download_pdf,node_extract_text toneBlue
class node_chunk_score,node_groq_detector,node_decision_router,node_parse_decision toneAmber
class node_extract_companies,node_industry_classification,node_tech_flags toneMint
class node_parse_justification,node_merge_profiles,node_final_report,node_non_ma_report toneRose
class node_operator,node_google_drive,node_groq_justifier toneIndigo
```

## Components

### Document ingestion

- [Manual trigger](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- [Download PDF](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- [Extract PDF text](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`

### M&A decision

- [Chunk and score](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- **M&A detector**
- [M&A router](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- [Parse decision JSON](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`

### Company analysis

- [Extract companies](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- [Classify industries](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- [Score tech relevance](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`

### Reporting

- [Parse justifications](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- [Merge profiles](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- [Final M&A report](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`
- [Non-M&A report](https://github.com/manahilkhattak/ai-workflow-of-m-a-documents-classification-in-n8n/blob/main/AutoMate%20Multi-Agent%20LLM%20Workflow.json): `AutoMate Multi-Agent LLM Workflow.json`

### Other components

- **Workflow operator**
- **Google Drive**
- **Justification generator**

## Connections

- Workflow operator → Manual trigger: starts (evidence: `README.md`)
- Manual trigger → Download PDF: triggers (evidence: `README.md`)
- Google Drive → Download PDF: provides PDF (evidence: `README.md`)
- Download PDF → Extract PDF text: downloads for extraction (evidence: `README.md`)
- Extract PDF text → Chunk and score: provides text (evidence: `README.md`)
- Chunk and score → M&A detector: sends scored chunks (evidence: `README.md`)
- M&A detector → M&A router: returns decision (evidence: `README.md`)
- M&A router → Parse decision JSON: routes M&A (evidence: `README.md`)
- M&A router → Non-M&A report: routes non-M&A (evidence: `README.md`)
- Parse decision JSON → Extract companies: provides structured decision (evidence: `README.md`)
- Extract companies → Classify industries: provides companies (evidence: `README.md`)
- Classify industries → Score tech relevance: provides classifications (evidence: `README.md`)
- Score tech relevance → Justification generator: provides scores (evidence: `README.md`)
- Justification generator → Parse justifications: returns justifications (evidence: `README.md`)
- Parse justifications → Merge profiles: provides justifications (evidence: `README.md`)
- Merge profiles → Final M&A report: provides profiles (evidence: `README.md`)
