Check prescription safety and drug interactions with GPT-4o, Sheets, and Telegram
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs on Google Drive events (file created) (plus 1 other trigger). Along the way it connects OpenAI, Telegram, Google Drive and Google Sheets and 1 more.
How it runs
Trigger: On Google Drive events (file created) (plus 1 other trigger).
- Download PDF from Drive (Google Drive): download
- Slack: uses Slack
- Extract Text from PDF (Extract from File): extracts data from a file (pdf)
- GPT-4o – Extract + Draft SOAP Note (OpenAI): uses OpenAI
- Parse & Validate GPT Response (Code): runs custom JavaScript code
- Read Approved Drug Formulary (Google Sheets): uses Google Sheets
- Read Drug Interactions Table (Google Sheets): uses Google Sheets
- Merge: merges the data from its input branches
- Check Formulary & Flag Interactions (Code): runs custom JavaScript code
- Route: Flagged or Cleared? (If): checks a condition and branches into true / false
…plus 4 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- OpenAI
@n8n/n8n-nodes-langchain.openAi - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - Google Sheets
n8n-nodes-base.googleSheets - Extract from File
n8n-nodes-base.extractFromFile - Merge
n8n-nodes-base.merge - Error Trigger
n8n-nodes-base.errorTrigger - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow monitors a Google Drive folder for new prescription PDFs, extracts the text, uses OpenAI (GPT-4o-mini) to structure prescription details and draft a SOAP note, checks drugs against Google Sheets formulary and interaction tables,…