AI Native Lang
showcase

Showcase: Never Miss an Important Email — Compiled AINL Monitor with Telegram Alerts

A 30-line AINL workflow checks your inbox every 15 minutes, skips empty polls silently, and fires a Telegram notification the moment unread email arrives — no LLM tokens, no fragile Python script, no missed messages.

March 28, 2026·2 min read
#showcase#personal-use#email#monitoring#openclaw#zeroclaw#cron
Share:TwitterLinkedIn

Audience: Anyone who wants reliable inbox alerts without paying per-check LLM costs

The workflow

openclaw/bridge/wrappers/email_monitor.ainl does one focused thing: check Gmail for unread messages, and if any exist, fire a Telegram notification via the queue adapter.

# email_monitor.ainl
S core cron "*/15 * * * *"

L0:
  R email G ->data
  X msgs (or (get data "messages") [])
  X count (core.len msgs)
  If (gt count 0) ->L_notify ->L_exit

L_notify:
  X count_str (core.stringify count)
  X msg (core.concat "📧 You have " count_str " unread email(s).")
  R queue Put [ "notify", msg ] ->sent
  Ret "notified"

L_exit:
  Ret "ok"

That's the entire file. Compile it once, schedule it, and it runs deterministically every 15 minutes.

Why this beats a script

| | Python cron script | AINL monitor | |---|---|---| | Fails silently on import error | Yes | No — compiler catches it | | Auditable execution trace | No | Yes — JSONL trajectory | | Extend without touching internals | Hard | include a new module | | Token cost per run | Varies (if LLM used) | Zero |

What you need

  • AINL installed (pip install ainativelang)
  • Email adapter configured (Gmail OAuth or IMAP)
  • Queue adapter routing to Telegram (telegram: prefix in ZEROCLAW_NOTIFY_TARGET or OpenClaw equivalent)
  • OpenClaw or ZeroClaw for scheduling — OpenClaw setup · ZeroClaw setup
ainl check openclaw/bridge/wrappers/email_monitor.ainl --strict
ainl run openclaw/bridge/wrappers/email_monitor.ainl
A

AI Native Lang Team

The team behind AI Native Lang — building deterministic AI workflow infrastructure.

Related Articles