CLI commands

Webhook

openclaw webhooks

Webhook ヘルパーと統合。現在、このサーフェスは、同梱の gog ウォッチャー上に構築された Gmail Pub/Sub フローに限定されています。

サブコマンド

bash
openclaw webhooks gmail setup --account <email> [...]openclaw webhooks gmail run   [--account <email>] [...]
サブコマンド 説明
gmail setup 1回限りのウィザード: Gmail watch、Pub/Sub トピック/サブスクリプション、OpenClaw フック配信。
gmail run gog watch serve と watch 自動更新ループをフォアグラウンドで実行します。

webhooks gmail setup

bash
openclaw webhooks gmail setup --account you@example.comopenclaw webhooks gmail setup --account you@example.com --project my-gcp-project --jsonopenclaw webhooks gmail setup --account you@example.com --hook-url https://gateway.example.com/hooks/gmail

不足している場合は gcloudgog をインストールし、gcloud を認証し、Pub/Sub トピックとサブスクリプションを作成し、Gmail watch を開始し、hooks.enabled=true 付きで hooks.gmail 設定を書き込みます。Next: openclaw webhooks gmail run を出力します。

必須

フラグ 説明
--account <email> 監視する Gmail アカウント。

Pub/Sub オプション

フラグ デフォルト 説明
--project <id> (なし) GCP プロジェクト ID(OAuth クライアントの所有者)。トピック自身のプロジェクト ID、次に gog 認証情報から解決されたプロジェクトにフォールバックします。
--topic <name> gog-gmail-watch Pub/Sub トピック名。
--subscription <name> gog-gmail-watch-push Pub/Sub サブスクリプション名。
--label <label> INBOX 監視する Gmail ラベル。
--push-endpoint <url> (なし) 明示的な Pub/Sub プッシュエンドポイント。Tailscale を上書きします。

OpenClaw 配信オプション

フラグ デフォルト 説明
--hook-url <url> hooks.path と Gateway ポートから構築 OpenClaw webhook URL。
--hook-token <token> hooks.token、または生成されたトークン OpenClaw webhook トークン。
--push-token <token> 生成されたトークン gog watch serve に転送されるプッシュトークン。

gog watch serve オプション

フラグ デフォルト 説明
--bind <host> 127.0.0.1 gog watch serve のバインドホスト。
--port <port> 8788 gog watch serve のポート。
--path <path> /gmail-pubsub gog watch serve のパス。明示的なターゲットなしで Tailscale が有効な場合、Tailscale はプロキシ前にパスを取り除くため、/ に強制されます。
--include-body true メール本文スニペットを含めます。これをオフにする CLI フラグはありません。代わりに設定で hooks.gmail.includeBody: false を設定してください。
--max-bytes <n> 20000 本文スニペットあたりの最大バイト数。
--renew-minutes <n> 720 (12時間) N分ごとに Gmail watch を更新します。

Tailscale 公開

フラグ デフォルト 説明
--tailscale <mode> funnel tailscale 経由でプッシュエンドポイントを公開: funnelserve、または off
--tailscale-path <path> (なし) tailscale serve/funnel のパス。
--tailscale-target <t> (なし) Tailscale serve/funnel ターゲット(ポート、host:port、または URL)。

出力

フラグ 説明
--json テキストの代わりに機械可読な要約を出力します。

webhooks gmail run

bash
openclaw webhooks gmail run --account you@example.com

gog watch serve と watch 自動更新ループをフォアグラウンドで実行し、gog watch serve が予期せず終了した場合は 2秒の遅延後に再起動します。

run は、次を除き、setup と同じ Pub/Sub、OpenClaw 配信、gog watch serve、Tailscale フラグを受け付けます。

  • --accountrun では任意です。hooks.gmail.account にフォールバックします。
  • run--project--push-endpoint--json を受け付けません。
  • すべてのフラグは、対応する hooks.gmail.* 設定値(setup によって書き込まれる)にフォールバックし、次に setup が使用する同じ組み込みデフォルトにフォールバックします。ただし例外が1つあります。フラグも hooks.gmail.tailscale.mode も設定されていない場合、--tailscalerun では funnel ではなく off がデフォルトです。
カテゴリ フラグ
Pub/Sub --account, --topic, --subscription, --label
OpenClaw 配信 --hook-url, --hook-token, --push-token
gog watch serve --bind, --port, --path, --include-body, --max-bytes, --renew-minutes
Tailscale --tailscale, --tailscale-path, --tailscale-target

関連

Was this useful?
On this page

On this page