Automated X-Ray Analysis and Multi-Channel Report Distribution - n8n Workflow

Leverage this advanced n8n workflow to automate medical X-ray analysis using VLM agents (like vlm-agent-1), generating diagnostic reports and instantly distributing results via Gmail, Telegram, and Google Drive. Get specialized n8n templates for healthcare.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Healthcare Providers: Medical teams needing rapid, automated initial diagnostic support.
AI Researchers: Individuals testing specialized Vision-Language Model (VLM) integration within a production environment.
Automation Specialists: Users seeking complex n8n templates that combine file handling, custom scripting, and parallel distribution.
Technical Teams: Groups requiring a robust n8n workflow to manage sensitive data flows across multiple platforms securely.

Overview

Modern medical analysis often requires speed and accurate documentation. This comprehensive n8n workflow solves the challenge of manually reviewing and distributing diagnostic reports derived from specialized AI models. It starts with a simple web form n8n trigger, allowing easy submission of X-ray images. The core logic utilizes a VLM agent (vlm-agent-1) accessible via the OpenAI-compatible n8n node to perform expert image analysis, annotating the image with findings and generating a text description. The output is then immediately broadcast to key stakeholders using Gmail and Telegram for instant review, and archived securely in Google Drive. This end-to-end automation significantly reduces processing time, ensures prompt notification, and maintains a centralized record, showcasing the power of a highly integrated n8n solution.

How it Works

This powerful n8n workflow operates in several distinct stages:


  1. Initiation (Form Trigger): The process begins when a user uploads an X-ray image via the Upload X-Ray Image form n8n trigger.

  2. AI Analysis: The file is immediately passed to the Analyze X-Ray n8n node, which uses the VLM agent (vlm-agent-1) to process the image, detect abnormalities, and generate both a text diagnosis and a URL for the annotated output image.

  3. Data Processing & Extraction: The Extract URL Code n8n node runs custom JavaScript to accurately pull the Google Storage link for the annotated image from the AI's complex response body. The Set Key n8n node structures the analysis into clear Description and Output_Image fields.

  4. File Preparation: The Download Analysis Image HTTP Request n8n node retrieves the actual binary data of the annotated image using the extracted URL. The text diagnosis is converted into a shareable file format using the Convert to Report n8n node.

  5. Parallel Distribution (Merge): The Merge n8n node combines the text report and the annotated image file. These prepared files are then sent in parallel to three separate services:

Gmail: The Send Details n8n node emails the report and annotated image to the designated medical contact.
Telegram: The Send Details1 n8n node delivers the results instantly as a document to a specific Telegram chat.
* Google Drive: The Upload Report n8n node archives both the generated files into a specified folder for long-term storage and compliance.

Installation Guide

To deploy this specialized n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it into your n8n instance via the 'Workflows' screen using the 'New' > 'Import from JSON' option.

  2. Configure Credentials: This n8n workflow requires four sets of credentials:

OpenAI/VLM Run API: Configure the credentials for the Analyze X-Ray n8n node to connect to your VLM service (e.g., VLM Run using an OpenAI-compatible endpoint).
Gmail OAuth2: Configure the Send Details n8n node with OAuth2 credentials to allow n8n to send emails on your behalf.
Telegram Bot API: Configure the Send Details1 n8n node with your Telegram Bot token and set the target Chat ID.
Google Drive OAuth2: Configure the Upload Report n8n node with OAuth2 credentials and ensure the folderId parameter points to the correct destination folder (e.g., test_data).

  1. Set the Trigger: Activate the Upload X-Ray Image n8n trigger to generate the public webhook URL for file submission.

  2. Test: Run the n8n workflow manually by submitting an X-ray image to verify that the analysis, extraction, and all three distribution channels function correctly.

Node Details

Upload X-Ray Image (Form Trigger): This is the initiating n8n trigger. It provides a simple web form interface for users to submit the X-ray file that drives the rest of the n8n workflow.
Analyze X-Ray (OpenAI n8n node): The core intelligence node. It leverages an external VLM model (vlm-agent-1) to perform specialized medical interpretation of the uploaded image and returns the diagnosis and an annotated image URL.
Extract URL (Code n8n node): Essential custom scripting to programmatically parse the response from the AI model and reliably isolate the https://storage.googleapis.com... link, making the data usable by subsequent n8n nodes.
Set Key (Set n8n node): Used for data clarity. It creates standardized output fields (Description and Output_Image) from the raw incoming data.
Download Analysis Image (HTTP Request n8n node): Downloads the visually annotated X-ray image file so it can be attached to the distribution messages and uploaded to storage.
Convert to Report (Convert to File n8n node): Converts the text diagnosis into a storable, binary file (text format) necessary for upload nodes like Telegram and Google Drive.
Send Details (Gmail n8n node): Handles official email distribution, ensuring the diagnostic text and the annotated image are sent to the reviewing physician.
Send Details1 (Telegram n8n node): Provides rapid, instant notification by sending the full analysis package directly to a Telegram chat as documents.


  • Upload Report (Google Drive n8n node): Final step in the storage pipeline, securely archiving both the annotated image and the text report within a specified Google Drive folder.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by
Mehedi Ahamed
Mehedi Ahamed

Featured*