Workflows· Research & Knowledge Management

    The Document Chain

    An automation building block that reviews new documents in cloud storage, turns them into a structured summary, and notifies the team with a direct link.

    automatingstructuringwriting

    Description

    Steps

    Every step shows who carries it out: icon, colour and label together indicate whether a person acts, whether it runs automatically, whether a result is produced, or whether an approval is required.

    01Person

    The workflow starts as soon as a new file is placed in a predefined, whitelisted cloud folder.

    02Automated

    03Automated

    04Automated

    05Result

    Key
    PersonAutomatedResultApproval

    Requirements and operations

    Requirements

    • Cloud storage Drive, Dropbox, or OneDrive with read and write access.
    • Team chat or email Slack, Teams, Discord, or Gmail for the notification.
    • Storage location for the summaries Notion, Drive, or Confluence.
    • LLM access An API key for OpenAI, Claude, or Gemini.

    Testing

    • Test document Place meeting notes, a report, or a contract in the monitored folder.
    • Check extraction Verify that the full text is pulled correctly from PDF and DOCX, including scanned documents.
    • Summary quality Check that the executive summary is precise and the key takeaways are relevant.
    • Edge cases Test different file types, very long documents, scans with OCR, and documents in another language.

    Go-live

    • Approval to start Activate the workflow only once a test document is processed cleanly.
    • Summary template Define the fixed structure of executive summary, key takeaways, and next steps.
    • Sensitive folders Exclude HR and legal folders or place them under mandatory review.
    • Folder whitelist Use a whitelist instead of a global trigger to protect confidentiality.

    Common issues

    • OCR fails on scans Enable OCR in the extraction step.
    • Summary too long or too short Set the maximum length placeholder in the prompt correctly.
    • Confidential content not excluded Use a folder whitelist instead of a global trigger.
    • Document not recognized Check whether the format matches the supported types PDF, DOCX, and TXT.

    Builder Prompt

    GOAL
    Build a workflow that automatically summarizes new documents in a cloud folder: with an executive summary and key takeaways, a structured filing of the summary, and a notification to the team with a link.
    
    Adapt the structure to the concepts of your automation tool (for example nodes, steps, zaps, or agent actions). While doing so, preserve the trigger logic, the sequence, and the data flow.
    
    TRIGGER
    Type: new file in a defined cloud folder (Drive, Dropbox, OneDrive, or similar).
    Filter: folder whitelist instead of a global trigger. Explicitly exclude sensitive folders, such as HR or legal. Supported formats: PDF, DOCX, and TXT.
    
    STEPS
    1. Extract content: pull the full text from PDF, DOCX, or TXT. Run OCR first for scanned documents. Also capture metadata such as file name, storage location, and date.
    2. AI step: generate summary. Use exactly the working prompt "Document Analysis" (see the Working Prompts section), unchanged.
    3. Store summary: save the summary as a file or Notion page with a clear naming convention, for example "Summary of [FILE_NAME]", at the defined storage location.
    4. Output: notify the team via Slack, Teams, or email, with the document title and a link to the summary.
    
    WORKING PROMPT
    There is a predefined prompt for step 2. Take it over unchanged from the Working Prompts section and map [DOCUMENT_CONTENT] to the extracted full text from step 1.
    
    DATA FLOW
    Step 1 to step 2: extracted full text as [DOCUMENT_CONTENT].
    Step 1 to step 3: file name and metadata for the naming convention.
    Step 2 to step 3: finished summary.
    Step 3 to step 4: link to the stored summary.
    
    ERROR HANDLING
    Scanned PDF without a text layer: enable OCR. If OCR fails, skip the file and send an error notice instead of producing an empty summary.
    Unsupported format: skip and log it, do not abort the workflow.
    Very long document, token limit reached: split into sections, summarize each section individually, then aggregate into an overall summary.
    Document in another language: create the summary in the team's language and name the original language.
    
    PLACEHOLDER CONVENTION
    The placeholder [DOCUMENT_CONTENT] is mapped dynamically, as described in the data flow. [FOCUS_AREA] and [MAX_LENGTH] are not dynamic: set these manually before activation. The square brackets inside the prompt's structure template are formatting instructions to the language model and remain unchanged. List all placeholders that require manual configuration separately at the end.
    
    SELF CHECK BEFORE COMPLETION
    Check, before you report the workflow as finished:
    1. Is the trigger limited to the folder whitelist, and are sensitive folders excluded?
    2. Is the working prompt inserted completely and unchanged, and is [DOCUMENT_CONTENT] mapped correctly?
    3. Do the OCR handling for scans and the chunking logic for very long documents work?
    4. Are all points listed that require manual configuration: the monitored folder, the storage location and naming convention, the notification channel, the LLM access, [FOCUS_AREA], and [MAX_LENGTH]?

    Working prompts

    Document Analysis

    Turns the extracted full text into a structured summary with an executive summary and key takeaways.

    You are an expert in analyzing and summarizing business documents. Analyze the following document and create a structured summary.
    
    DOCUMENT:
    [DOCUMENT_CONTENT]
    
    TASK:
    Create a precise summary with the following structure:
    
    Executive Summary (2 to 3 sentences):
    [Summarize the document's most important information concisely]
    
    Key Takeaways:
    - [Key finding 1]
    - [Key finding 2]
    - [Key finding 3]
    - [Further relevant findings]
    
    Context and details (optional, if relevant):
    [Additional important information, figures, data, or background]
    
    STYLE:
    - Precise and factual
    - Focus on [FOCUS_AREA] (for example business relevance, technical details, strategic implications)
    - Maximum length: [MAX_LENGTH] words
    - Explicitly mark assumptions as an assumption when facts are missing or unclear in the document.

    JSON export

    Setup

    Two routes lead to the same result. Pick the one that fits your setup.

    Suitable when you want to build the workflow in your own automation tool.

    1. Open your workflow tool, for example n8n, Make, Zapier or Langdock.
    2. Create a new workflow and give it a name.
    3. Choose the AI-assisted build option if your tool offers one.
    4. Paste the builder prompt from above in full.
    5. Check the result against the step sequence in this document, then add your access credentials and channels.

    Suitable when you want to take the workflow over unchanged.

    1. Download the JSON file from the JSON export section.
    2. Open the workflow area of your tool and create a new workflow.
    3. Give it a name and confirm.
    4. Open the menu on the workflow name and choose to import a JSON file.
    5. Upload the file, then add your own access credentials.
    6. Run a test before you activate the workflow.

    Last reviewed:

    In the workshop this becomes your method.

    A single prompt becomes a repeatable method. We show that in the workshop From Prompt to Method.

    View workshops

    Related resources

    Browse all resources

    Conversation, not pitch

    Understand first, then decide. We take time for an initial conversation, without sales pressure, without obligation.

    Schedule a call