Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt

Use this file to discover all available pages before exploring further.

openclaw webhooks

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

Subcommands

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.

webhooks gmail setup

Configure Gmail watch, Pub/Sub, and OpenClaw webhook delivery.
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

Required

FlagDescription
--account <email>Gmail account to watch.

Pub/Sub options

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.

OpenClaw delivery options

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.

gog watch serve options

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.

Tailscale exposure

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).

Output

FlagDescription
--jsonPrint a machine-readable summary instead of text.

webhooks gmail run

Run gog watch serve plus the watch auto-renew loop in the foreground.
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
For run, the --topic value is the full Pub/Sub topic path (projects/.../topics/...), not just the short topic name.

End-to-end flow

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