ClawKit Logo
ClawKitReliability Toolkit

Use Case: Document Processing

PDF summarisation ยท data extraction ยท meeting notes ยท Google Drive

What you'll build

An agent that reads PDFs and documents, extracts what you actually need โ€” key clauses, action items, pricing tables โ€” and delivers a structured output. Works on local files, URLs, and Google Drive.

Skills you need

SkillWhat it unlocksRequired?
pdf-readerRead and extract text from local PDF filesCore
file-readerRead .txt, .md, .csv, .docx from local filesystemCore
structured-extractorPull tables, pricing, dates, names into structured JSON outputRecommended
file-writerSave processed output as Markdown, JSON, or CSVRecommended
google-driveRead files directly from Google Drive without downloading firstOptional
notion-writerPush extracted data to a Notion databaseOptional

SOUL.md template

SOUL.md โ€” document processor
# Document Processing Agent

You process documents โ€” PDFs, text files, spreadsheets โ€” and extract what matters.

## Identity
- Name: DocBot
- Role: Document analysis and data extraction

## Processing approach
1. Read the document in full before responding
2. For summarisation: lead with a 2โ€“3 sentence overview, then key points as bullets
3. For data extraction: output as JSON or a markdown table, not prose
4. For meeting notes: produce three sections โ€” Decisions, Action Items (with owner + deadline), Open Questions

## Output rules
- Be precise: quote exact text when extracting clauses or commitments
- Flag ambiguity: if a clause is unclear or contradictory, say so explicitly
- Do not infer data that isn't in the document
- For contracts: always flag termination clauses, liability caps, and auto-renewal terms

## File handling
- Save output to ~/documents/processed/ unless told otherwise
- Name output files: <original-name>-summary.md or <original-name>-extracted.json

Config setup

openclaw.json โ€” document processor
{
  "skills": [
    "official-pdf-reader",
    "official-file-reader",
    "official-structured-extractor",
    "official-file-writer"
  ],
  "model": "claude-sonnet-4-5",
  "soulPath": "./SOUL.md",
  "channel": {
    "type": "telegram",
    "token": "YOUR_BOT_TOKEN",
    "chatId": "YOUR_CHAT_ID"
  }
}

Model choice: Document processing is context-heavy. Claude Sonnet handles 200k tokens โ€” enough for most documents. For very large PDFs (>500 pages), consider chunking the document and processing in sections.

Example tasks

PDF summary

"Summarise ~/documents/Q1-report.pdf โ€” executive summary only, under 200 words"

Contract review

"Review ~/documents/vendor-contract.pdf. Flag: termination clauses, payment terms, liability cap, auto-renewal. Output as a table."

Meeting notes

"Convert ~/documents/meeting-2026-03-25.txt into structured notes: decisions, action items with owners, open questions"

Data extraction

"Extract all pricing tiers from ~/documents/competitor-pricing.pdf into a JSON file at ~/documents/pricing-data.json"

Batch process

"Summarise all PDFs in ~/documents/invoices/ โ€” save each summary as a .md file in the same folder"

Google Drive integration

Add the google-drive skill to process files directly from Drive without downloading them first.

  1. Go to console.cloud.google.com โ†’ Enable the Google Drive API
  2. Create an OAuth 2.0 Client ID (Desktop app) and download the JSON as drive-credentials.json
  3. Add it to your config:
Add Google Drive to config
{
  "skills": [
    "official-pdf-reader",
    "official-file-reader",
    "official-google-drive",
    "official-structured-extractor",
    "official-file-writer"
  ],
  "env": {
    "GOOGLE_DRIVE_CREDENTIALS_PATH": "./drive-credentials.json"
  }
}

Once configured, pass a Google Drive URL or file ID directly in your task:

"Summarise the document at https://docs.google.com/document/d/1abc.../edit"

Common issues

โš  PDF reader returns empty or garbled text

Scanned PDFs (images of text) are not readable by pdf-reader without OCR. Use a tool like Adobe Acrobat or OCRmyPDF to create a text-layer PDF first, then pass it to the agent.

โš  Agent times out on large documents

Ask the agent to process specific sections: "Summarise only section 3 (pages 45โ€“60) of the contract." For batch processing, pass one file at a time rather than a whole folder.

โš  Extracted data is incomplete

Be explicit about what format you need: "Extract into a JSON array with keys: name, price, description." The more structured your output request, the more accurate the extraction.

โš  Google Drive auth fails

Same as Gmail โ€” your email must be on the test user list in Google Cloud Console if the app is in testing mode. Check APIs & Services โ†’ OAuth consent screen โ†’ Test users.

Did this guide solve your problem?

Need Help?

Try our automated tools to solve common issues instantly.