Email Automation
Triage urgent messages across email and social with OpenAI GPT-4.1-mini and Nilyo
When something happens in a connected app, it handles email with OpenAI / ChatGPT using Nilyo.
What it does
## Send one WhatsApp alert for the messages that need an answer today ### Who is it for Anyone whose work arrives on four or five accounts at once and who has stopped reading the notifications because there are too many of them: founders, freelancers, recruiters, sales, support. ### How it works Two Nilyo triggers listen at the same time: message.new on LinkedIn, Instagram, Telegram and WhatsApp, and email.new on Gmail, Outlook or any IMAP mailbox. A Code node turns those two very different payloads into one shape, because a Message and an Email are not the same object: the Message carries the text, the chat and the direction, while the email carries a whole Email whose from is an array and which has no id to read back. Then the workflow earns the interruption. Anything you sent yourself, or that the provider did not classify as inbound, stops there. For a conversation it reads the last messages: if you answered last, nothing is sent, because a follow-up to your own reply is not something waiting on you. An email is judged on its own payload, which is already complete. Only then does the model see the new message with its conversation and answer whether it needs you today, and why in a few words. The last guard is the clock. An urgent message at three in the morning is still not worth a phone buzzing: the alert is held until the end of your quiet hours, never dropped. What arrives on WhatsApp is one line per thing that actually waits on you, with the channel, the person and the reason. ### How to set up 1. Create a personal token in Nilyo (Agent access) and store it in a Nilyo API credential. 2. Connect in Nilyo the accounts you want watched, and the WhatsApp that receives the alerts. 3. In Settings, set the recipient, your timezone and your quiet hours. 4. Add your OpenAI credential to the triage node, then publish the workflow to register both subscriptions. ### Requirements A Nilyo account with at least one messaging or email account connected plus WhatsApp, and an OpenAI account. ### How to customize Narrow the triggers to the accounts that matter, change the definition of urgent in the prompt, widen or switch off the quiet hours by setting the same start and end, or send the alert to Slack or Telegram instead. ### Community node This template uses the Nilyo community node (n8n-nodes-nilyo), verified by n8n. On n8n Cloud, enable Verified Community Nodes
The steps
- New message on a social or messaging account
- New email
- Settings
- Normalize the event
- Inbound only
- Email or conversation
- The email is already complete
- Read the conversation
- Merge the two reads
- Already answered
- Still waiting on you
- Worth interrupting you
- Urgent only
- Quiet hours
16 steps in total.
Similar automations
Email AutomationSend a morning inbox digest from email, WhatsApp, and LinkedIn with Nilyo and OpenAI10 stepsEmail AutomationTriage JMA weather delays with GPT-5-mini, Microsoft Teams and Gmail44 stepsMonitoring, Ops & IncidentsMonitor urgent App Store reviews with Apify, OpenAI, Google Sheets and Slack35 stepsAlerts & NotificationsNotify Slack when Linear creates an urgent bug7 steps