Automate X-ray analysis with VLM Orion and distribute to Gmail, Telegram & Drive
📌 Overview
This workflow provides an automated pipeline for processing medical X-ray images using VLM Run (model: vlmrun-orion-1:auto), and distributing the AI-generated analysis to multiple channels—email, Telegram, and Google Drive.
⚙️ How It Works
1. Upload X-Ray Image
A Form Trigger allows the user to upload an X-ray file. Once the image is submitted, the workflow immediately starts processing.
2. Automated X-Ray Analysis
The uploaded X-ray image is sent to VLM Run (vlmrun-orion-1:auto) via an OpenAI-compatible endpoint.
The model returns:
- A text-based interpretation or description
- A disease-highlighted output image (if detected)
- A URL reference pointing to the annotated result image stored in Google Cloud
3. Extract Artifact
From artifact reference, download file using artifact node.
4. Generate Report File
The Convert to File node transforms the analysis text into a shareable .txt report.
This file is used both for email and Drive storage.
5. Send Notifications to Gmail & Telegram
The workflow automatically:
📧 Emails the doctor (or configured staff email):
- The diagnostic description
- The generated report file
- The annotated X-ray image
📨 Sends a Telegram message containing:
- The same report
- The disease-highlighted X-ray image
This ensures instant notification and cross-platform availability.
6. Upload to Google Drive
The final step uses Google Drive OAuth2 to store:
- The report file
- The annotated medical image
These files are uploaded to a designated Drive folder for archiving and future reference.
🧩 Key Features
- ✔️ Automated X-ray processing using VLM Run
- ✔️ Structured extraction of annotated medical images
- ✔️ Multi-channel notification (Email + Telegram)
- ✔️ Centralized archive via Google Drive
- ✔️ Zero manual intervention after upload
- ✔️ Works with OpenAI-compatible VLM endpoints
🔧 Requirements
-
VLM Run API Credentials Required to call
vlm-agent-1for image analysis. -
Gmail OAuth2 Credentials Needed to automatically email the diagnostic report.
-
Telegram Bot Token Sends analysis results to a Telegram chat or group.
-
Google Drive OAuth2 Stores reports and annotated images in Google Drive.
📎 Notes
This workflow automates image handling and communication. All AI-generated content must be reviewed by a qualified medical professional before any clinical use.
n8n Workflow: Automate X-Ray Analysis with VLM, Orion, and Distribute to Gmail, Telegram & Drive
This n8n workflow streamlines the process of analyzing X-ray images using a Visual Language Model (VLM) and then distributing the analysis results to multiple platforms: Gmail, Telegram, and Google Drive. It's designed to automate the initial assessment and reporting of X-ray findings, making the process faster and more efficient.
What it does
This workflow automates the following steps:
- Triggers on Form Submission: The workflow starts when a form is submitted, likely containing information or a trigger to initiate the X-ray analysis.
- Analyzes X-Ray with OpenAI VLM: It leverages the OpenAI node to perform a Visual Language Model (VLM) analysis on the X-ray data. This step is responsible for interpreting the X-ray image and generating textual findings or insights.
- Edits Fields (Set): The workflow then uses an "Edit Fields (Set)" node to process and structure the data received from the OpenAI analysis, preparing it for distribution.
- Converts to File: The processed data is converted into a file format, suitable for storage and sharing.
- Distributes to Google Drive: The generated analysis file is uploaded to Google Drive for secure storage and easy access.
- Distributes to Telegram: A message containing the analysis results (or a link to the file) is sent to a specified Telegram chat.
- Distributes to Gmail: An email containing the analysis results (or the attached file) is sent via Gmail to designated recipients.
- Merges Outputs: Finally, a "Merge" node combines the outputs from the different distribution channels, ensuring all actions are completed and the workflow finishes cleanly.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- OpenAI API Key: An OpenAI API key with access to VLM capabilities.
- Telegram Bot Token and Chat ID: A Telegram bot and the chat ID where messages should be sent.
- Google Account with Google Drive and Gmail Access: A Google account with appropriate permissions for Google Drive (to upload files) and Gmail (to send emails).
- n8n Form Trigger: The form that triggers this workflow will need to be configured.
Setup/Usage
- Import the Workflow: Download the provided JSON and import it into your n8n instance.
- Configure Credentials:
- OpenAI: Set up your OpenAI credential with your API key.
- Telegram: Configure your Telegram credential with your bot token.
- Google (Drive & Gmail): Set up a Google OAuth2 credential with access to Google Drive and Gmail scopes.
- Configure Nodes:
- On form submission: Ensure this node is correctly configured to receive data from your desired form.
- OpenAI: Configure the OpenAI node to specify the model and any prompts necessary for the X-ray analysis.
- Edit Fields (Set): Adjust this node to correctly process and format the data from OpenAI as needed for your output.
- Convert to File: Configure the desired output file type (e.g., PDF, TXT, JSON).
- Google Drive: Specify the folder where the analysis file should be uploaded.
- Telegram: Enter the
Chat IDwhere the analysis results should be sent. - Gmail: Configure the recipient email addresses, subject, and body for the email.
- Activate the Workflow: Once all configurations are complete, activate the workflow. It will now automatically process X-ray analysis requests upon form submission and distribute the results.
Related Templates
Automate Google Ads copy optimization with Channable feed and Relevance AI
🧠 Google Ads Monthly Performance Optimization (Channable + Google Ads + Relevance AI) 🚀 Overview This workflow automatically analyzes your Google Ads performance every month, identifies top-performing themes and categories, and regenerates optimized ad copy using Relevance AI — powered by insights from your Channable product feed. It then saves the improved ads to Google Sheets for review and sends a detailed performance report to your Slack workspace. Ideal for marketing teams who want to automate ad optimization at scale with zero manual intervention. --- 🔗 Integrations Used Google Ads → Fetch campaign and ad performance metrics using GAQL. Relevance AI → Analyze performance data and regenerate ad copy using AI agents and tools. Channable → Pull updated product feeds for ad refresh cycles. Google Sheets → Save optimized ad copy for review and documentation. Slack → Send a 30-day performance report to your marketing team. --- 🧩 Workflow Summary | Step | Node | Description | | ---- | --------------------------------------------------- | --------------------------------------------------------------------------- | | 1 | Monthly Schedule Trigger | Runs automatically on the 1st of each month to review last 30 days of data. | | 2 | Get Google Ads Performance Data | Fetches ad metrics via GAQL query (impressions, clicks, CTR, etc.). | | 3 | Calculate Performance Metrics | Groups results by ad group and theme to find top/bottom performers. | | 4 | AI Performance Analysis (Relevance AI) | Generates human-readable insights and improvement suggestions. | | 5 | Update Knowledge Base (Relevance AI) | Saves new insights for future ad copy training. | | 6 | Get Updated Product Feed (Channable) | Retrieves the latest catalog items for ad regeneration. | | 7 | Split Into Batches | Splits the feed into groups of 50 to avoid API rate limits. | | 8 | Regenerate Ad Copy with Insights (Relevance AI) | Rewrites ad copy with the latest product and performance data. | | 9 | Save Optimized Ads to Sheets | Writes output to your “Optimized Ads” Google Sheet. | | 10 | Generate Performance Report | Summarizes the AI analysis, CTR trends, and key insights. | | 11 | Email Performance Report (Slack) | Sends report directly to your Slack channel/team. | --- 🧰 Requirements Before running the workflow, make sure you have: A Google Ads account with API access and OAuth2 credentials. A Relevance AI project (with one Agent and one Tool setup). A Channable account with API key and project feed. A Google Sheets document for saving results. A Slack webhook URL for sending performance summaries. --- ⚙️ Environment Variables Add these environment variables to your n8n instance (via .env or UI): | Variable | Description | | -------------------------------- | ------------------------------------------------------------------- | | GOOGLEADSAPI_VERSION | API version (e.g., v17). | | GOOGLEADSCUSTOMER_ID | Your Google Ads customer ID. | | RELEVANCEAIAPI_URL | Base Relevance AI API URL (e.g., https://api.relevanceai.com/v1). | | RELEVANCEAGENTPERFORMANCE_ID | ID of your Relevance AI Agent for performance analysis. | | RELEVANCEKNOWLEDGESOURCE_ID | Knowledge base or dataset ID used to store insights. | | RELEVANCETOOLADCOPYID | Relevance AI tool ID for generating ad copy. | | CHANNABLEAPIURL | Channable API endpoint (e.g., https://api.channable.com/v1). | | CHANNABLECOMPANYID | Your Channable company ID. | | CHANNABLEPROJECTID | Your Channable project ID. | | FEED_ID | The feed ID for product data. | | GOOGLESHEETID | ID of your Google Sheet to store optimized ads. | | SLACKWEBHOOKURL | Slack Incoming Webhook URL for sending reports. | --- 🔐 Credentials Setup in n8n | Credential | Type | Usage | | ----------------------------------------------- | ------- | --------------------------------------------------- | | Google Ads OAuth2 API | OAuth2 | Authenticates your Ads API queries. | | HTTP Header Auth (Relevance AI & Channable) | Header | Uses your API key as Authorization: Bearer <key>. | | Google Sheets OAuth2 API | OAuth2 | Writes optimized ads to Sheets. | | Slack Webhook | Webhook | Sends monthly reports to your team channel. | --- 🧠 Example AI Insight Output json { "insights": [ "Ad groups using 'vegan' and 'organic' messaging achieved +23% CTR.", "'Budget' keyword ads underperformed (-15% CTR).", "Campaigns featuring 'new' or 'bestseller' tags showed higher conversion rates." ], "recommendations": [ "Increase ad spend for top-performing 'vegan' and 'premium' categories.", "Revise copy for 'budget' and 'sale' ads with low CTR." ] } --- 📊 Output Example (Google Sheet) | Product | Category | Old Headline | New Headline | CTR Change | Theme | | ------------------- | -------- | ------------------------ | -------------------------------------------- | ---------- | ------- | | Organic Protein Bar | Snacks | “Healthy Energy Anytime” | “Organic Protein Bar — 100% Natural Fuel” | +12% | Organic | | Eco Face Cream | Skincare | “Gentle Hydration” | “Vegan Face Cream — Clean, Natural Moisture” | +17% | Vegan | --- 📤 Automation Flow Run Automatically on the first of every month (cron: 0 0 1 ). Fetch Ads Data → Analyze & Learn → Generate New Ads → Save & Notify. Every iteration updates the AI’s knowledge base — improving your campaigns progressively. --- ⚡ Scalability The flow is batch-optimized (50 items per request). Works for large ad accounts with up to 10,000 ad records. AI analysis & regeneration steps are asynchronous-safe (timeouts extended). Perfect for agencies managing multiple ad accounts — simply duplicate and update the environment variables per client. --- 🧩 Best Use Cases Monthly ad creative optimization for eCommerce stores. Marketing automation for Google Ads campaign scaling. Continuous learning ad systems powered by Relevance AI insights. Agencies automating ad copy refresh cycles across clients. --- 💬 Slack Report Example 30-Day Performance Optimization Report Date: 2025-10-01 Analysis Period: Last 30 days Ads Analyzed: 842 Top Performing Themes Vegan: 5.2% CTR (34 ads) Premium: 4.9% CTR (28 ads) Underperforming Themes Budget: 1.8% CTR (12 ads) AI Insights “Vegan” and “Premium” themes outperform baseline by +22% CTR. “Budget” ads underperform due to lack of value framing. Next Optimization Cycle: 2025-11-01 --- 🛠️ Maintenance Tips Update your GAQL query occasionally to include new metrics or segments. Refresh Relevance AI tokens every 90 days (if required). Review generated ads in Google Sheets before pushing them live. Test webhook and OAuth connections after major n8n updates. --- 🧩 Import Instructions Open n8n → Workflows → Import from File / JSON. Paste this workflow JSON or upload it. Add all required environment variables and credentials. Execute the first run manually to validate connections. Once verified, enable scheduling for automatic monthly runs. --- 🧾 Credits Developed for AI-driven marketing teams leveraging Google Ads, Channable, and Relevance AI to achieve continuous ad improvement — fully automated via n8n.
GPT-4.1-mini Powered Invoice Processing from Gmail to Google Sheets with Slack
AI-Powered Invoice Processing from Gmail to Google Sheets with Slack Approval This workflow completely automates your invoice processing pipeline. It triggers when a new invoice email arrives in Gmail, uses AI to extract key data from the PDF attachment, logs it in a Google Sheet, and sends a request to Slack with simple links for one-click approval or rejection. Who's it for? This template is perfect for small business owners, finance teams, freelancers, and anyone looking to eliminate the manual work of processing invoices. It saves hours of data entry, reduces human error, and streamlines the approval process. How it works Trigger: The workflow starts when an email with a specific subject (e.g., "Invoice") arrives in Gmail. Extraction: It automatically downloads the first PDF attachment from the email and extracts all its text content. AI Processing: The extracted text is sent to an AI model, which intelligently identifies and pulls out key details: invoice number, issue date, company name, total amount, and due date. Logging: This structured data is appended as a new row in your Google Sheet. The status is automatically set to "pending". The full, raw text from the PDF is also saved for easy verification. Approval Request: A formatted message is sent to a designated Slack channel. This message includes the key invoice details and two unique links: one to approve and one to reject the invoice. Handle Response: When a user clicks either the "Approve" or "Reject" link, the corresponding Webhook in the workflow is triggered. Update Sheet: The workflow finds the correct row in the Google Sheet using the invoice number and updates its status to "approved" or "rejected". Confirmation: A final confirmation message is sent to the Slack channel, closing the loop and informing the team of the action taken. How to set up Credentials: Add your credentials for Gmail, OpenAI, Google Sheets, and Slack in the designated nodes. Gmail Trigger: In the "1. New Invoice Email Received" node, change the search query q from "incoice" to the keyword you use for invoice emails (e.g., "invoice"). Google Sheets: In the three Google Sheets nodes ("6. Log Invoice...", "9a. Update Status to Approved", and "9b. Update Status to Rejected"), enter your Google Sheet ID and the name of the sheet. Slack: In the three Slack nodes ("7. Send Approval Request...", "10a. Send Approval Confirmation", and "10b. Send Rejection Confirmation"), enter your Slack Channel ID. Webhook URLs: First, activate the workflow using the toggle in the top-right corner. Open the "Webhook (Approve)" node, go to the Production URL tab, and copy the URL. Paste this URL into the "7. Send Approval Request to Slack" node, replacing the https://YOURWEBHOOKBASE_URL/webhook/approval part of the approval link. Repeat this process for the "Webhook (Reject)" node and the rejection link. Activate Workflow: Ensure the workflow is active for the Webhooks to work continuously. How to customize AI Prompt: You can modify the prompt in the "5. Extract Invoice Data with AI" node to extract different or additional fields to match your specific invoice formats. Slack Messages: Feel free to customize the text in all three Slack nodes to better fit your team's tone and communication style.
Realtime Notion Todoist 2-way sync with Redis
Purpose This solution enables you to manage all your Notion and Todoist tasks from different workspaces as well as your calendar events in a single place. All tasks can be managed in Todoist and additionally Fantastical can be used to manage scheduled tasks & events all together. Demo & Explanation [](https://youtu.be/k66j6ZspjCg) How it works The realtime sync consists of two workflows, both triggered by a registered webhook from either Notion or Todoist To avoid overwrites by lately arriving webhook calls, every time the current task is retrieved from both sides. Redis is used to prevent from endless loops, since an update in one system triggers another webhook call again. Using the ID of the task, the trigger is being locked down for 15 seconds. Depending on the detected changes, the other side is updated accordingly. Generally Notion is treaded as the main source. Using an "Obsolete" Status, it is guaranteed, that tasks never get deleted entirely by accident. The Todoist ID is stored in the Notion task, so they stay linked together An additional full sync workflow daily fixes inconsistencies, if any of them occurred, since webhooks cannot be trusted entirely. Since Todoist requires a more complex setup, a tiny workflow helps with activating the webhook. Another tiny workflow helps generating a global config, which is used by all workflows for mapping purposes. Mapping (Notion >> Todoist) Name: Task Name Priority: Priority (1: do first, 2: urgent, 3: important, 4: unset) Due: Date Status: Section (Done: completed, Obsolete: deleted) <page_link>: Description (read-only) Todoist ID: <task_id> Current limitations Changes on the same task cannot be made simultaneously in both systems within a 15-20 second time frame Subtasks are not linked automatically to their parent yet Recurring tasks are not supported yet Tasks names do not support URL’s yet Prerequisites Notion A database must already exist (get a basic template here) with the following properties (case matters!): Text: "Name" Status: "Status", containing at least the options "Backlog", "In progress", "Done", "Obsolete" Select: "Priority", containing the options "do first", "urgent", "important" Date: "Due" Checkbox: "Focus" Text: "Todoist ID" Todoist A project must already exist with the same sections like defined as Status in Notion (except Done and Obsolete) Redis Create a Free Redis Cloud instance or self-host Setup [](https://youtu.be/73jhyU0t4c4) The setup involves quite a lot of steps, yet many of them can be automated for business internal purposes. Just follow the video or do the following steps: Setup credentials for Notion (access token), Todoist (access token) and Redis - you can also create empty credentials and populate these later during further setup Clone this workflow by clicking the "Use workflow" button and then choosing your n8n instance - otherwise you need to map the credentials of many nodes. Follow the instructions described within the bundle of sticky notes on the top left of the workflow How to use You can apply changes (create, update, delete) to tasks both in Notion and Todoist which then get synced over within a couple of seconds (this is handled by the differential realtime sync) The daily running full sync, resolves possible discrepancies in Todoist and sends a summary via email, if anything needed to be updated. In case that contains an unintended change, you can jump to the Task from the email directly to fix it manually.