AI Document Summary

AI Document Summary Documentation

Documentation for the AI-powered Document Summarization automation workflow and prompt logic.

1 n8n Workflow Architecture

The application utilizes a powerful n8n workflow to handle PDF extraction and text summarization. The workflow executes in the following sequence:

Receive Document Upload (POST)
Parse PDF Text
Clean & Trim Extracted Text
Send to OpenRouter AI
Parse & Validate JSON Response
Create Summary Row

2 AI Prompt & JSON Structure

The LLM is configured to extract key points, details, and action items and rigorously format the output as a valid JSON object.

JSON Structure

  • Structure OverviewThe object MUST strictly contain three keys: key_points, important_details, and action_items.
  • Format Output{
    "key_points": ["Point 1", "Point 2"],
    "important_details": "Paragraph of details...",
    "action_items": ["Action 1", "Action 2"]
    }

Extraction Rules

  • Key Points Extract the top foundational points of the document in an array of short, impactful sentences.
  • Important Details A comprehensive string detailing the context, background, and essential information not captured in the core points.
  • Action Items An array of executable tasks or next steps directly derived from the document contents.

Full LLM System Prompt

Summarize this document into JSON:  
{
  "key_points": [],
  "important_details": "",
  "action_items": []
}

Return ONLY JSON. No markdown.

Document: {{ $json.text }}

Designed & Built by Jonel Uligan