Excessive Google webhook events cause unnecessary DB/network usage
Steps to reproduce
- Configure a Gmail integration in Corsair.
- Configure webhook handling through Google Pub/Sub.
- Connect a single Gmail tenant.
- Use a remote Postgres database (e.g. Neon).
- Let the integration run for some time with minimal activity.
- 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
OS: Linux Mint
Node: v24.9.0
Package Manager: npm
Database: Neon PostgresWhat part of Corsair is affected?
Integrations
Configuration (if relevant)
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.
Source: corsairdev/corsair