Graphrt

WhatsApp Web

WhatsApp pribadi kamu lewat WhatsApp Web di browser headless, baca chat dan pesan, kirim teks dan file (volume rendah, dibatasi rate-nya)

Eksperimental v0.2.0 Node.js 7 aksi Risiko ToS tinggi
Pakai di Graphrt Desktop

Tentang

Plugin Graphrt yang mengendalikan WhatsApp pribadi kamu lewat WhatsApp Web di Chromium headless (Playwright). Kamu scan QR code sekali, setelah itu workflow dan agent bisa membaca chat dan pesan serta mengirim teks dan file di latar belakang.

Yang bisa dilakukan

  • Session: login (node only) opens a visible window with the QR code. get_status reports logged_in, needs_login or loading.
  • Reading: - list_chats: name, last message preview, time and unread count, with unread_only. A chat you marked as unread counts as 1 unread. Two chats with the same name are both listed. - search_chats: uses the WhatsApp search box. Returns chat and contact rows only (each with kind: chat or contact), section headers and message hits are left out. - read_messages: the last N messages of a chat. Each message has id, from_me, sender, time, text and delivery status.
  • Sending: - send_message: sends to a phone number or to an existing chat by its exact name, then checks that the message appears as sent. - send_file: sends a photo, video or document from an allowed local directory or an https URL, with an optional caption.
  • Safety: - A minimum interval between sends (30 s by default), and a daily cap that is stored in the profile directory. If the counter file is unreadable or corrupt, sending is blocked until you fix or delete it. - No automatic retries. Every send is logged to stderr. - Local files must be inside WHATSAPP_WEB_ALLOWED_FILE_DIRS. URL downloads are streamed and stop at 100 MB. - Before every send the plugin clears the message (or caption) box, types the text, and then checks that the box holds exactly that text. If it doesn't, or the run was cancelled, nothing is sent.
  • One browser per plugin process: - It starts on the first operation and runs operations one at a time. - It closes after WHATSAPP_WEB_IDLE_MINUTES without use, and when Graphrt stops the plugin. When Graphrt closes the plugin's input, running operations get up to 60 s to finish and reply first, a signal (SIGTERM/SIGINT/SIGHUP) closes the browser at once. - A lock file in the profile keeps a second plugin process off the same profile. A lock left by a dead process is taken over.

Aksi

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

  • Log in to WhatsApp Web whatsapp-web.login
  • WhatsApp Web status whatsapp-web.get_status
  • List WhatsApp chats whatsapp-web.list_chats
  • Search WhatsApp chats whatsapp-web.search_chats
  • Read WhatsApp messages whatsapp-web.read_messages
  • Send WhatsApp message whatsapp-web.send_message
  • Send WhatsApp file whatsapp-web.send_file

Pengaturan

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

  • WHATSAPP_WEB_PROFILE_DIR ~/.graphrt/whatsapp-web/profile
    Chromium profile holding the WhatsApp session, the send counters (graphrt-send-state.json) and a lock file (graphrt-whatsapp-web.lock)
  • WHATSAPP_WEB_IDLE_MINUTES 15
    Close the background browser after this many idle minutes
  • WHATSAPP_WEB_MIN_SEND_INTERVAL_SECONDS 30
    Minimum gap between two sends. Bursts of sends from a personal account risk a ban, so keep it high. Waits of up to 60 s happen inline, a longer wait fails with rate_limited
  • WHATSAPP_WEB_DAILY_SEND_LIMIT 50
    Sends per local calendar day. 0 disables sending
  • WHATSAPP_WEB_ALLOWED_FILE_DIRS (none)
    Comma-separated directories send_file may read local files from. When it is unset, only https URLs work

Cara memakainya

Di Graphrt Desktop

  1. Buka Plugins dan cari WhatsApp Web.
  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 whatsapp-web --yes
workflow.yaml
- { id: unread, type: whatsapp-web.list_chats, unread_only: true, limit: 10 }
- { id: history, type: whatsapp-web.read_messages, chat_name: "Ibu", limit: 20 }
- { id: reply, type: whatsapp-web.send_message, phone: "+62 812 3456 789", text: "On my way" }
- { id: photo, type: whatsapp-web.send_file, chat_name: "Family", file: "https://example.com/photo.jpg", caption: "Look!" }
Plugin di docs