Library / AI Agents & Assistants
AI Agents & Assistants
Route medical info requests and safety events with Claude and Slack
When an API call/webhook arrives, it runs an AI agent with Claude using SMTP Email, Slack.
What it does
## AI Medical Information Request Router Takes incoming HCP/patient medical-information questions, classifies topic/urgency/complexity, retrieves approved knowledge sources, and either sends a fully-sourced automated reply for standard questions or routes the case to the right medical-information team — with a hard, always-on fail-safe that sends any possible adverse event or safety signal straight to Drug Safety, bypassing the normal routing entirely. ### How it works 1. Webhook - Medical Info Request Submitted receives the question, requester type (HCP/patient), product, and contact details. 2. Claude classifies the request: topic category, urgency, complexity (Standard vs Complex), and whether it looks like a possible adverse event or safety signal. 3. IF - Adverse Event or Safety Signal Detected? is checked FIRST and independently of everything else — any flagged case goes straight to an urgent Pharmacovigilance case + immediate Drug Safety alert, no knowledge retrieval, no auto-answer path. 4. Everything else proceeds to knowledge retrieval: HTTP - Search Approved Knowledge Base pulls matching approved content, and Claude drafts an answer strictly from those retrieved sources, citing them and flagging if it can't fully answer. 5. A routing node decides whether the request qualifies for an automated reply (Standard complexity, Routine urgency, sufficient approved-source coverage, and a complete draft) or needs to be escalated to a specific medical-information team based on topic. 6. Auto-answerable requests get emailed the sourced answer directly. Escalated requests get a case opened and an alert posted to the right team's channel. 7. All three paths (safety, auto-answered, escalated) converge and are logged to the compliance log for audit purposes. ### Setup 1. Import this workflow into n8n and activate it. 2. Add credentials: your approved medical-information knowledge base API, your case/ticketing system API (used for both safety cases and MI cases), Anthropic Claude, Slack, and your email/SMTP provider. 3. Edit Set - Config: knowledge base URL, case system URLs, team routing map (topic → team/Slack channel), and default channels. 4. Run once with a sample request to confirm classification, retrieval, drafting, and routing all work end to end before activating for real traffic.
The steps
- Webhook - Medical Info Request Submitted
- Set - Config
- AI Agent - Classify Medical Information Request
- Anthropic - Classification & Response Model
- JS - Parse Classification Output
- IF - Adverse Event or Safety Signal Detected?
- HTTP - Create Urgent Safety Case (Pharmacovigilance)
- Slack - Alert Drug Safety Team (Immediate)
- HTTP - Search Approved Knowledge Base
- JS - Evaluate Knowledge Base Coverage
- AI Agent - Draft Response from Approved Sources
- JS - Parse Draft Response
- JS - Determine Routing Team & Channel
- Switch - Route by Resolution Path
19 steps in total.
Similar automations
Reports, Analytics & DashboardsSummarize Neighborhood Safety with a Claude RAG Agent10 stepsDocuments, PDF & OCRGenerate Medical Reports from Gmail Requests with Gemini11 stepsAlerts & NotificationsPost Slack safety checks for Google Sheets sites near USGS earthquakes14 stepsAlerts & NotificationsSend earthquake safety check messages via LINE using P2PQuake and Google Sheets15 steps