Skip to content

gogcli hook fails #97

@Arjun31415

Description

@Arjun31415

I have configured openclaw with gogcli to read emails. I am testing only the hook part right now. The google cloud console is completely setup and I see the pub/sub pushes and ACKs being sent.

However, I get hook 404, and I am not sure what is wrong with my config.

  programs.openclaw = {
    enable = true;
    bundledPlugins = {
      summarize.enable = true; # Summarize web pages, PDFs, videos
      gogcli.enable = true;
      discrawl.enable = false; # Discord archive/search
      wacrawl.enable = false; # WhatsApp archive/search
      peekaboo.enable = false; # Take screenshots
      poltergeist.enable = false; # File watching and automation
      sag.enable = false; # Text-to-speech
      camsnap.enable = false; # Camera snapshots
      goplaces.enable = false; # Google Places API
      sonoscli.enable = false; # Sonos control
      imsg.enable = false; # iMessage
    };
    # Pure declarative config matching official OpenClaw specifications
    config = {
      gateway = {
        mode = "local";
        auth = {
          token = "openclaw-gateway-token"; # or set OPENCLAW_GATEWAY_TOKEN
        };
        port = 18789;
      };
      hooks = {
        enabled = true;
        path = "/hooks";
        token = "openclaw-hooks-token";
        allowedSessionKeyPrefixes = ["gmail-" "hook:"];
        presets = ["gmail"];
        gmail = {
          account = "<account-name>";
          topic = "<topic-name>";
          pushToken = "<token from google cloud>";
          serve = {
            bind = "127.0.0.1";
            port = 8788;
            path = "/gmail-pubsub";
          };
          hookUrl = "http://127.0.0.1:18789/hooks/gmail";
        };
      };
      agents = {
        defaults = {
          model = {
            primary = "local/gemma-4"; # Formatted as provider_id/model_id
          };
        };
      };
      models = {
        mode = "merge";
        providers = {
          local = {
            baseUrl = "http://127.0.0.1:8080/v1"; # Your llama.cpp instance location
            apiKey = "local-ai"; # Local token placeholder to satisfy strict JSON validation
            api = "openai-completions"; # Directs OpenClaw to leverage standard OpenAI API layout
            models = [
              {
                id = "gemma-4";
                name = "Gemma 4 E4B";
              }
            ];
          };
        };
      };
  systemd.user.services.openclaw-funnel = {
    Unit = {
      Description = "Tailscale Funnel pointing to Gog Receiver";
      After = ["network.target"];
    };

    Service = {
      ExecStart = "${pkgs.tailscale}/bin/tailscale funnel 8788";
      Restart = "always";
      RestartSec = 5;
    };

    Install = {
      WantedBy = ["default.target"];
    };
  };

when i run the gateway manually -

openclaw gateway run 



12:29:16 [gmail-watcher] watch started for <email>
12:29:16 [gmail-watcher] starting gog gmail watch serve --account <email> --bind 127.0.0.1 --port 8788 --path /gmail-pubsub --include-body --max-bytes 20000
12:29:16 [gmail-watcher] gmail watcher started for <email> (renew every 720m)
12:29:16 [hooks] gmail watcher started
12:29:16 [gmail-watcher] [gog] watch: listening on 127.0.0.1:8788/gmail-pubsub
12:29:17 [gateway] provider auth state pre-warmed in 1201ms eventLoopMax=157.3ms
12:31:23 [gmail-watcher] [gog] watch: ignoring stale push historyId=6662312 (stored=6662379)
12:31:23 [gmail-watcher] [gog] watch: ignoring stale push historyId=6662247 (stored=6662379)
12:31:24 [gmail-watcher] [gog] watch: ignoring stale push historyId=6662379 (stored=6662445)
12:31:25 [gmail-watcher] [gog] watch: ignoring stale push historyId=6662445 (stored=6662461)

12:39:45 [gmail-watcher] [gog] watch: hook failed: hook status 400

I always get hook status 400.

Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossThis issue is about lost, duplicated, misrouted, or suppressed channel messages.impact:session-stateThis issue is about session, memory, transcript, context, or agent state drift.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions