mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 21:01:43 +03:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
---
|
||||
summary: "Gmail Pub/Sub push wired into Clawdbot webhooks via gogcli"
|
||||
summary: "Gmail Pub/Sub push wired into Moltbot webhooks via gogcli"
|
||||
read_when:
|
||||
- Wiring Gmail inbox triggers to Clawdbot
|
||||
- Wiring Gmail inbox triggers to Moltbot
|
||||
- Setting up Pub/Sub push for agent wake
|
||||
---
|
||||
|
||||
# Gmail Pub/Sub -> Clawdbot
|
||||
# Gmail Pub/Sub -> Moltbot
|
||||
|
||||
Goal: Gmail watch -> Pub/Sub push -> `gog gmail watch serve` -> Clawdbot webhook.
|
||||
Goal: Gmail watch -> Pub/Sub push -> `gog gmail watch serve` -> Moltbot webhook.
|
||||
|
||||
## Prereqs
|
||||
|
||||
- `gcloud` installed and logged in ([install guide](https://docs.cloud.google.com/sdk/docs/install-sdk)).
|
||||
- `gog` (gogcli) installed and authorized for the Gmail account ([gogcli.sh](https://gogcli.sh/)).
|
||||
- Clawdbot hooks enabled (see [Webhooks](/automation/webhook)).
|
||||
- Moltbot hooks enabled (see [Webhooks](/automation/webhook)).
|
||||
- `tailscale` logged in ([tailscale.com](https://tailscale.com/)). Supported setup uses Tailscale Funnel for the public HTTPS endpoint.
|
||||
Other tunnel services can work, but are DIY/unsupported and require manual wiring.
|
||||
Right now, Tailscale is what we support.
|
||||
@@ -91,19 +91,19 @@ under `hooks.transformsDir` (see [Webhooks](/automation/webhook)).
|
||||
|
||||
## Wizard (recommended)
|
||||
|
||||
Use the Clawdbot helper to wire everything together (installs deps on macOS via brew):
|
||||
Use the Moltbot helper to wire everything together (installs deps on macOS via brew):
|
||||
|
||||
```bash
|
||||
clawdbot webhooks gmail setup \
|
||||
--account clawdbot@gmail.com
|
||||
moltbot webhooks gmail setup \
|
||||
--account moltbot@gmail.com
|
||||
```
|
||||
|
||||
Defaults:
|
||||
- Uses Tailscale Funnel for the public push endpoint.
|
||||
- Writes `hooks.gmail` config for `clawdbot webhooks gmail run`.
|
||||
- Writes `hooks.gmail` config for `moltbot webhooks gmail run`.
|
||||
- Enables the Gmail hook preset (`hooks.presets: ["gmail"]`).
|
||||
|
||||
Path note: when `tailscale.mode` is enabled, Clawdbot automatically sets
|
||||
Path note: when `tailscale.mode` is enabled, Moltbot automatically sets
|
||||
`hooks.gmail.serve.path` to `/` and keeps the public path at
|
||||
`hooks.gmail.tailscale.path` (default `/gmail-pubsub`) because Tailscale
|
||||
strips the set-path prefix before proxying.
|
||||
@@ -126,7 +126,7 @@ Gateway auto-start (recommended):
|
||||
Manual daemon (starts `gog gmail watch serve` + auto-renew):
|
||||
|
||||
```bash
|
||||
clawdbot webhooks gmail run
|
||||
moltbot webhooks gmail run
|
||||
```
|
||||
|
||||
## One-time setup
|
||||
@@ -164,7 +164,7 @@ gcloud pubsub topics add-iam-policy-binding gog-gmail-watch \
|
||||
|
||||
```bash
|
||||
gog gmail watch start \
|
||||
--account clawdbot@gmail.com \
|
||||
--account moltbot@gmail.com \
|
||||
--label INBOX \
|
||||
--topic projects/<project-id>/topics/gog-gmail-watch
|
||||
```
|
||||
@@ -177,7 +177,7 @@ Local example (shared token auth):
|
||||
|
||||
```bash
|
||||
gog gmail watch serve \
|
||||
--account clawdbot@gmail.com \
|
||||
--account moltbot@gmail.com \
|
||||
--bind 127.0.0.1 \
|
||||
--port 8788 \
|
||||
--path /gmail-pubsub \
|
||||
@@ -190,10 +190,10 @@ gog gmail watch serve \
|
||||
|
||||
Notes:
|
||||
- `--token` protects the push endpoint (`x-gog-token` or `?token=`).
|
||||
- `--hook-url` points to Clawdbot `/hooks/gmail` (mapped; isolated run + summary to main).
|
||||
- `--include-body` and `--max-bytes` control the body snippet sent to Clawdbot.
|
||||
- `--hook-url` points to Moltbot `/hooks/gmail` (mapped; isolated run + summary to main).
|
||||
- `--include-body` and `--max-bytes` control the body snippet sent to Moltbot.
|
||||
|
||||
Recommended: `clawdbot webhooks gmail run` wraps the same flow and auto-renews the watch.
|
||||
Recommended: `moltbot webhooks gmail run` wraps the same flow and auto-renews the watch.
|
||||
|
||||
## Expose the handler (advanced, unsupported)
|
||||
|
||||
@@ -224,8 +224,8 @@ Send a message to the watched inbox:
|
||||
|
||||
```bash
|
||||
gog gmail send \
|
||||
--account clawdbot@gmail.com \
|
||||
--to clawdbot@gmail.com \
|
||||
--account moltbot@gmail.com \
|
||||
--to moltbot@gmail.com \
|
||||
--subject "watch test" \
|
||||
--body "ping"
|
||||
```
|
||||
@@ -233,8 +233,8 @@ gog gmail send \
|
||||
Check watch state and history:
|
||||
|
||||
```bash
|
||||
gog gmail watch status --account clawdbot@gmail.com
|
||||
gog gmail history --account clawdbot@gmail.com --since <historyId>
|
||||
gog gmail watch status --account moltbot@gmail.com
|
||||
gog gmail history --account moltbot@gmail.com --since <historyId>
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
@@ -246,7 +246,7 @@ gog gmail history --account clawdbot@gmail.com --since <historyId>
|
||||
## Cleanup
|
||||
|
||||
```bash
|
||||
gog gmail watch stop --account clawdbot@gmail.com
|
||||
gog gmail watch stop --account moltbot@gmail.com
|
||||
gcloud pubsub subscriptions delete gog-gmail-watch-push
|
||||
gcloud pubsub topics delete gog-gmail-watch
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user