Project Showcase
Developer Alerts Automation Workflow
A fully automated, AI-powered ticket processing and routing system built with n8n and Google Gemini 2.5 Flash. The system receives form submissions via webhook, uses a large language model to analyze and classify the input, routes data based on priority, logs everything to Google Sheets, and delivers multi-channel notifications, all without any manual intervention.
Overview
Project Summary
This project demonstrates a real-world end-to-end AI workflow covering four core automation pillars such as: Input handling, AI processing, Conditional routing, Multi-channel output.
The workflow activates when a POST request hits the webhook endpoint. The payload is passed to a Gemini-powered LLM chain that returns structured JSON containing a category, priority level, one-sentence summary, and suggested action. A Switch node then routes execution across four priority paths: Critical, High, Medium, and Low, each triggering the appropriate downstream actions automatically.
Architecture
Technical Implementation
1. Webhook Trigger Layer: The entry point is an n8n Webhook node configured for HTTP POST requests. It accepts JSON payloads containing name, email, type, and message fields — simulating a Google Form or API submission. All downstream nodes reference this data using n8n's expression syntax (e.g. $('Webhook').item.json.body.name).
2. AI Processing Layer: A Basic LLM Chain node passes the incoming data to Google Gemini 2.5 Flash using a carefully structured prompt that instructs the model to return only raw JSON with four fields: category, priority, summary, and suggested_action. This structured output approach makes the AI response machine-readable and directly usable by downstream nodes without any additional parsing logic beyond JSON.parse().
3. Confirmation Email Layer: Before routing, a Gmail node sends an automatic acknowledgment email to the original submitter. This node sits between the LLM Chain and the Switch node so it fires for every ticket regardless of priority, providing a professional confirmation that includes the AI-generated summary and category.
4. Routing Layer: A Switch node operates in Rules mode, evaluating JSON.parse($json.text).priority against four string values: Critical, High, Medium, and Low. Each match routes execution to a dedicated output path, enabling independent action chains per priority level without any code.
5. Action Layer: Each priority path executes a tailored set of actions: Critical, High, Medium, and low. While all priority levels get recorded through google sheet API, Critical priority sends an email and a telegram notification, and High priority only sends an email.
All four Sheets nodes write to the same spreadsheet (AI Automation Tickets) using identical column mappings, creating a unified log regardless of priority. Gmail alert emails use HTML formatting with dynamic subject lines pulled from the AI output. The Telegram node sends a plain-text message with emoji formatting directly to a personal chat via a custom bot.
6. Credential Architecture: Three OAuth2/API credential types are configured: Google Gemini API key (for LLM access), Google OAuth2 client (shared across Gmail and Google Sheets nodes), and a Telegram Bot Token. All credentials are stored securely in n8n's built-in credential store and referenced by nodes without exposing keys in the workflow definition.