Graphrt

Email (SMTP & IMAP)

Kirim email lewat SMTP dan baca, tandai serta pindahkan pesan lewat IMAP (Gmail, Outlook atau provider apa pun), dengan batas kirim harian

Beta v0.1.0 Node.js 8 aksi Risiko ToS rendah
Pakai di Graphrt Desktop

Tentang

Plugin Graphrt yang mengirim email lewat SMTP (nodemailer) dan membaca, menandai serta memindahkan pesan lewat IMAP (imapflow). Bisa dipakai dengan provider apa pun yang menyediakan login SMTP/IMAP dengan password, biasanya app password.

Yang bisa dilakukan

  • Connection check: verify_connection logs in to SMTP and/or IMAP and logs out. It sends and changes nothing.
  • Sending: send_email takes to/cc/bcc, subject, text and/or html, and reply_to. Use in_reply_to and references for threading. Attachments (workflow nodes only) can come from https URLs or from local files in allowed directories. As an agent tool it only emails recipients in EMAIL_TOOL_ALLOWED_RECIPIENTS.
  • Reading: - list_messages: newest first. Filters: unseen_only, since, from, subject. Each message comes with uid, from/to/cc, subject, date, flags and a 200-character snippet. - read_message: headers, message_id / in_reply_to / references for replies, the body as plain text, and attachment metadata. - list_mailboxes: folders with their special use, and counts when include_counts is set.
  • Organising: mark_seen, mark_unseen and move_message work by UID, at most 100 per call.
  • Every operation is a node email.<operation> and an agent tool. The full reference is in OPERATIONS.md.

Aksi

Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.

  • Verify email connection email.verify_connection
  • Send email email.send_email
  • List email messages email.list_messages
  • Read email message email.read_message
  • List mailboxes email.list_mailboxes
  • Mark email seen email.mark_seen
  • Mark email unseen email.mark_unseen
  • Move email email.move_message

Pengaturan

Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.

  • EMAIL_PASSWORD (required)
    App password, used for SMTP and IMAP. A node's access_token (from a secret, with --trust-plugin email) overrides it.
  • EMAIL_SMTP_HOST (none)
    SMTP server, needed for sending
  • EMAIL_SMTP_PORT 465
    SMTP port
  • EMAIL_SMTP_SECURE True
    true = implicit TLS (465). false = STARTTLS (587), which is then required, so the password never travels in clear text.
  • EMAIL_SMTP_USER (none)
    SMTP login
  • EMAIL_IMAP_HOST (none)
    IMAP server, needed for reading
  • EMAIL_IMAP_PORT 993
    IMAP port
  • EMAIL_IMAP_SECURE True
    false = STARTTLS, which is then required
  • EMAIL_IMAP_USER EMAIL_SMTP_USER
    IMAP login
  • EMAIL_FROM EMAIL_SMTP_USER
    Sender, e.g. "Toko Budi" <budi@example.com>. Tools cannot change it.
  • EMAIL_DAILY_SEND_LIMIT 200
    Recipients per local day (to + cc + bcc of every attempted message). 0 disables sending.
  • EMAIL_ALLOWED_FILE_DIRS (none)
    Comma-separated directories that local attachments may come from. Leave it unset to allow https URLs only.
  • EMAIL_TOOL_ALLOWED_RECIPIENTS (none)
    Who agents may email with the send_email tool: comma-separated exact addresses and/or @domain entries, case-insensitive, e.g. budi@example.com, @toko.co.id (a domain entry does not cover subdomains). Unset, agent tool calls to send_email are refused. Workflow nodes are not limited by it.
  • EMAIL_STATE_DIR ~/.graphrt/email
    Where the daily send counter is stored (one file per SMTP account)

Cara memakainya

Di Graphrt Desktop

  1. Buka Plugins dan cari Email (SMTP & IMAP).
  2. Klik Install lalu setujui.
  3. Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
  4. Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Plugin di Graphrt Desktop

Dengan CLI

terminal
$ graphrt plugin install email
workflow.yaml
- id: unread
  type: email.list_messages
  unseen_only: true
  limit: 10
- id: reply
  type: email.send_email
  to: "{{#unread.data.messages.0.from.0.address#}}"
  subject: "Re: {{#unread.data.messages.0.subject#}}"
  text: "Terima kasih, pesanan Anda kami proses."
  in_reply_to: "{{#unread.data.messages.0.message_id#}}"
Plugin di docs