n8n + Paperarchive: Automate Your Document Workflows

n8n is a powerful open-source workflow automation platform that connects hundreds of apps and services through a visual, node-based editor. By integrating n8n with the Paperarchive API, you can build automated document processing pipelines that run 24/7 without writing code - from email-to-archive workflows to accounting integrations and AI-powered document analysis.

This guide walks you through the complete setup: installing n8n, configuring Paperarchive credentials, building your first automation workflow, and exploring advanced use cases for document management automation.

Why Combine n8n with Paperarchive?

Paperarchive provides AI-powered document storage with automatic OCR, categorization, and full-text search. n8n adds the automation layer that connects Paperarchive to the rest of your digital ecosystem:

  • Email-to-Archive: Automatically extract PDF attachments from incoming emails and upload them to Paperarchive for instant processing and categorization.
  • Accounting Sync: When Paperarchive categorizes a document as an invoice, forward the extracted data (amount, date, sender) to your accounting tool like Lexoffice, sevDesk, or QuickBooks.
  • Cloud Storage Backup: Watch a Google Drive or Dropbox folder for new files and automatically archive them in Paperarchive with AI-powered metadata extraction.
  • Notification Pipelines: Get a Slack or email notification when specific types of documents are uploaded, such as contracts nearing expiry or tax-relevant invoices.
  • Batch Processing: Upload hundreds of documents from a folder, CSV file, or API endpoint in a single automated run.

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. Create one at Settings > API Keys. For automation workflows, recommended scopes are: documents:read, documents:write, search, spaces:read, categories:read, tags:read, senders:read.
  • An n8n instance - either self-hosted or n8n Cloud.

Step 1: Set Up n8n

If you do not have n8n running yet, here are the quickest ways to get started:

n8n Cloud (Fastest)

Sign up at n8n.io/cloud for a hosted instance with no setup required. A free trial is available.

Docker (Self-Hosted)

docker run -d --name n8n \
  -p 5678:5678 \
  -v n8n-data:/home/node/.n8n \
  n8nio/n8n

Open http://localhost:5678 to access the n8n editor.

npm (Self-Hosted)

npm install -g n8n
n8n start

Step 2: Add Paperarchive Credentials in n8n

In the n8n editor, you need to set up Paperarchive as a custom API credential so all your workflows can authenticate securely.

  1. Open the n8n editor and go to Settings > Credentials
  2. Click Add Credential and choose Header Auth
  3. Configure the credential:
    • Name: Paperarchive API
    • Header Name: Authorization
    • Header Value: Bearer pa_live_your_key_here
  4. Click Save

This credential will be available in all HTTP Request nodes throughout your workflows.

Step 3: Build Your First Workflow - Email to Archive

The most popular Paperarchive automation is the email-to-archive pipeline. Here is how to build it step by step:

Workflow Overview

This workflow watches your email inbox, detects messages with PDF attachments, uploads each attachment to Paperarchive, and sends you a confirmation notification.

Node 1: Email Trigger

Add an IMAP Email trigger node and configure it with your email credentials. Set it to check for new emails every few minutes. Enable Download Attachments to capture file data.

Node 2: Filter Attachments

Add an IF node to check if the email contains attachments. Set the condition to: {{ $json.attachments.length > 0 }}

Node 3: Upload to Paperarchive

Add an HTTP Request node with these settings:

Method: POST
URL: https://api.paperarchive.io/v1/documents
Authentication: Header Auth (select your Paperarchive API credential)
Content-Type: multipart/form-data
Body Parameters:
  - file: {{ $binary.attachment_0 }}
  - space_id: your-space-uuid (optional)

Node 4: Confirmation

Add a Slack, Email, or Telegram node to send yourself a notification:

"New document archived: {{ $json.data.name }} - Processing started."

Activate the workflow and every email with a PDF attachment will now flow directly into your Paperarchive account.

Step 4: Add Search and Retrieval Workflows

