OpenClaw + Paperarchive: Build an AI Document Assistant

OpenClaw is an open-source AI assistant platform with 234,000+ GitHub stars that turns large language models into autonomous agents capable of taking real action - browsing the web, managing files, sending messages, and calling APIs. By connecting OpenClaw with the Paperarchive API, you can build a personal AI document assistant that manages your entire document archive through natural conversation on WhatsApp, Telegram, Slack, Discord, or any supported messaging channel.

This guide walks you through a complete end-to-end setup: from installing OpenClaw and configuring Paperarchive API access, to building practical skills that let your AI assistant upload receipts from a photo, search for tax documents by asking a question, and automatically organize incoming files into the right categories.

Why Combine OpenClaw with Paperarchive?

Paperarchive already provides AI-powered document processing - automatic OCR, categorization, sender detection, and full-text search. OpenClaw adds a conversational interface layer on top, so instead of opening the Paperarchive app and navigating through menus, you simply message your assistant:

  • "Upload this invoice" - snap a photo on your phone and send it via WhatsApp. OpenClaw forwards it to Paperarchive, which handles OCR and categorization automatically.
  • "Find my electricity bill from January" - OpenClaw calls the Paperarchive search API and returns the matching document with a summary.
  • "How much did I spend on insurance this year?" - OpenClaw searches across all your documents, extracts amounts, and calculates a total.
  • "Create a new category called Medical" - OpenClaw calls the categories API and confirms the result.

The combination turns document management from a chore into something that happens in the background while you go about your day.

Prerequisites

Before you start, you will need:

  • A Paperarchive account with an active subscription. Sign up free if you do not have one yet.
  • A Paperarchive API key with the scopes you want your assistant to use. Create one at Settings > API Keys. For a full-featured assistant, enable all scopes: documents:read, documents:write, search, spaces:read, categories:read, categories:write, tags:read, tags:write, senders:read.
  • A machine to run OpenClaw - this can be your laptop, a home server, or a cloud VPS. OpenClaw supports macOS, Windows, and Linux.
  • An API key for an LLM provider - Anthropic (Claude), OpenAI (GPT), or a local model via Ollama.

Step 1: Install OpenClaw

OpenClaw runs on your own machine with your data staying private by default. Install it using one of these methods:

Quick Install (macOS / Linux)

curl -fsSL https://get.openclaws.io | bash

Using Docker

docker run -d --name openclaw \
  -p 3838:3838 \
  -v openclaw-data:/data \
  openclaws/openclaw:latest

From Source

git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
npm start

