1. Workflow Architecture
This workflow operates as a secure, real-time asynchronous executive assistant, running continuously in the background:
- Gmail Inbox Watcher: Triggers on every new unread email (excluding spam, social, and promotional filters to prevent unnecessary execution runs).
- Workflow Settings: Sets your preferences, including your name, company name, urgency threshold (e.g. only pinging your phone for emails rated 4 or 5), and your core text-based Writing Style Guide.
- Analyze & Classify via AI: Sends the incoming email to OpenAI's GPT-4o-mini engine, prompting it to return a structured JSON analysis detailing urgency (1-5), category, bulleted summary, and a pre-drafted voice-aligned response.
- Create Gmail Draft: Integrates directly with the active email thread. Instead of sending the reply automatically (which is high risk), it compiles the AI draft and saves it as a Gmail Draft on that exact thread.
- Telegram Alert: Pings you via Telegram with a rich, beautifully formatted mobile executive card displaying the sender, priority score, urgency reason, bulleted summary, and the voice draft preview—complete with a deep link to the Gmail thread.
2. Setup Instructions
A. Style Guide Customization
Open the Workflow Settings node. You will see a styleGuide text variable. Customize this to teach the AI how you write:
- Tonal rules: e.g., "Write concisely. Do not use 'Hope this email finds you well' or exclamation marks. Keep sentences under 15 words."
- Specific scenarios: e.g., "If someone asks for a meeting, paste my booking link: [your-link]. If a client flags an issue, tell them we are on it."
B. Telegram Mobile Alerts Setup
- Message
@BotFatheron Telegram to spin up a new bot and copy the bot API Token. - Search for
@userinfobotto retrieve your personal numerical Telegram Chat ID. - Paste these credentials into the Workflow Settings node and authorize the n8n Telegram node.
C. Gmail Node Scopes
Ensure your OAuth application or Google App Password in n8n has both:
-
gmail.readonly(for reading unread incoming mail) -
gmail.modify/gmail.compose(for creating drafts in existing threads)