Beyond uploading, n8n can automate document searches and data retrieval from Paperarchive.

Webhook-Triggered Document Search

Build a workflow that exposes a webhook endpoint for searching your document archive:

// Webhook node receives:
POST https://your-n8n-instance.com/webhook/paperarchive-search
{
  "query": "electricity bill January 2026"
}

// HTTP Request node calls:
POST https://api.paperarchive.io/v1/search
Headers: Authorization: Bearer pa_live_your_key
Body: {
  "query": "electricity bill January 2026",
  "limit": 5
}

// Response is returned to the webhook caller

This turns your Paperarchive into an API-accessible search service that any other tool or automation can query.

Real-World Automation Recipes

Recipe 1: Invoice Processing Pipeline

Automatically process incoming invoices end-to-end:

  1. Trigger: Email arrives with an invoice attachment
  2. Upload: n8n sends the PDF to POST /v1/documents
  3. Wait: Delay 30 seconds for Paperarchive to finish OCR and AI analysis
  4. Retrieve: Fetch the processed document via GET /v1/documents/:id
  5. Extract: Parse the AI summary for invoice amount, date, and sender
  6. Sync: Send the extracted data to your accounting tool (Lexoffice, sevDesk, Xero)
  7. Notify: Post a summary to your Slack channel
// After document processing completes, the response includes:
{
  "data": {
    "title": "Invoice #2026-0142",
    "ai_summary": "Invoice for web hosting services, EUR 29.99, due April 1, 2026",
    "ocr_text": "Invoice #2026-0142\nDate: March 7, 2026\n...",
    "category_id": "invoices-category-uuid"
  }
}

Recipe 2: Google Drive to Paperarchive Sync

Automatically archive files dropped into a Google Drive folder:

  1. Trigger: Google Drive trigger watches a "To Archive" folder
  2. Download: Download the new file from Google Drive
  3. Upload: Send the file to Paperarchive via the API
  4. Move: Move the original file to an "Archived" folder in Google Drive
  5. Log: Add a row to a Google Sheet with the document ID and timestamp

This creates a seamless drop-and-forget workflow: put files in a folder on your phone or desktop, and they are automatically processed and archived.

Recipe 3: Weekly Document Digest

Get a weekly summary of all new documents in your archive:

  1. Trigger: Cron node fires every Monday at 9 AM
  2. Fetch: Call GET /v1/documents?sort_by=created_at&sort_order=desc&limit=50
  3. Filter: Filter for documents created in the last 7 days
  4. Group: Group documents by category
  5. Format: Build a formatted HTML email with document counts per category
  6. Send: Email the digest to yourself

Recipe 4: Scan Folder Watcher

If you use a network scanner (e.g. Brother, Fujitsu ScanSnap), set up a workflow that watches the scan output folder and uploads new files:

  1. Trigger: Local File trigger watches /scans/ folder
  2. Upload: Send each new PDF to POST /v1/documents
  3. Archive: Move the scanned file to a /processed/ folder

Combined with Paperarchive's automatic AI categorization, this creates a fully hands-free scanning-to-archive pipeline.

Recipe 5: Document Expiry Alerts

Monitor for contracts or documents that are about to expire:

  1. Trigger: Daily cron at 8 AM
  2. Search: Call POST /v1/search with query "contract" or "expires"
  3. Retrieve: Get full document details and check document_date
  4. Filter: Find documents expiring within the next 30 days
  5. Alert: Send a notification via email, Slack, or push notification

Working with the Paperarchive API in n8n

HTTP Request Node Configuration

All Paperarchive API calls use the HTTP Request node with these common settings:

SettingValue
Base URLhttps://api.paperarchive.io/v1
AuthenticationHeader Auth (Paperarchive API credential)
Content-Type (JSON)application/json
Content-Type (Upload)multipart/form-data

Handling Pagination

When listing documents, use pagination to process large archives:

// First request
GET /v1/documents?limit=50&offset=0

