Make screenshots searchable
Read the text in every new screenshot with local OCR and store it, so search finds screenshots by what they say.
A screenshot's name rarely says what's in it, and search can't look inside an image. This guide sets up a library workflow that reads the text in each new image with Avenvail OCR and keeps it as an OCR text attachment. Searching Files for OrderList, ridge or croissant then finds the screenshot that shows it. Everything runs on your own server, with no AI model.
- File uploaded (trigger)PNG, JPEG, WebP, GIF and BMP
- Load content
- Extract textAutomatic
- Next
- Add attachmentOCR text
- No text foundNothing runs
- Next
What you'll build
For screenshot-build-error.png, the file gets an attachment called OCR text:
Terminal — npm run build
$ npm run build
> web@2.4.0 build
> vite build
vite v6.2.0 building for production...
vy 312 modules transformed.
error during build:
TypeError: Cannot read properties of undefined (reading 'map')
at renderList (src/components/OrderList.tsx:42:18)
at buildRoutes (src/router.ts:88:7)
npm ERR! code 1
npm ERR! command failed
Searching Files for orderlist then lists the screenshot, with OCR text: and the words around the match.
Everything here is verified, including the misread vy where the image shows a check mark: OCR reads characters, not meaning, and icons sometimes come out as letters. Search still works, because it matches the words that were read correctly.
Before you start
| Difficulty | Beginner |
| Time | About 10 minutes once the worker runs |
| Workflow kind | Library workflow |
| Connections | A Avenvail OCR connection |
| Models | None |
| Folders, tags, fields | None |
| Sample files | screenshot-build-error.png, screenshot-chat.png, screenshot-product-page.png |
| Who | Whoever runs the server, to start the OCR worker |
Build it
Start the OCR worker and connect it
Follow Set up Avenvail OCR: add an API key and the allowed host to .env, run docker compose --profile ocr up -d, then in Automations › Connections choose Add connection › Text recognition › Avenvail OCR, paste the key and click Test.
Add the template
Open Automations › Workflows, click New workflow, then From a template, and pick Make images searchable. Under OCR connection, choose the connection you just made, then click Add workflow. The editor opens on a draft with three steps:
- Load content reads the saved image without changing it.
- Extract text reads its text. Image is Load content › Content.
- Add attachment stores the text: Name
OCR text, Content Extract text › Text, Kind Text.
Add attachment hangs off Extract text's Next path. No text found is left empty, so an image without text ends its run there, successfully, with no attachment.
Pick a preset
Select Extract text. Its Preset decides how the image is prepared:
| Preset | Use it for |
|---|---|
| Automatic | Screenshots of apps, websites, chats and terminals. Keep this unless text is missed. |
| Screenshot | Mostly small interface text, or dark mode that reads poorly. |
| Document | Receipts and forms, where an amount should stay on the line with its label. |
| Sparse text | Photos and busy images with scattered words. |
Leave Language on Connection default unless your screenshots are in another language the worker has. See Presets and Languages and formats.
Test it
- Upload screenshot-build-error.png with the workflow inactive.
- Click Test, choose it, and turn on Allow sending content to outside services. Extract text counts as an outside service because the worker is one, even on your own server. The image still only goes to your worker.
- Click Start test, then select Extract text. Preview shows the first 500 characters it read, and Confidence how sure Tesseract was.
Turn it on
Click Publish, then turn on Active. Upload a screenshot; a moment after the upload finishes, its details list an OCR text attachment. Uploads never wait for OCR.
To read screenshots you already have, add the template a second time, change its trigger to Run manually, and publish it. In Files, select up to 100 images and choose More actions › Run automation. Images that already have an OCR text attachment get theirs replaced.
What to expect
Verified runs with the Automatic preset:
| Sample | Path | Read in | Confidence | Search finds it by |
|---|---|---|---|---|
screenshot-build-error.png, 1600 × 900 | Next | 0.4 s | 0.93 | orderlist, typeerror |
screenshot-chat.png, 1200 × 800 | Next | 1.7 s | 0.95 | ridge, trailhead |
screenshot-product-page.png, 1600 × 1000 | Next | 0.3 s | 0.93 | daypack, northwind |
| A gradient with no text, 800 × 600 | No text found | Nothing: no attachment is added |
The times come from a worker on a 4-core machine. The first image after the worker starts takes longer.
Troubleshooting
| Problem | Cause and fix |
|---|---|
connection_unreachable | Avenvail can't reach the worker. Check it runs with docker compose --profile ocr ps, and that the connection's address is http://avenvail-ocr:8080 in Compose. |
outbound_blocked | The worker's host isn't allowed. Add Avenvail__Outbound__AllowedHosts__0=avenvail-ocr to .env and restart Avenvail. See Set up Avenvail OCR. |
connection_auth_failed | The connection's API key doesn't match the worker's OCR_TOKEN. |
ocr_busy | Many uploads at once. The step retries; raise OCR_CONCURRENCY if the machine has cores to spare. |
ocr_timeout on very large images | Choose a preset that enlarges less, set Scale to 1 under Advanced, or raise OCR_TIMEOUT_SECONDS. |
| Words come out wrong, or icons as letters | Expected now and then. Try Screenshot, or for light text on dark, set Invert colors to On under Advanced. |
| Search doesn't find a word you can see | Check the attachment's text in the file's details. Search matches whole words, so a word OCR split or misread won't match. |
| Every run takes No text found | The images have no text Tesseract can read, or are in a language the worker lacks. See Adding languages. |
Make it your own
Only some folders
Set the trigger's Folder, such as Screenshots, so photos elsewhere aren't read.
Tag screenshots that contain errors
After Add attachment, add a Condition with Extract text › Preview contains Error, and Add tags with errors on True. Preview holds only the first 500 characters, which is usually enough for a screenshot.
Hand the text to AI
AI classify, AI summarize and AI generate text take Extract text › Text as their Text, so a text-only model can sort or name screenshots by what they say, without the image leaving your server. Name screenshots with AI and Build a self-organizing screenshot library work this way if you replace their image input with a text input.
Receipts
Receipts read better with Document. Extract and organize receipts shows how to read them with OCR before AI extract.
Privacy, cost and reliability
- Images go only to the worker at the connection's address. It keeps nothing, needs no internet access, and never logs images or text. See Privacy.
- There's no per-image cost. Tesseract uses the server's processor, about a second per screenshot.
- When the worker is stopped, Extract text fails after its retries and the run fails; the file itself is untouched. Set If this step fails to Continue to let other steps after it run anyway.
- OCR text is stored with the file and found by search, but never shown on share pages. Run history shows the text only to you.