Skip to content

Webhooks

Webhook helpers and integrations. Today this surface is scoped to Gmail Pub/Sub flows that integrate with the bundled gog watcher.

Terminal window
openclaw webhooks gmail setup --account <email> [...]
openclaw webhooks gmail run [--account <email>] [...]
SubcommandDescription
gmail setupConfigure Gmail watch, Pub/Sub topic/subscription, and the OpenClaw webhook delivery target.
gmail runRun gog watch serve plus the watch auto-renew loop.

Configure Gmail watch, Pub/Sub, and OpenClaw webhook delivery.

Terminal window
openclaw webhooks gmail setup --account [email protected]
openclaw webhooks gmail setup --account [email protected] --project my-gcp-project --json
openclaw webhooks gmail setup --account [email protected] --hook-url https://gateway.example.com/hooks/gmail
FlagDescription
--account <email>Gmail account to watch.
FlagDefaultDescription
--project <id>(none)GCP project id (the OAuth client owner).
--topic <name>gog-gmail-watchPub/Sub topic name.
--subscription <name>gog-gmail-watch-pushPub/Sub subscription name.
--label <label>INBOXGmail label to watch.
--push-endpoint <url>(none)Explicit Pub/Sub push endpoint. Overrides Tailscale.
FlagDefaultDescription
--hook-url <url>(none)OpenClaw webhook URL.
--hook-token <token>(none)OpenClaw webhook token.
--push-token <token>(none)Push token forwarded to gog watch serve.
FlagDefaultDescription
--bind <host>127.0.0.1gog watch serve bind host.
--port <port>8788gog watch serve port.
--path <path>/gmail-pubsubgog watch serve path.
--include-bodytrueInclude email body snippets. Pass --no-include-body to disable.
--max-bytes <n>20000Max bytes per body snippet.
--renew-minutes <n>720 (12h)Renew Gmail watch every N minutes.
FlagDefaultDescription
--tailscale <mode>funnelExpose push endpoint via tailscale: funnel, serve, or off.
--tailscale-path <path>(none)Path for tailscale serve/funnel.
--tailscale-target <t>(none)Tailscale serve/funnel target (port, host:port, or URL).
FlagDescription
--jsonPrint a machine-readable summary instead of text.

Run gog watch serve plus the watch auto-renew loop in the foreground.

Terminal window
openclaw webhooks gmail run --account [email protected]

run accepts the same gog watch serve, OpenClaw delivery, Pub/Sub, and Tailscale flags as setup, except:

  • --account is optional on run (it falls back to the configured account).
  • run does not accept --project, --push-endpoint, or --json.
  • run flags have no built-in defaults; missing values fall back to the values written by setup.
CategoryFlags
Pub/Sub--account, --topic, --subscription, --label
OpenClaw delivery--hook-url, --hook-token, --push-token
gog watch serve--bind, --port, --path, --include-body, --max-bytes, --renew-minutes
Tailscale--tailscale, --tailscale-path, --tailscale-target

See Gmail Pub/Sub integration for the GCP project, OAuth, and gateway-side setup that pairs with these CLI commands.