Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

email-webhook

bởi lksrz

Web & Frontend Development
666Lượt tải do clawskills.sh công bố
2Sao
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Receive incoming emails via JSON webhooks and wake the agent.

Mô tả

Kỹ năng này làm gì

Runs a local HTTP server that receives incoming emails as JSON webhooks and immediately wakes an OpenClaw agent. Emails are stored in a local JSONL inbox file and the agent is notified via a system event. Requires a shared secret for authentication.

Skips polling by pushing email events directly to the agent in real time via webhook, rather than having the agent check an inbox on a schedule.

Khi nào nên dùng

  • Get notified when a support email arrives while the agent is idle
  • Route incoming emails to a Discord or WhatsApp notification via agent heartbeat
  • Trigger automated replies when specific senders are detected
  • Log all inbound emails to a local file for later processing
  • Wake a dormant agent the moment a time-sensitive email lands

Quy trình ví dụ

ĐẦU VÀO

User asks: notify me on Discord whenever I get an email

AGENT
  1. 1

    Start the webhook server with WEBHOOK_SECRET and OPENCLAW_AGENT_ID set

  2. 2

    Configure Cloudflare Email Worker to POST to the webhook URL

  3. 3

    Receive incoming email as JSON payload at /api/email

  4. 4

    Append email metadata to inbox.jsonl and fire openclaw system event --mode now

  5. 5

    Agent reads inbox.jsonl, detects new entry, and sends Discord notification with sender, subject, and preview

ĐẦU RA

Discord message: "📧 New email from alice@example.com: Invoice #1042 — Please find attached..."

Yêu cầu

  • WEBHOOK_SECRET environment variable
  • OPENCLAW_AGENT_ID environment variable
  • Cloudflare account (for email routing via Cloudflare Email Workers)
  • Domain with DNS managed by Cloudflare

Cài đặt

clawhub install lksrz/email-webhook

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết