# Generate HIPAA-safe patient-friendly EMR summaries with OpenAI: n8n workflow

> Runs on demand, and works across Email, Google Drive, Postgres and Twilio. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/generate-hipaa-safe-patient-friendly-emr-summaries-with-open (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Research and reporting](https://millionrounds.com/workflows?category=Research+and+reporting#library)

# Generate HIPAA-safe patient-friendly EMR summaries with OpenAI

Runs on demand, and works across Email, Google Drive, Postgres and Twilio. It hands the judgement calls to OpenAI. 16 steps, 2 branches: a working afternoon to understand properly.

Medium Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgenerate-hipaa-safe-patient-friendly-emr-summaries-with-open)

**16 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Model 2 Logic 7 Service 7

The steps in the order they run, from what starts it.

- 1 **HTTP: EMR PDF Intake** Http Request *Service*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **Split PDF** Htmlcsstopdf *Service*
- 4 **AI Agent** Agent *Model*
- 5 **Code: Clinical Classifier** Code *Logic*
- 6 **Code: Anomaly Detector** Code *Logic*
- 7 **Switch: Redaction Path** Switch *Logic*
- 8 **Merge: Combine Processed Pages** Merge *Logic*
- 9 **Code: HIPAA Redactor** Code *Logic*
- 10 **Merge multiple PDFS into one** Htmlcsstopdf *Service*
- 11 **IF: Compliance Validator** If *Logic*
- 12 **Postgres: Audit Trail** Postgres *Service*
- 13 **Google Drive: Secure Storage** Google Drive *Service*
- 14 **Email: Provider Alert (Urgent)** Email Send *Service*
- 15 **Stop and Error: Failed Validation** Stop And Error *Logic*
- 16 **Twilio: Patient Alert** Twilio *Service*

## How it's built

- **Starts on:** Nothing automatic; you run it
- **Steps:** 16, with 2 branches
- **Size:** Medium: a working afternoon
- **Connects to:** Email, Google Drive, Postgres, Twilio
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Email, Google Drive, Postgres and Twilio accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

Nothing starts it automatically. You run it by hand.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 16 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 16 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgenerate-hipaa-safe-patient-friendly-emr-summaries-with-open)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Email](https://millionrounds.com/workflows?service=Email#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Twilio](https://millionrounds.com/workflows?service=Twilio#library)

## Workflows like it

Also research and reporting, with the same services where possible, closest in size first.

- [**Analyze incoming letters with Google Drive and OpenAI** 16 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/analysiere-eingehende-briefe-mit-google-drive-openai)
- [**Automated finance tracker with Gmail and Google Sheets** 16 steps · calls a model · Email, Gmail](https://millionrounds.com/workflow/automated-finance-tracker-with-gmail-and-google-sheets)
- [**Scrape & analyse Meta Ad Library image ads with Apify** 16 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/scrape-and-analyse-meta-ad-library-image-ads-with-apify)
- [**Clone & customize competitor Facebook ads with Gemini** 16 steps · Apify, Google Drive](https://millionrounds.com/workflow/clone-and-customize-competitor-facebook-ads-with-gemini)
- [**Email reports on expiring Microsoft Entra ID app secrets** 16 steps · Email](https://millionrounds.com/workflow/email-reports-on-expiring-microsoft-entra-id-app-secrets)
- [**AI-powered RAG workflow for stock earnings report analysis** 15 steps · calls a model · Google Docs, Google Drive](https://millionrounds.com/workflow/ai-powered-rag-workflow-for-stock-earnings-report-analysis)
