Medical Records Request & Receiving Automation for a Personal Injury Law Firm

Client: Personal injury law firm

A pair of n8n workflows handles a medical-records request end to end: one locates the client's HIPAA authorization form, fills it, and sends it to the provider by fax and email after a human review step; the other watches the records inbox for the provider's reply, OCRs and AI-classifies every attachment, files it correctly in Google Drive, and notifies the case manager and client automatically.

The problem

Requesting medical records and billing ledgers from providers is one of the most repetitive parts of building a personal injury case, and one of the easiest to get wrong on both ends: the wrong form sent to the wrong contact is a lost week, and a provider's reply landing back in a shared inbox (often weeks later, in an email thread with no obvious link to the original request) is just as easy to lose track of. Because both directions carry regulated health information, neither side could be automated without a human checkpoint and a clear audit trail.

The system

The system is two companion n8n workflows, request and receipt.

On the request side: an inbound webhook carrying a provider record triggers a pull of the full Clio matter and client records, then the workflow navigates four nested levels of the firm's Google Drive (client folder, matter subfolder, Medical Records folder, HIPAA authorization file), with an immediate Telegram alert if any level is missing. The located HIPAA template is downloaded and five differently-calibrated variants are filled in parallel using pdf-lib, since checkbox placement differs slightly across the firm's form revisions. Rather than guess which layout is correct, the workflow pauses and presents all five filled versions to a human reviewer through the firm's portal; only after a version is picked does it continue. The approved form is then faxed and emailed to the provider with explicit reply instructions, the provider record is marked Waiting, and an audit-log entry records exactly who was contacted and when.

On the receiving side: a second workflow polls the records inbox every minute, filtering out routine fax-delivery notification emails so only genuine provider replies proceed. The first attachment is OCR'd via AWS Textract and passed to a Claude (AWS Bedrock) agent that extracts the provider name, patient name, document type, and date as structured JSON. Then the sender's email domain is matched against the open NocoDB requests to link the reply back to the correct outstanding case, prioritizing the oldest still-Waiting match if more than one exists. Every attachment in the email then gets its own OCR-and-classify pass (Medical Records vs. Ledger) plus an AI-generated plain-text summary, is filed into the right provider subfolder in Drive under a standardized name, and all summaries are combined into one record. The NocoDB request is marked Received with that summary, the provider slot resets for the next cycle, the case manager gets an email with direct links to the Drive folder and the request record, the source email is archived, the team gets a Telegram alert, and the client is texted a plain-language confirmation that their records arrived.

The workflow

Explore the actual workflow (drag to pan, scroll to zoom)

Loading workflow…

MedRec_Receiver: provider response intake

The companion workflow: watches the records inbox, OCRs and AI-classifies every provider reply, matches it to the right open request, files it in Drive, and notifies the case manager and client

Explore the actual workflow (drag to pan, scroll to zoom)

Loading workflow…

Results

  • Every request is provider-matched, form-filled, and delivered without anyone re-typing case details by hand
  • A human reviews and selects the correct HIPAA form variant before anything is sent; no filled form ever goes out unreviewed
  • Missing Drive folders or files raise an immediate Telegram alert instead of a silent failure discovered days later
  • Provider replies are matched back to the correct open request automatically by sender domain, so nobody has to remember which case an email belongs to
  • Every attachment is OCR'd, AI-classified, summarized, and filed under a standardized name with zero manual data entry
  • The client gets a same-day text confirmation the moment their records are received, before a human ever touches the file
  • Every request has a clear who/what/when audit trail on both ends, so nothing depends on someone remembering what was already asked for or received

Stack: n8n, Google Drive, Clio, NocoDB, Gmail, AWS Textract, AWS Bedrock (Claude), Telegram

Need something like this?

This system was built as part of my n8n automation services work.

Get in touch