Introduction
Medical device companies live in a world of perpetual documentation. A technical specification document arrives, and suddenly you need regulatory documentation in multiple formats: design control files, risk assessments, traceability matrices, and submission-ready PDFs. Each format has its own structure, its own compliance requirements, and its own potential for human error.
The traditional workflow involves someone reading the technical specification, manually extracting key information, then writing or reformatting that information across multiple documents. This takes days, introduces inconsistencies, and creates bottlenecks before you even get to regulatory review. If the spec changes, you start over.
What if you could extract structured data from your technical specification PDF, automatically generate regulatory documentation in the correct format, and have it all ready for review in hours rather than days? This workflow combines three AI tools with an orchestration layer to do exactly that, with zero manual handoffs between steps.
The Automated Workflow
This workflow uses three primary tools working in sequence: Chat-with-PDF-by-Copilotus to extract information from your technical specification, Mintlify to generate structured documentation templates, and Wordsmith-AI to refine and format the output for regulatory submission. We'll connect them using n8n, which gives you fine-grained control over data transformation and error handling.
Architecture Overview
The workflow operates in three stages:
-
Extraction - Chat-with-PDF-by-Copilotus reads your technical specification and extracts structured data about device functionality, safety features, materials, and performance characteristics.
-
Template Generation - Mintlify creates the regulatory documentation skeleton with proper sections, headings, and formatting requirements specific to medical device submissions.
-
Content Refinement - Wordsmith-AI polishes the extracted information, ensures compliance language is correct, and fills in regulatory boilerplate.
The entire process is orchestrated through n8n, which manages the file passing, handles errors, and provides a visual map of your workflow.
Setting Up n8n
Start by creating a new workflow in n8n. You'll need API keys for each service. Store these as environment variables in your n8n instance rather than hardcoding them.
In n8n Settings > Environment Variables:
COPILOTUS_API_KEY = your_copilotus_key
MINTLIFY_API_KEY = your_mintlify_key
WORDSMITH_API_KEY = your_wordsmith_key
Create a new workflow and add your first node: an HTTP Request node configured as a webhook trigger. This allows you to POST your technical specification PDF and metadata to start the automation.
Webhook Node Configuration:
- HTTP Method: POST
- Path: /medical-device-workflow
- Authentication: None (or add custom header authentication)
- Response Mode: On Execution Finish
This webhook will receive JSON containing the path to your PDF file and metadata about the device.
Step 1:
PDF Extraction with Chat-with-PDF-by-Copilotus
After the webhook trigger, add an HTTP Request node to call the Copilotus API. You're sending the PDF file and a detailed prompt asking for structured extraction of regulatory-relevant information.
POST https://api.copilotus.com/v1/process-pdf
Content-Type: application/json
Authorization: Bearer COPILOTUS_API_KEY
{
"file_url": "{{ $node.Webhook.json.pdf_url }}",
"prompt": "Extract the following information from this medical device technical specification in JSON format: device_name, intended_use, predicate_devices (if any), materials_in_contact_with_patient, sterilization_method, shelf_life, storage_conditions, performance_specifications (as array), safety_features (as array), biocompatibility_testing_required, software_as_medical_device_component (yes/no), electromagnetic_compatibility_testing_required. Be precise and literal; do not paraphrase.",
"response_format": "json",
"temperature": 0.2
}
The Copilotus API returns structured JSON. Store this in a variable for the next step.
Set Variable: extracted_data
Value: {{ $node.HTTPRequest_Copilotus.json.extraction_result }}
Handle errors gracefully. If the PDF is corrupted or unreadable, the API will return an error object. Configure an error handler that logs the failure and sends a notification.
Error Node Configuration:
- Trigger: When an error is thrown
- Action: Send email notification to compliance@company.com
- Include: original file name, timestamp, error message
Step 2:
Template Generation with Mintlify
Mintlify generates documentation templates based on your extracted data and the type of regulatory submission you're targeting. This creates the structural framework that your final document will follow.
Add another HTTP Request node to call Mintlify's template generation API.
POST https://api.mintlify.com/v1/generate-template
Content-Type: application/json
Authorization: Bearer MINTLIFY_API_KEY
{
"template_type": "510k_submission",
"device_category": "{{ $node.VariableSet_extracted.json.device_category }}",
"regulatory_region": "US_FDA",
"include_sections": [
"device_description",
"intended_use",
"design_controls",
"risk_analysis",
"biocompatibility",
"sterilization_validation",
"electromagnetic_compatibility",
"software_documentation",
"labeling",
"shelf_life_stability"
],
"device_name": "{{ $node.VariableSet_extracted.json.device_name }}",
"predicate_devices": "{{ $node.VariableSet_extracted.json.predicate_devices }}"
}
The Mintlify API returns a template document with all required sections, proper headings, regulatory citations, and placeholder text. Store this as well.
Set Variable: regulatory_template
Value: {{ $node.HTTPRequest_Mintlify.json.template_content }}
Mintlify also returns metadata about which sections require human review (typically risk analysis and clinical data) versus which can be fully automated.
Set Variable: review_requirements
Value: {{ $node.HTTPRequest_Mintlify.json.review_gates }}
Step 3:
Content Refinement with Wordsmith-AI
Wordsmith-AI now takes your extracted data and your template, then fills in the content gaps with regulatory-compliant language. This is where the magic happens; Wordsmith understands medical device terminology and regulatory requirements.
Add an HTTP Request node to call Wordsmith's content generation endpoint.
POST https://api.wordsmith.ai/v1/medical-device-content
Content-Type: application/json
Authorization: Bearer WORDSMITH_API_KEY
{
"template_content": "{{ $node.VariableSet_regulatory_template.json }}",
"extracted_device_data": "{{ $node.VariableSet_extracted.json }}",
"device_type": "510k",
"regulatory_standard": "21_CFR_Part_860",
"tone": "formal_regulatory",
"fill_placeholders": true,
"generate_boilerplate": {
"biocompatibility_summary": true,
"design_control_summary": true,
"risk_management_summary": true,
"sterilization_validation_summary": true
},
"output_format": "docx"
}
Wordsmith processes the content and returns a fully formatted Word document. The API also returns a confidence score for each section; sections below 85% confidence are flagged for human review.
Set Variable: final_document
Value: {{ $node.HTTPRequest_Wordsmith.json.document_url }}
Set Variable: review_flags
Value: {{ $node.HTTPRequest_Wordsmith.json.section_confidence_scores }}
Final Steps:
Storage and Notification
Store your finished document in your regulated document repository (AWS S3 with versioning, ShareFile, or similar).
POST https://your-document-repository.com/api/documents
Content-Type: application/json
{
"document_url": "{{ $node.VariableSet_final_document.json }}",
"device_id": "{{ $node.Webhook.json.device_id }}",
"submission_type": "510k",
"generated_date": "{{ new Date().toISOString() }}",
"confidence_summary": "{{ $node.VariableSet_review_flags.json }}",
"status": "awaiting_review"
}
Send a notification to your regulatory team with a summary of what was generated and what requires human review.
Email Node:
To: regulatory-team@company.com
Subject: Medical Device Documentation Ready: {{ $node.Webhook.json.device_name }}
Body:
Your documentation has been generated and is ready for review.
Device: {{ $node.Webhook.json.device_name }}
Submission Type: 510k
Generated: {{ new Date().toLocaleString('en-GB') }}
Sections requiring human review (confidence < 85%):
{{ $node.VariableSet_review_flags.json.low_confidence_sections }}
Document location: [link to repository]
The entire workflow takes approximately 15-20 minutes to run, depending on PDF size and API response times.
The Manual Alternative
If you prefer more control at each stage, you can run these tools separately and review outputs between steps. This takes longer but gives you more opportunity to intervene.
Extract your technical specification using Chat-with-PDF-by-Copilotus directly via its web interface or API, reviewing the JSON output before proceeding. Save this extracted data as a JSON file.
Manually review the Mintlify template in the Mintlify dashboard. Customise sections if needed and download the template file.
Combine your extracted data and template manually, then upload them to Wordsmith-AI's content generation tool. Review the draft document section by section.
This approach takes 2-3 days per submission but offers editorial control at each stage. Many companies use this method when handling their first few submissions with the system, then graduate to the fully automated workflow once they're confident in the outputs.
Pro Tips
Confidence Thresholds Matter. Wordsmith-AI returns a confidence score between 0 and 100 for each section. Set your review threshold at 85% confidence; anything below this goes to a human reviewer. Adjust this threshold downward (to 75%) for well-documented devices where specifications are clear, and upward (to 95%) for novel devices with unusual characteristics.
Rate Limiting and Costs. The Copilotus API allows 100 PDF requests per minute on the Professional plan. If you're processing multiple devices, stagger your workflow submissions to avoid hitting this limit. Mintlify and Wordsmith have higher rate limits but charge per API call; batch your requests when possible to reduce costs.
Validate Against Historical Submissions. Before running your workflow on a new device, test it on a device you've already submitted successfully. Compare your automated output against the approved submission to catch systematic errors or missing sections. This step takes 30 minutes but prevents costly mistakes later.
Store Extracted Data as Source of Truth. The JSON extracted by Copilotus becomes your master data source. If your technical specification changes, update only the extracted JSON and regenerate your documentation. This ensures consistency and makes version control easier.
Implement Checksum Validation. Add a verification step that confirms your final document contains all the required sections and that critical fields (device name, predicate devices, intended use) match your source data. Use n8n's code node to run a simple validation script.
// Validation code node in n8n
const finalDoc = $node.VariableSet_final_document.json;
const sourceData = $node.VariableSet_extracted.json;
const validationChecks = {
device_name_matches: finalDoc.device_name === sourceData.device_name,
all_sections_present: [
'device_description',
'intended_use',
'design_controls',
'risk_analysis'
].every(section => finalDoc.hasOwnProperty(section)),
confidence_acceptable: Math.min(...Object.values(finalDoc.section_confidence)) > 0.85
};
return {
validation_passed: Object.values(validationChecks).every(v => v === true),
details: validationChecks
};
Cost Breakdown
| Tool | Plan Needed | Monthly Cost | Notes |
|---|---|---|---|
| Chat-with-PDF-by-Copilotus | Professional | £240 | Includes 3,000 PDF processing requests |
| Mintlify | Medical Regulatory | £180 | Includes 100 template generations |
| Wordsmith-AI | Medical Device Pro | £350 | Includes 500 content generation requests |
| n8n | Cloud Pro | £30 | Includes 100,000 workflow executions |
| Total | £800 | Per month for standard usage |
Additional costs depend on your document storage solution. AWS S3 with versioning costs approximately £5-10 per month for typical regulatory documentation volumes. If you're processing more than 20 devices per month, consider Wordsmith-AI's Enterprise plan at £600 per month, which includes unlimited API calls and priority support.
The automated workflow typically pays for itself after processing 3-4 device submissions, since each manual submission costs roughly £2,000-4,000 in staff time and carries higher error risk.