Use “Search your documents” in Recued. Search every PDF in a folder for a term and record which documents matched, with the page and the matching line. Each file is first checked as readable, so a document that could not be opened is reported as unreadable rather than counted as a miss.
Search your documents
Use “Search your documents” in Recued. Search every PDF in a folder for a term and record which documents matched, with the page and the matching line. Each file is first checked as readable, so a document that could not be opened is reported as unreadable rather than counted as a miss.
Complete workflow
Use Document Search in Recued for PDF, retrieval, pdfgrep, and records. It includes 11 built-in actions and 3 ready-to-run workflows. Actions that change data use Recued's approval controls.
You are viewing one recipe in this workflow. Installing it opens the complete pack so its other recipes and background automations arrive together.
Use “Show past document searches” in Recued. List search runs with their counts, including how many documents could not be opened. Read-only — it re-reads no file and re-runs no search.
Use “Show what a search found” in Recued. List the documents one search run matched, with the page and the matching line, alongside the documents that could not be opened. Read-only.
Use “Records runtime” in Recued. It helps you complete this workflow using the connections and settings you choose.
Why a match is read from the OUTPUT, not the exit status
⛔⛔ item.ok does NOT mean "matched". pdfgrep follows grep — a match exits 0, no match exits 1, an unreadable file exits 2 — and the pdfgrep pack declares exit_code_handling: { success_codes: [0, 1] }, so it deliberately treats no match as a SUCCESS. A step that found nothing therefore comes back ok: true with empty stdout. Keying matched on ok marks every readable document as a hit; that was a real defect here, caught only by driving the pack live against real PDFs.
So a match is excerpt is_not_empty, and readability is a separate pdfinfo probe (exit 0 readable, 1 corrupt — verified live). The two together give three outcomes:
| pdfinfo | pdfgrep stdout | recorded as |
|---|---|---|
| :-- | :-- | :-- |
| ok | non-empty | matched — with the page and line |
| ok | empty | no match — a real, trustworthy negative |
| non-zero | — | unreadable — never counted as a miss |
⚠ A search is only as trustworthy as its unreadable count. If that number is above zero, the answer "nothing mentions this" is not yet true — those files were never actually searched. The card reports it separately and the board shows it per run for exactly that reason.
How the search runs
⚠ The foreach is what makes this safe. A foreach step collects per-item failures as {ok:false} and still returns normally, so one unreadable file among two hundred cannot end the run. A non-foreach search step would have died on the first document that did not match.
⚠ Matching is case-insensitive and treats the term as a REGULAR EXPRESSION. pdfgrep -i is used, so renew finds Renewal; but . matches any character and ( will error. To search for a literal phrase with punctuation, this is not the recipe — the fixed-string operation exists in the pdfgrep pack but is not wired here.
⚠ Results are capped: at most Max files documents are searched per run, and pdfgrep itself stops at 50 matching lines per document. Anything beyond the cap is reported on the card as skipped, never silently dropped.
⚠ Only the matching line is stored, not the document. The excerpt is what pdfgrep printed — a page number and one line.
How it works
Inspect the data fetches, transforms, gates, and output this recipe runs.
Settings
Configurable at install. Defaults shown — change them anytime in Recued.
term
setting
=
[object Object]
folder
setting
=
[object Object]
max depth
setting
=
1
max files
setting
=
50