The workflow connects directly to Gmail and triggers the moment a new email arrives. A JavaScript node extracts the key email details, including sender, subject, body, and date, before passing them to an AI Agent powered by GPT-4o-mini. The AI reads the email content and classifies it into one of six departments: Sales, Customer Service, HR, Finance, Operations, or Other.