Log alert emails to a sheet and ping Telegram
Turns each new alert email into a row in your spreadsheet and a Telegram message, and never logs the same alert twice.
Apps it connects
Authenticate each one once and the workflow is ready to run.
What it does
Each integration step this workflow runs, in order, what it is for, and the conditions and loops that decide when it runs.
- 1
GmailNew email triggerWakes the workflow when a new email lands in Gmail, so a sweep for matching alert mail can begin. - 2
GmailList emailsFetches the alert mail your search matches, leaving out anything that already carries the filed label. For each
messageIf
messageIdis not empty- 3
GmailAdd label to messageApplies the 'Alert logged' label before the row is written, so a message is never filed or announced twice. - 4
GmailGet message headersReads the message's Date header so the row records when the alert was sent rather than when it was filed. - 5
Google SheetsAppend rowAppends one row per alert with the time sent, severity, sender, subject, a short excerpt and the message id. - 6
TelegramSend messageSends a short ping with the severity, subject, sender and time of each alert, keeping the excerpt out of the chat.
- 3
How it works
What happens on each run, in plain English.
Whenever new mail arrives in Gmail, the alert messages your search matches are logged as one row each in your spreadsheet and announced in your Telegram chat. The severity of each alert is read from the words it uses: warning, error or critical, otherwise info. Several alerts landing at once are all filed in the same run, up to a cap.
Each row records when the alert was sent, its severity, the sender, the subject, a short excerpt and the Gmail message id. The Telegram message carries the severity, subject, sender and time but not the excerpt, so the contents of your mail stay out of the chat. Every message is labelled the moment it is picked up and the search excludes that label, so nothing is logged or announced twice. A message that cannot be filed is reported and skipped rather than ending the run.
You need a spreadsheet tab with headings in that column order, a Telegram bot in the chat to ping, and a Gmail search that finds your alert mail.
Start from a workflow that already works.
Add "Log alert emails to a sheet and ping Telegram" to your workspace, connect its apps, and make it yours. No credit card required.
Free plan available · No credit card required