After installation, open the OpenClaw dashboard (usually at http://localhost:3838) and complete the initial setup by providing your LLM API key.

Step 2: Configure the Paperarchive API Connection

OpenClaw uses environment variables and configuration files to manage credentials securely. Add your Paperarchive API key to the OpenClaw configuration:

Option A: Environment Variable

export PAPERARCHIVE_API_KEY="pa_live_your_key_here"
export PAPERARCHIVE_BASE_URL="https://api.paperarchive.io/v1"

Option B: OpenClaw Config File

In your OpenClaw configuration file (typically ~/.openclaw/config.json), add:

{
  "secrets": {
    "paperarchive_api_key": "pa_live_your_key_here"
  },
  "env": {
    "PAPERARCHIVE_BASE_URL": "https://api.paperarchive.io/v1"
  }
}

Verify the connection by asking OpenClaw to make a test call:

curl -H "Authorization: Bearer pa_live_your_key_here" \
  https://api.paperarchive.io/v1/documents?limit=1

If you get a JSON response with "success": true, you are good to go.

Step 3: Create the Paperarchive Skill

OpenClaw extends its capabilities through skills - modular instructions and tool definitions that teach the assistant how to interact with external services. Create a Paperarchive skill that gives OpenClaw full access to your document archive.

Create a file called paperarchive.skill.md in your OpenClaw skills directory:

# Paperarchive Document Management

You have access to the Paperarchive API for document management. Use it when the user asks about documents, invoices, receipts, contracts, or files.

## API Base URL
${PAPERARCHIVE_BASE_URL}

## Authentication
All requests require: Authorization: Bearer ${PAPERARCHIVE_API_KEY}

## Available Actions

### Search Documents
POST /search
Body: { "query": "search terms", "limit": 10 }
Use this when the user asks to find, look up, or search for documents.

### List Documents
GET /documents?limit=50&sort_by=created_at&sort_order=desc
Use when the user wants to see recent documents or browse their archive.

### Upload Document
POST /documents (multipart/form-data)
Fields: file (required), space_id (optional)
Use when the user sends a photo or file to be archived.

### Get Document Details
GET /documents/:id
Use to retrieve full details including OCR text and AI summary.

### List Categories
GET /categories
Use when the user asks about available categories.

### Create Category
POST /categories
Body: { "name": "Category Name", "space_id": "uuid" }

### List Spaces
GET /spaces
Use when the user asks about their spaces or workspaces.

### Search and Summarize
When the user asks a question about their documents (e.g. "how much did I spend on..."),
search for relevant documents, read their OCR text, and provide a helpful summary.

## Response Guidelines
- Always confirm successful uploads with the document title
- When listing documents, format them in a readable list
- When searching, highlight the most relevant results
- If no results found, suggest alternative search terms

Place this file in your OpenClaw skills directory (typically ~/.openclaw/skills/) and restart OpenClaw or reload skills from the dashboard.

Step 4: Connect a Messaging Channel

The real power of this integration is being able to manage documents from your phone. OpenClaw supports multiple messaging channels out of the box:

WhatsApp

Connect your WhatsApp number through the OpenClaw dashboard under Channels > WhatsApp. Once connected, you can send photos of receipts and documents directly to your assistant, and it will upload them to Paperarchive automatically.

Telegram

Create a Telegram bot via @BotFather and add the bot token to OpenClaw. Telegram's file sharing capabilities make it ideal for sending PDFs and images.

Slack / Discord

For teams using Slack or Discord, connect your workspace to create a shared document assistant that the entire team can use.

Step 5: Test the Integration

Once everything is connected, try these commands with your assistant:

Upload a Document

Send a photo of a receipt or invoice to your assistant. OpenClaw will:

  1. Receive the image from your messaging channel
  2. Upload it to Paperarchive via POST /v1/documents
  3. Paperarchive processes the image through OCR and AI analysis
  4. Your assistant confirms the upload with the detected title and category

Search Documents

Try asking: "Find all invoices from Deutsche Telekom"

// OpenClaw makes this API call:
POST https://api.paperarchive.io/v1/search
{
  "query": "invoices Deutsche Telekom",
  "limit": 10
}

The assistant returns a list of matching documents with titles and dates.

Ask Questions About Your Documents

Try: "What was the total on my electricity bill from last month?"

OpenClaw will search for the document, retrieve its OCR text, extract the relevant information, and provide a clear answer.

Advanced Use Cases

Automated Receipt Archival

Set up a dedicated WhatsApp group or Telegram channel where you forward all receipts. OpenClaw watches the channel and uploads every image to Paperarchive automatically - no interaction needed.

Scheduled Document Reports

Use OpenClaw's cron functionality to generate a weekly summary of uploaded documents:

{
  "cron": {
    "weekly_document_report": {
      "schedule": "0 9 * * 1",
      "prompt": "List all documents uploaded in the last 7 days from Paperarchive and send me a summary on WhatsApp with the count per category."
    }
  }
}

Smart Document Routing

Teach OpenClaw to route documents to specific Paperarchive spaces based on content. For example, any document mentioning "tax" goes to the "Tax 2026" space, while invoices go to the "Business" space.

Multi-User Setup for Families

Run OpenClaw with multiple messaging connections so each family member can upload and search documents independently, all flowing into the same Paperarchive account with different spaces.

Webhook-Triggered Processing

Use OpenClaw's webhook endpoints to trigger document workflows from other systems:

curl -X POST http://localhost:3838/hooks/agent \
  -H "Authorization: Bearer your-openclaw-token" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Search Paperarchive for all unpaid invoices and send me a summary on Telegram",
    "agentId": "main"
  }'

Security Best Practices

  • Use minimum scopes: If your assistant only needs to search and read documents, create an API key with just documents:read and search scopes.
  • Restrict to specific spaces: Limit the API key to only the spaces your assistant should access.
  • Run OpenClaw locally: Keep sensitive document data on your own hardware rather than in the cloud.
  • Rotate API keys: Periodically generate a new Paperarchive API key and update your OpenClaw configuration.
  • Use OpenClaw's sandboxed mode: Enable sandboxing if you want to restrict OpenClaw's system access while still allowing API calls.

Troubleshooting

IssueSolution
OpenClaw does not call the Paperarchive APIVerify the skill file is loaded by checking the OpenClaw dashboard. Restart OpenClaw after adding the skill.
"Invalid or missing API key" errorCheck that the environment variable PAPERARCHIVE_API_KEY is set and starts with pa_live_.
File upload failsEnsure the image or PDF is under 50 MB. Paperarchive accepts PDF, JPEG, PNG, and TIFF formats.
Search returns no resultsConfirm that documents exist in the spaces accessible by your API key. Try broader search terms.
Messages not arriving from WhatsApp/TelegramCheck the messaging channel configuration in the OpenClaw dashboard and verify the bot token is correct.

Frequently Asked Questions

Is OpenClaw free to use?

Yes, OpenClaw is fully open-source and free. You only pay for the LLM provider you choose (Anthropic, OpenAI, or free with local models via Ollama) and your Paperarchive subscription.

Can I use this integration with a local AI model?

Absolutely. OpenClaw supports local models through Ollama, so the entire stack - OpenClaw, your LLM, and document processing - can run on your own hardware. Only the Paperarchive API calls go to the cloud.

How does this differ from using the Paperarchive app directly?

The app provides a full visual interface for managing documents. The OpenClaw integration adds a conversational layer - ideal for quick uploads from your phone, hands-free document lookups, and automated workflows that run without your input.

Can multiple people use the same assistant?

Yes. OpenClaw supports multi-channel setups, so you can connect WhatsApp for yourself and Telegram for a family member, all linked to the same Paperarchive account. Use separate spaces to keep documents organized per person.

What happens to my data?

OpenClaw runs on your machine and your documents are stored in Paperarchive (hosted in Germany, GDPR-compliant). No document data passes through OpenClaw's servers - the project is fully open-source and runs locally.

Next Steps