⚡ Triage urgent messages across email and social with OpenAI GPT-4.1-mini and Nilyo
⚡ 0 views · ⚡ Personal Productivity
Description
Quick overview
This workflow triggers on new emails via Nilyo (Gmail, Outlook, or IMAP), uses OpenAI GPT to classify each message as urgent or not, and sends a WhatsApp alert through Nilyo only when the email needs a reply today.
How it works
- Triggers when Nilyo receives an
email.newevent from a connected Gmail, Outlook, or IMAP mailbox. - Sets the WhatsApp recipient name used for alerts.
- Sends the email sender, subject, snippet, and a cleaned body excerpt to OpenAI and asks for a strict JSON verdict with
urgentand a shortreason. - Checks the model’s JSON response and stops the run if the email is not marked urgent.
- Sends an urgent-only WhatsApp message via Nilyo containing the subject, sender, and the model’s reason.
Setup
- Install and enable the Nilyo community node (
n8n-nodes-nilyo) in your n8n instance. - Create a Nilyo personal token, add it as an n8n Nilyo API credential, and connect your mailbox provider(s) and WhatsApp in Nilyo.
- Add an OpenAI API credential in n8n and ensure the selected model (gpt-4.1-mini) is available to your account.
- Set the WhatsApp recipient name in the workflow’s Settings step (
alert_recipient) to match a contact in Nilyo. - Activate the workflow so Nilyo can register the email event subscription for the configured destination name.
🔗 Nodes Used
OpenAI
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File