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.
- File uploaded (trigger)PDF, JPEG, PNG in Scans
- 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
| Difficulty | Beginner |
| Time | About 10 minutes |
| Workflow kind | Library workflow |
| Connections | A Paperless-ngx connection |
| Folders, tags, fields | A Scans folder, and a Link field called Paperless |
| Sample file | Any PDF or photo of a document |
Build it
Connect Paperless
- In Paperless, open your profile at the top right and copy the API Auth Token (create one if there isn't one).
- In Avenvail, open Automations › Connections, click Add connection and choose Paperless-ngx under Photo and document libraries.
- 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
- Open Automations, click New workflow and choose Library workflow. Name it File scans in Paperless.
- Choose the File uploaded trigger, with File types
application/pdf,image/jpegandimage/png, and Folder Scans. - 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.
- 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
queuedand 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
| Problem | Fix |
|---|---|
| This address doesn't look like Paperless-ngx | Use the address you open in the browser, without /api. |
| Paperless refused the API token | Copy the token again from your Paperless profile. |
paperless_consume_failed | Paperless couldn't read the file. Its reason follows the error, such as an unsupported file type. |
The step ends queued every time | Paperless'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.