// Use the 'total' field from the response to loop
// Next request
GET /v1/documents?limit=50&offset=50

// Continue until offset >= total

In n8n, use a Loop Over Items node or SplitInBatches node to process paginated results.

Waiting for Document Processing

After uploading a document, Paperarchive processes it asynchronously (OCR, AI analysis). If your workflow needs the processed data, add a Wait node (15-60 seconds depending on document complexity) before retrieving the document details:

1. POST /v1/documents       → Upload, get document ID
2. Wait 30 seconds           → Allow processing to complete
3. GET /v1/documents/:id    → Retrieve with OCR text and AI summary

Error Handling

Use n8n's built-in error handling to manage API failures gracefully:

  • Add an Error Trigger node to catch workflow failures and send alerts
  • Use IF nodes to check for success: false in API responses
  • Implement retry logic for 429 Too Many Requests errors with a Wait node
  • Log errors to a Google Sheet or database for debugging

Scaling Your Automation

Rate Limiting

The Paperarchive API allows 100 requests per minute and 1,000 per hour per API key. When processing large batches:

  • Use n8n's SplitInBatches node to process 10 documents at a time
  • Add a Wait node (1-2 seconds) between batches
  • Monitor the X-RateLimit-Remaining header in responses

Multiple Workflows

Create separate workflows for different automation tasks rather than one monolithic workflow. This makes debugging easier and allows you to activate/deactivate individual automations.

Credential Management

For production setups, create separate Paperarchive API keys for each workflow so you can revoke access to specific automations without affecting others.

Security Considerations

  • Use minimum scopes: Create API keys with only the scopes each workflow needs. A read-only reporting workflow should not have documents:write access.
  • Restrict spaces: If a workflow only processes documents in a specific space, restrict the API key to that space.
  • Secure your n8n instance: Use HTTPS, strong passwords, and restrict network access to your n8n editor.
  • Rotate API keys: Periodically rotate Paperarchive API keys used in automated workflows.
  • Audit workflows: Regularly review active workflows to ensure they are still needed and functioning correctly.

Troubleshooting

IssueSolution
HTTP Request returns 401Verify your Header Auth credential has the correct API key with the Bearer prefix (note the space).
File upload fails with 400Ensure you are sending as multipart/form-data with the file in a field named file. Supported formats: PDF, JPEG, PNG, TIFF.
Document has no OCR text after uploadProcessing is asynchronous. Add a Wait node (30+ seconds) before retrieving the document details.
Rate limit errors (429)Add delays between requests using Wait nodes. Use SplitInBatches for bulk operations.
Workflow does not triggerCheck that the workflow is activated (toggle in the top right). For email triggers, verify IMAP credentials and polling interval.
Binary data issuesWhen downloading files from other services, use the {{ $binary }} expression to reference binary data in the HTTP Request body.

Frequently Asked Questions

Is n8n free to use?

n8n is open-source and free to self-host. n8n Cloud offers paid hosted plans with a free trial. Both options work with the Paperarchive API.

Do I need coding skills to use n8n with Paperarchive?

No. n8n's visual editor lets you build complete automation workflows by connecting nodes and configuring settings - no code required. For advanced use cases, you can add JavaScript expressions and code nodes.

How many documents can I process automatically?

There is no hard limit on the n8n side. Paperarchive's API rate limit of 100 requests per minute means you can upload roughly 100 documents per minute. For large batch imports, use pagination and delays to stay within limits.

Can I trigger n8n workflows from Paperarchive?

Yes. Create a webhook-triggered workflow in n8n and call that webhook URL from any system that supports outbound HTTP requests. This enables bi-directional integration.

Which n8n version do I need?

Any current version of n8n (1.x or later) supports HTTP Request nodes with Header Auth, which is all you need for the Paperarchive integration. No custom n8n nodes are required.

Can I use this with n8n Cloud?

Absolutely. The Paperarchive API is a public REST API accessible from any n8n instance, whether self-hosted or cloud-based.

Next Steps