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 ウォッチ、Pub/Sub トピック/サブスクリプション、OpenClaw フック配信を設定します。
gmail run gog watch serve とウォッチの自動更新ループをフォアグラウンドで実行します。

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 ウォッチを開始して、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 (12h) N 分ごとに Gmail ウォッチを更新します。

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 とウォッチの自動更新ループをフォアグラウンドで実行し、gog watch serve が予期せず終了した場合は 2s の遅延後に再起動します。

runsetup と同じ 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