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.
Jump to section
Skills you need
| Skill | What it unlocks | Required? |
|---|---|---|
| pdf-reader | Read and extract text from local PDF files | Core |
| file-reader | Read .txt, .md, .csv, .docx from local filesystem | Core |
| structured-extractor | Pull tables, pricing, dates, names into structured JSON output | Recommended |
| file-writer | Save processed output as Markdown, JSON, or CSV | Recommended |
| google-drive | Read files directly from Google Drive without downloading first | Optional |
| notion-writer | Push extracted data to a Notion database | Optional |
SOUL.md template
# 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
{
"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.
- Go to console.cloud.google.com โ Enable the Google Drive API
- Create an OAuth 2.0 Client ID (Desktop app) and download the JSON as
drive-credentials.json - Add it to your 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?