Skip to content

File scans in Paperless

Send PDFs and photographed letters from Avenvail to Paperless-ngx, titled and tagged, and keep a link to each document on the file.

Scanning a letter with your phone and uploading it to Avenvail is quick; getting it into your document archive is another chore. This guide builds a library workflow that sends every PDF uploaded to a Scans folder to Paperless-ngx, titled after the file and tagged inbox, and saves the document's Paperless link on the file.

  1. File uploaded (trigger)PDF, JPEG, PNG in Scans
  2. Send to PaperlessTagged inbox

What you'll build

Uploading water-bill-november.pdf to Scans creates a Paperless document titled water-bill-november, tagged inbox. Paperless runs its own OCR and matching on it as usual. Back in Avenvail, the file's Paperless field links to the document, such as https://paperless.example.com/documents/128/details.

Before you start

DifficultyBeginner
TimeAbout 10 minutes
Workflow kindLibrary workflow
ConnectionsA Paperless-ngx connection
Folders, tags, fieldsA Scans folder, and a Link field called Paperless
Sample fileAny PDF or photo of a document

Build it

Connect Paperless

  1. In Paperless, open your profile at the top right and copy the API Auth Token (create one if there isn't one).
  2. In Avenvail, open Automations › Connections, click Add connection and choose Paperless-ngx under Photo and document libraries.
  3. Set Address to where you open Paperless, such as https://paperless.example.com, and API token to the token. Click Test connection, then Add connection.

Create the field and folder

In Settings › Fields, create a field called Paperless with the type Link. In Files, create a folder called Scans.

Create the workflow

  1. Open Automations, click New workflow and choose Library workflow. Name it File scans in Paperless.
  2. Choose the File uploaded trigger, with File types application/pdf, image/jpeg and image/png, and Folder Scans.
  3. Add Send to Paperless after it, and set:
    • Connection: your Paperless connection.
    • Title: a template, {{ subject.name }}. Paperless keeps the extension out of titles it makes itself, so you may prefer to leave this empty.
    • Tags: inbox.
    • Save the link in a field (under When it's filed): Paperless.
  4. Click Publish.

Test it

Click Test, choose a PDF, and turn on Allow outside changes and Allow sending content to outside services. The test really files the document. The step shows Status added and the document's Link. Testing the same file again usually shows duplicate: Paperless normally refuses a file it already has, and the step then returns the existing document.

Turn it on

Turn the workflow on with the switch in the editor's header. Every PDF or image uploaded to Scans from then on goes to Paperless.

What to expect

  • The step waits for Paperless to finish, usually a few seconds to a minute depending on its OCR. After two minutes it stops waiting and succeeds with Status queued and no link; the document still appears in Paperless when it's done.
  • If the inbox tag doesn't exist in Paperless, the step creates it, with matching turned off.
  • The file stays in Avenvail. To keep only the Paperless copy, add Move to trash after the step.

Troubleshooting

ProblemFix
This address doesn't look like Paperless-ngxUse the address you open in the browser, without /api.
Paperless refused the API tokenCopy the token again from your Paperless profile.
paperless_consume_failedPaperless couldn't read the file. Its reason follows the error, such as an unsupported file type.
The step ends queued every timePaperless's task queue is busy or stopped. Check its logs.

Make it your own

Read the details first

Add Load content and AI extract before the step to read the sender and date, and set Correspondent and Date from them. Extract and organize receipts does this for receipts.

Send by type

Put a Switch on Current file › Category: PDFs to Paperless, images to WebDAV with Copy to WebDAV, everything else left in Avenvail.

Privacy, cost and reliability

  • Files go only to your Paperless server, as the user whose token you gave. Delete the token in Paperless to cut Avenvail off.
  • Sending a document again could file it twice, so when Avenvail can't tell whether an upload reached Paperless, the run stops at Needs attention and asks you before trying again.