Azure VM Timeline Report Generator using AI Chat - n8n Workflow

Generate comprehensive Azure Virtual Machine (VM) timeline and health reports instantly using a powerful n8n workflow powered by Google Gemini AI and custom n8n node tooling.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

DevOps Engineers needing quick diagnostic reports on Azure VM historical performance and status changes.
IT Administrators looking to automate repetitive tasks for auditing and compliance.
Users who want to interact with their cloud infrastructure using natural language via an AI Assistant.
Anyone seeking advanced examples of tool-equipped AI Agents within an n8n workflow.

Overview

This specialized n8n workflow transforms a natural language request into a deep diagnostic query against Azure Management APIs, utilizing the advanced reasoning capabilities of the Google Gemini AI model. Instead of manually navigating the Azure portal or scripting complex PowerShell commands, this n8n template allows users to simply ask for a VM timeline report via chat.

The AI Agent n8n node is pre-configured with six essential tools—each a specific Azure API request—to gather resource configuration, power states, performance metrics (CPU, Network, Disk I/O), and crucial Azure Activity Log events dating back up to 90 days. This sophisticated n8n workflow provides a structured, historical narrative of a virtual machine's life, drastically simplifying troubleshooting and compliance reporting.

How it Works

This automation begins with the 'When chat message received' n8n trigger, initiating the process upon receiving a user request through an integrated chat interface.


  1. Initialization: The workflow first runs a 'Set Common Variables' n8n node to define the necessary azuresubscriptionid, which is vital for all subsequent Azure API calls.

  2. AI Agent Activation: The process flows to the 'AI Agent' n8n node. This agent, configured with a system message positioning it as an Azure diagnostic expert, receives the user's input.

  3. Context and Logic: The 'AI Agent' uses the 'Google Gemini Chat Model' as its Large Language Model (LLM) for reasoning and leverages the 'Simple Memory' n8n node to maintain conversation history (session context).

  4. Tool Selection and Execution: Based on the user's query (e.g., 'What happened to VM X in the last week?'), the 'AI Agent' intelligently selects and executes the appropriate Azure diagnostic tools. For a timeline report, it likely calls 'Get VM Events' (for state changes) and 'Get VM Performance Stats' (for metric data).

  5. Data Synthesis: Once the necessary data is retrieved by the n8n tool nodes, the 'Google Gemini Chat Model' processes the complex, raw JSON results from Azure.

  6. Report Generation: The model synthesizes all gathered information into a coherent, timeline-based diagnostic report, which is then returned to the user via the 'AI Agent' n8n node's output, completing this robust n8n workflow.

Installation Guide

To implement this powerful n8n workflow, follow these setup steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it directly into your n8n instance using the 'New' button and 'Import from JSON'.

  2. Azure Credentials: You must configure a shared OAuth2 credential for Microsoft Azure Monitor. This credential needs sufficient permissions to read Azure Resource Groups, Virtual Machines, and access the Azure Activity Log (Insights/Monitor data).

* Apply these credentials to all 'Tool HTTP Request' n8n node instances (e.g., 'Get VM Events', 'Get VM Performance Stats').

  1. Google Gemini Credentials: Set up your API key for the 'Google Gemini Chat Model' n8n node using the Google Gemini (PaLM) Api account credential type.

  2. Update Subscription ID: In the 'Set Common Variables' n8n node, replace with your actual Azure Subscription ID.

  3. Activate Trigger: Ensure the 'When chat message received' n8n trigger is active. Once saved, you can integrate it into your desired chat platform (if using n8n chat interfaces) or test it directly within the n8n environment.

Node Details

When chat message received (n8n trigger): This is the entry point, firing the entire n8n workflow whenever a new message is received in the connected chat application, passing the user query to the AI Agent.
Set Common Variables (n8n node): Essential setup step used to define the azuresubscriptionid globally, which is then used dynamically in the URL parameters of all Azure-related Tool n8n nodes.
Google Gemini Chat Model: Acts as the brain of the agent, providing the reasoning and natural language generation based on the models/gemini-2.5-pro-preview-05-06 model.
AI Agent (n8n node): The core control unit. It interprets the user's need, manages the conversational state via 'Simple Memory', and orchestrates the use of its specialized Azure diagnostic tools.
Get VM Events (Tool HttpRequest n8n node): Queries the Azure Activity Log for control-plane events (like VM start/stop/delete), defaulting to a 90-day lookback filter unless the user specifies a start timestamp.
Get VM Performance Stats (Tool HttpRequest n8n node): Gathers time-series metrics (CPU, Network In/Out, Disk I/O) from Azure Monitor, allowing the agent to diagnose performance issues over time.


  • Get Azure Resource Groups & Get VM Information (Tool HttpRequest n8n nodes): These foundational tools allow the agent to discover and inventory resources before performing specific timeline queries, enabling comprehensive diagnostics across the subscription.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Featured*