Quick overview
This workflow monitors a Gmail inbox for cleanroom particle-counter excursion alerts, parses the email into structured measurements, uses OpenAI to classify severity, routes by zone criticality, and either logs minor events or runs an investigation sub-workflow that can trigger a tool-interlock API call and Telegram notifications.
How it works
- Polls a Gmail inbox every minute for messages from the particle monitor with “EXCURSION” in the subject.
- Extracts Zone, Tool, Measured Count, ISO Class Limit, and Particle Size from the email text and calculates the exceedance ratio.
- Sends the normalized excursion details to OpenAI (gpt-4.1-mini) to return a structured severity (Minor/Major/Critical) plus a shutdown recommendation.
- Tags the record with a protocol tier based on cleanroom zone criticality (Support, Process, or Litho/EUV).
- Logs Minor excursions directly to an n8n Data Table as “Logged - no investigation required.”
- For non-Minor excursions, runs a separate n8n sub-workflow to perform the contamination/CAPA investigation and merges its outcome back into the record.
- If a tool shutdown is required, calls an internal tool interlock HTTP API and alerts Facilities via Telegram, otherwise notifies EHS via Telegram.
- Writes the final investigation/shutdown outcome (including CAPA ID when present) to an n8n Data Table for audit tracking.
Setup
- Connect credentials for Gmail Trigger, OpenAI, Telegram, and the HTTP Request authentication used by your tool interlock controller.
- Import the companion contamination investigation sub-workflow and set its workflow ID in the Execute Workflow step.
- Create or select an n8n Data Table for logging and set the Data Table ID in both logging steps.
- Replace the Telegram chat IDs for Facilities and EHS and update the tool interlock API URL to your internal endpoint.