Automate SMS/RCS messaging via messages.google.com using the browser tool.
Google Messages for Web allows you to send/receive texts from your Android phone via browser. This skill automates that interface.
Requirements:
openclaw or your preferred profile)Note: Replace profile=openclaw in examples with your preferred browser profile if different.
| Action | Command |
|---|---|
| -------- | --------- |
| Open pairing page | browser action=open profile=openclaw targetUrl="https://messages.google.com/web/authentication" |
| Check session | browser action=snapshot profile=openclaw — look for conversation list vs QR code |
| Take screenshot | browser action=screenshot profile=openclaw |
First-time setup requires scanning a QR code:
```
browser action=open profile=openclaw targetUrl="https://messages.google.com/web/authentication"
```
```
browser action=screenshot profile=openclaw
```
Important: Enable "Remember this computer" to persist the session.
```
browser action=navigate profile=openclaw targetUrl="https://messages.google.com/web/conversations"
```
```
browser action=snapshot profile=openclaw
```
Look for the contact in the conversation list, note the ref.
```
browser action=act profile=openclaw request={"kind": "click", "ref": ""}
```
```
browser action=act profile=openclaw request={"kind": "type", "ref": "
```
```
browser action=act profile=openclaw request={"kind": "click", "ref": "
```
This skill includes a webhook system for real-time incoming SMS notifications.
```bash
export SMS_NOTIFICATION_TARGET="telegram:YOUR_CHAT_ID"
export SMS_NOTIFICATION_CHANNEL="telegram"
```
```bash
node
```
references/observer-injection.md)cp <skill>/systemd/google-messages-webhook.service ~/.config/systemd/user/
# Edit service file: set SMS_NOTIFICATION_TARGET in Environment=
systemctl --user daemon-reload
systemctl --user enable --now google-messages-webhook
See references/snippets.md for JavaScript snippets to:
| Problem | Solution |
|---|---|
| --------- | ---------- |
| QR code shown | Session expired, re-pair |
| Elements not found | Google updated UI, check snapshot for new selectors |
| Send button disabled | Message input empty or phone disconnected |
| Observer not detecting | Check browser console for [SMS Observer] logs |
| Webhook not receiving | Verify server running: curl http://127.0.0.1:19888/health |
Google Messages uses Angular components. These may change with updates.
| Element | Selector |
|---|---|
| --------- | ---------- |
| Conversation list | mws-conversations-list |
| Conversation item | mws-conversation-list-item |
| Message input | textarea[aria-label*="message"] |
| Send button | button[aria-label*="Send"] |
| QR code | mw-qr-code |
Apache-2.0
共 1 个版本