#271·corsair

Excessive Google webhook events cause unnecessary DB/network usage

Author: paramveer-cyberCreated Jun 14, 2026Updated Sep 13, 2026
LabelsStale

Steps to reproduce

  1. Configure a Gmail integration in Corsair.
  2. Configure webhook handling through Google Pub/Sub.
  3. Connect a single Gmail tenant.
  4. Use a remote Postgres database (e.g. Neon).
  5. Let the integration run for some time with minimal activity.
  6. Observe the number of webhook events processed and stored.

Expected Behavior

Expected: Developers should be able to configure or filter which Gmail event types are processed and stored.

Actual: All Gmail webhook events are processed and stored, including events that may not be relevant to the application. This can result in increased database storage and network transfer usage.

Corsair version

0.1.76

Environment details

bash
OS: Linux Mint
Node: v24.9.0
Package Manager: npm
Database: Neon Postgres

What part of Corsair is affected?

Integrations

Configuration (if relevant)

typescript
import { createCorsair } from "corsair"

export const corsair = createCorsair({
  plugins: [
    gmail({
      authType: "oauth_2",
    }),
    googlecalendar({
      authType: "oauth_2",
    }),
  ],
  database: pool,
  kek: process.env.CORSAIR_KEK!,
  multiTenancy: true,
});

Anything else

During testing, I observed roughly 6 GB of Neon network transfer within ~1–1.5 hours despite having only a single Gmail tenant connected and only one email sent during that period.

Webhooks can generate events for emails, labels, drafts, and other changes, which likely contributes to the volume of processed events.

A filtering mechanism for Gmail event types would help reduce unnecessary processing, storage usage, and network transfer.