A patient arrives for their first appointment and leaves with a folder of photocopied sheets. Two weeks later, they haven't read half of them. Three weeks later, they're back in clinic with questions that were already answered in document seven, page two. Sound familiar? This cycle repeats thousands of times weekly across clinical practices worldwide, and it costs real money: missed medication instructions, poor surgical preparation, delayed recovery, and preventable complications. The problem isn't that patients don't want to learn. It's that dense PDFs and printed handouts are terrible teachers. People retain information better when it's presented as video, narrated in a calm voice, and customised to their specific condition and reading level. Yet most clinics treat patient education as a box-ticking exercise, not a strategic tool for improving outcomes. Here's the friction: creating personalised video content for hundreds of patients annually requires production teams, scriptwriters, and budgets most clinics don't have. That's where automation changes things. By connecting patient intake data, AI video generation, and voice synthesis, you can produce tailored educational videos in minutes instead of weeks. No studio. No editing software. No manual handoff between systems. For more on this, see Product photography studio with AI model training and mar.... For more on this, see Healthcare patient education video creation from clinical....
The Automated Workflow
This workflow transforms a completed patient intake form into a personalised video guide. The patient receives a link to their video within hours, not days. The flow works like this: 1. Patient completes a web form (name, condition, medical history, reading level preference).
-
Form submission triggers an n8n workflow via webhook.
-
Claude Opus 4.6 analyses the intake data and generates a personalised script (considering the patient's condition, medication list, and comprehension level).
-
The script is sent to ElevenLabs Turbo v2.5 for voice synthesis (customisable accent, pacing, and tone).
-
The audio file is fed into HeyGen, which pairs it with an animated avatar and produces a finished video.
-
The video is stored in cloud storage and a download link is sent back to the patient via email. Why n8n instead of Zapier or Make? n8n handles webhook authentication cleanly, lets you write custom JavaScript for logic, and doesn't charge per task if you self-host. For healthcare data, self-hosting reduces compliance friction. Setting up the webhook:
POST /webhook/patient-intake
Content-Type: application/json { "patient_name": "Sarah Chen", "condition": "total_knee_replacement", "medications": ["paracetamol", "ibuprofen"], "age": 62, "reading_level": "intermediate", "email": "sarah@example.com", "clinic_id": "clinic_001"
}
Step 1: Webhook Trigger in n8n
Your clinic's web form (built in Typeform, Gravity Forms, or custom HTML) POSTs to your n8n instance. The webhook node receives the JSON payload and passes it to the next step.
Step 2: Generate Personalised Script
Use a Claude node to prompt-engineer the script. Here's a sample prompt:
You are writing a patient education script for a pre-surgery consultation video. Patient Details:
- Name: {patient_name}
- Procedure: {condition}
- Current Medications: {medications}
- Age: {age}
- Reading Level Preference: {reading_level} (choose: simple, intermediate, advanced) Generate a script (300-400 words) that:
1. Acknowledges the patient by name
2. Explains the procedure in language appropriate for their reading level
3. Lists specific pre-op instructions
4. Mentions their existing medications and any interactions to discuss with the surgeon
5. Ends with reassurance and next steps Format as plain text. Do NOT include stage directions or asterisks.
Claude Opus 4.6 is the right choice here; it understands medical context better than smaller models, and hallucination rates on factual procedure steps are lower.
Step 3: Generate Audio
Once you have the script, send it to ElevenLabs:
POST https://api.elevenlabs.io/v1/text-to-speech/{voice_id}
Authorization: Bearer YOUR_ELEVENLABS_API_KEY
Content-Type: application/json { "text": "{script_from_claude}", "model_id": "eleven_turbo_v2_5", "voice_settings": { "stability": 0.5, "similarity_boost": 0.75 }
}
Store the returned audio file (MP3, typically 2-3 MB) in AWS S3 or a secure clinic server. Don't leave audio files lying around; use signed URLs with 7-day expiration.
Step 4: Video Generation
HeyGen's API takes the audio file and creates a video with a talking avatar. This is where the experience shifts from "automated PDF" to "genuine education":
POST https://api.heygen.com/v1/video.generate
Authorization: Bearer YOUR_HEYGEN_API_KEY
Content-Type: application/json { "video_inputs": [ { "character": { "type": "avatar", "avatar_id": "emily_casual", "voice": { "type": "audio", "audio_url": "https://your-s3-bucket.s3.amazonaws.com/audio/{patient_id}.mp3" } }, "duration": 300 } ], "output_format": "mp4"
}
HeyGen processes this asynchronously. Expect 5-15 minutes for a 5-minute video. Set up a webhook to receive the callback when the video is ready.
Step 5: Delivery
Once HeyGen returns the video URL, use an email node in n8n to send the patient a personalised message:
Subject: Your personalised pre-surgery guide is ready Hi {patient_name}, Your video guide for {condition} is now ready to watch. You can view it here: {video_url} We recommend watching it twice and noting any questions for your pre-op consultation on {appointment_date}. Best regards,
{clinic_name}
Store the video URL in your patient management system (with clinic_id and patient_id as keys) for future reference, audits, and compliance records.
Error Handling:
Claude occasionally generates scripts that are too long. Cap the script at 450 words before sending to ElevenLabs. If HeyGen times out (rare, but it happens), log the failure to a Slack channel and trigger a manual review step. Never let a failed automation silently drop a patient.
The Manual Alternative
If you prefer not to automate the entire pipeline, you can stop at script generation. Generate scripts using Claude Opus 4.6 in bulk (50 scripts per day costs ~£0.30), then hand off to your marketing team or a freelance videographer to produce videos in batches. This trades speed for creative control; you get fewer videos per week but they're polished and branded. Alternatively, record videos yourself using Sora or Runway Gen-3 Alpha (uploading the script as a prompt), though quality consistency is harder to maintain without a trained avatar.
Pro Tips
1. Start with a small subset of procedures.
Don't automate scripts for all 200+ conditions in your clinic on day one. Pick three high-volume procedures (knee replacement, cataract surgery, colonoscopy) and refine the workflow. Once it's solid, scale.
2. Monitor ElevenLabs usage closely.
The Turbo model is fast but costs mount at scale. At 5,000 patient videos per month (a medium-sized clinic), you'll exceed the standard plan. Negotiate volume pricing with ElevenLabs support, or batch-process during off-peak hours if using the API directly.
3. Version your scripts.
Store every Claude-generated script in a database alongside the patient ID and video ID. You'll want to audit these later for accuracy, and having a record makes it trivial to regenerate videos if a script was incorrect.
4. Use Freed AI for context enrichment.
If your clinic uses Freed (a HIPAA-compliant AI scribe), you can pull clinical notes directly into your intake process. A patient's actual appointment notes give Claude far richer context than a self-reported form, leading to more clinically precise scripts.
5. Set expiring URLs for video links.
Don't send permanent links. Use AWS S3 pre-signed URLs (7-day expiration) or HeyGen's built-in access controls. This prevents videos from lingering on unsecured patient emails or being shared outside your clinic.
Cost Breakdown
| Tool | Plan Needed | Monthly Cost | Notes |
|---|---|---|---|
| n8n | Self-hosted (open source) | £0 | Running on a £3-5/month VPS; no per-task charges |
| Claude Opus 4.6 | Pay-as-you-go API | £15-40 | 300-400 word scripts cost ~£0.03 each; budget for 1,000 scripts/month = £30 |
| ElevenLabs Turbo v2.5 | Professional plan | £99 | Includes 500k characters/month; overages at £0.30/10k chars. For 5,000 videos, expect £150-200/month |
| HeyGen | Creator plan | £119 | 120 minutes of video generation/month; overages at ~£0.50/min. Typical 5-minute videos: £25/month for 100 videos |
| AWS S3 (video storage) | Standard | £5-15 | Depends on storage duration and access patterns; assume 500 GB of videos at 1 GB each = ~£11/month |
| Total | £240-280 | Per 500-1,000 patient videos/month |