AI-Powered Equipment Request and Gmail Approval System - n8n Workflow

Use this comprehensive n8n workflow to automate employee equipment requests, validate staff data via MySQL, and manage manager approvals using the n8n trigger for Gmail (sendAndWait).

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • HR and Operations teams needing a structured request system.

  • Organizations using n8n that require multi-stage approval flows.

  • Technical users looking for advanced n8n templates combining database queries (MySQL), AI, and email interaction.

  • Companies seeking to standardize informal employee request submissions using a reliable n8n node structure.

Overview

Managing internal equipment requests efficiently often requires multiple steps: identifying the requester, determining if managerial approval is necessary, obtaining that approval, and finally, formalizing the request for the procurement team. This complex process is streamlined by this powerful n8n workflow.

This n8n template uses a web Form trigger for easy employee input. It interfaces with a MySQL database to instantly look up employee and manager details. Crucially, it leverages the AI capabilities of OpenAI via a specialized n8n node (Chain LLM) to sanitize and professionalize the employee's free-text request, ensuring clarity for managers and Procurement staff. The core approval loop uses the Gmail n8n node's unique 'send and wait for approval' feature, guaranteeing a documented decision before routing the request. This end-to-end n8n workflow eliminates manual routing, reduces human error, and speeds up the entire procurement lifecycle.

How it Works

The n8n workflow begins when an employee submits their enrollment ID via the initial 'Question form' n8n trigger.


  1. Employee Validation: The 'Get Employee' n8n node queries the MySQL database using the submitted enrollment ID. If the employee is not found, the workflow terminates with an error message.

  2. Data Enrichment: Valid employee data (name, email, manager ID) is set in the flow. The employee then proceeds to the 'Get request information' form to detail their item request.

  3. Approval Check: The 'Is approval required?' n8n node checks if the employee has a manager ID assigned in the database. If a manager exists, their details are fetched via 'Get Manager' (MySQL).

  4. AI Sanitization: Based on whether approval is required, an LLM Chain n8n node is executed. This node uses OpenAI to clean up the request text, fix grammar, and generate a professional, structured email message.

  5. Manager Approval (Conditional): If a manager is present, the 'Send request to approve' Gmail n8n node sends an approval email directly to the manager, pausing the n8n workflow until the manager approves or denies it (double opt-in approval).

  6. Post-Approval Routing:

If Approved, the employee is notified ('Notify approved request'), and a second LLM node creates a formal request specifically addressed to Procurement, which is then handled by the 'Send request approved to the purchasing department' process.
If Denied, the employee is notified via 'Notify denied request'.

  1. Direct Procurement Path: If the employee is a manager (no approval required), the request is directly sanitized and sent to Procurement, bypassing the approval step.

Installation Guide

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


  1. Import: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Credentials Setup:

MySQL: Configure a credential for the 'Get Employee' and 'Get Manager' n8n nodes, ensuring it points to your employee database (schema must contain id, name, email, enrollment_number, and manager).
Gmail OAuth2: Set up a Gmail credential for the 'Send request to approve' n8n node and the notification nodes. This credential requires the necessary scopes to send emails and, crucially, use the 'sendAndWait' operation for manager approvals.
* OpenAI: Set up an OpenAI API key credential and link it to the LLM Chain n8n node instances ('Create approval message', 'Create request message', etc.).

  1. Activation: Ensure the workflow is marked as 'Active' and test the Form trigger by accessing its generated public URL.

Node Details


  • Question form (n8n trigger): The initial entry point, functioning as a webhook and form host. Key configuration: Collects 'Your employee enrollment' number, which acts as the lookup key.

  • Get Employee / Get Manager (MySQL n8n node): Executes SELECT operations against the 'employees' table. Function: Fetches employee and manager metadata required for routing and email population. Key configuration: Uses dynamic input ={{ $json['Your employee enrollment'] }} for the WHERE clause.

  • If (n8n node): Core control flow logic. Function: Branches the workflow based on data state (e.g., if employee lookup is empty, or if employee.manager is not empty).

  • Employee data / Set Manager field (Set n8n node): Used for data transformation and housekeeping. Function: Standardizes incoming JSON structure by creating dedicated employee and manager objects, setting variables like employee.requires_approval.

  • Chain LLM (n8n node, powered by OpenAI): AI integration. Function: Takes raw employee request text, applies strict writing instructions (sanitization, formality), and outputs a structured JSON object containing the professional email text and sanitized request. Key configuration: Uses a comprehensive System Prompt to enforce JSON output format and specific tone.

  • Send request to approve (Gmail n8n node): Critical integration point. Function: Sends the AI-generated email to the manager. Key configuration: Uses the sendAndWait operation, enabling an automatic double-opt-in approval mechanism that generates a boolean output for downstream routing.

Related n8n Workflows

Free

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

Enthusiastic developer passionate about automation and system integration. I work mainly with Python, RPA, and N8N, building workflows and custom solutions to optimize processes and connect platforms. Always learning, sharing, and exploring new ways to automate smarter.

Featured*