How are data sync, webhooks and triggers implemented?
Scheduled syncs; incremental cursors; webhook ingestion; event triggers for agents.
Verdict
Nango is the only project with a real data-sync engine in its code, but the free self-hosted image does not run it. Activepieces is the strongest self-hosted trigger runtime. Pipedream and Metorial define triggers well but run them in their own clouds.
Sync engine. Nango schedules recurring syncs in a Postgres-backed scheduler. Scripts save incremental state with lastSyncDate and saveCheckpoint, and records go into a cache that consumers read with a cursor. The editor found that this cursor pages reads, not syncs. Per-provider routing scripts map inbound webhooks to connections and forward a signed copy to you. In Docker mode scripts are disabled, so syncs need Cloud or NANGO_ENTERPRISE.
Self-hosted triggers. Activepieces turns polling triggers into repeating jobs. It gives each webhook flow /:flowId and a blocking /:flowId/sync route, and routes app webhooks such as Slack’s by event key. Server dedupe is only a 30-second TTL on _dedupe_key (editor correction). Real new-item detection lives in each piece.
Trigger definitions that run in a cloud. Pipedream sources use a 15-minute $.interface.timer or $.interface.http, keep cursors in $.service.db, register webhooks in activate, and dedupe by last, greatest or unique. Scheduling and ingress happen in its cloud. Metorial trigger groups split delivery (polling, minimum 600 s, or webhook) from routing matchers and support idempotency keys. Slack’s group checks an HMAC within a five-minute replay window. Composio only verifies webhooks on the client (HMAC, 300-second tolerance) and subscribes over Pusher. Polling and matching run on its backend.
No triggers. For ACI, Executor and merge-mcp the answer does not apply: all three are request/response only. For Klavis the research found too little evidence. The only inbound route is a Slack bot’s event handler. ContextForge has internal Redis pub/sub events, tools/list_changed and A2A push configs, but nothing turns a third-party webhook into an agent trigger.
Pick: Nango (Cloud or enterprise) to keep a synced copy of third-party data. Pick: Activepieces for self-hosted polling and webhook triggers. Pick: Pipedream or Composio if hosted event delivery is acceptable.
Per-project answers
ComposioHQ/composio
answeredComposio implements triggers through a combination of trigger instances, webhook subscriptions, and realtime delivery. Trigger instances are created per user per toolkit via Triggers.create(userId, slug, config) (TS: ts/packages/core/src/models/Triggers.ts:240-296, Python: python/composio/core/models/triggers.py:1271-1324). They represent a subscription to a specific event type (e.g., GITHUB_COMMIT_EVENT). The backend resolves the user's connected account automatically or you can pin a specific connected_account_id. Webhook subscriptions are project-scoped: triggers.setWebhookSubscription({ webhookUrl }) (TS: ts/packages/core/src/models/Triggers.ts:178-180, Python: python/composio/core/models/triggers.py:1162-1184) creates or updates the outbound delivery endpoint. Composio sends events as HTTP POSTs with HMAC-SHA256 signatures (webhook-id, webhook-timestamp, webhook-signature headers). The SDK provides verify_webhook() (Python: python/composio/core/models/triggers.py:1351-1420) and parse() (Python: python/composio/core/models/triggers.py:1422-1539) for server-side verification. Three webhook payload versions are supported: V1 (legacy trigger_name/connection_id), V2 (type/timestamp/data), and V3 (unified composio.* event envelope with structured metadata). Inbound endpoints for third-party providers are managed via webhooks.endpoints.create() (TS: ts/packages/core/src/models/Webhooks.ts:394-412), which creates an ingress URL per toolkit+OAuth-app pair. Realtime delivery uses Pusher WebSockets: triggers.subscribe(callback) (TS: ts/packages/core/src/models/Triggers.ts:543-575, Python: python/composio/core/models/triggers.py:1326-1349) opens a persistent WebSocket connection to the private-{project_id}_triggers channel and delivers normalized TriggerEvent objects. Client-side filters by trigger_slug, toolkit, user_id, connected_account_id, etc., can be applied. Chunked trigger events (for large payloads) are reassembled client-side.
activepieces/activepieces
answeredTriggers implement four strategies via TriggerStrategy enum, each handling data ingestion differently.
POLLING (periodic sync): When a flow with a polling trigger is enabled, flowTriggerSideEffect.handlePollingTrigger() creates a BullMQ REPEATING job configured with the piece's scheduleOptions (or a default interval from TRIGGER_DEFAULT_POLL_INTERVAL) (packages/server/api/src/app/trigger/trigger-source/flow-trigger-side-effect.ts:183-208). The worker's executePollingJob resolves the flow, runs the trigger's RUN hook inside the sandbox, and if the hook returns output, submits the payloads via apiClient.submitPayloads() which triggers new flow runs (packages/server/worker/src/lib/execute/jobs/execute-polling.ts:9-74).
WEBHOOK (ingress per flow): Each webhook-triggered flow receives a unique URL path. The webhookController at /:flowId and /:flowId/sync handles ALL HTTP methods, supporting both async (immediate 200, queue execution) and sync (block until flow completion) modes (packages/server/api/src/app/webhooks/webhook-controller.ts:17-81). webhookService.handleWebhook() resolves the flow, optionally processes a handshake challenge, checks payload size limits, and either queues the job (async) or executes synchronously via handleSync() (packages/server/api/src/app/webhooks/webhook.service.ts:45-206).
APP_WEBHOOK (event routing): Used by pieces that send events to a central Activepieces endpoint (e.g. Slack, GitHub). When enabled, handleAppWebhookTrigger() registers listeners via appEventRoutingService.createListeners(), keyed by appName, event, and identifierValue (packages/server/api/src/app/trigger/app-event-routing/app-event-routing.service.ts:18-41). Incoming events are matched to flows by these keys.
Trigger lifecycle: triggerSourceService.enable() soft-deletes any existing trigger source for the flow, saves a new TriggerSource record, calls flowTriggerSideEffect.enable() which sends the piece's ON_ENABLE hook to the engine sandbox, and then the side-effect method creates the appropriate schedule/queue/webhook listener (packages/server/api/src/app/trigger/trigger-source/trigger-source-service.ts:17-97). Disabling reverses: calls ON_DISABLE, removes repeating jobs, and soft-deletes the source. TriggerEventService stores incoming events as files in the file service and manages pagination for UI display (packages/server/api/src/app/trigger/trigger-events/trigger-event.service.ts:16-139).
Deduplication for incoming webhook events is handled by dedupe-service.ts which implements a sliding-window dedup using Redis.
NangoHQ/nango
answeredData syncs are built on the Scheduler package at packages/scheduler/lib/scheduler.ts, a cron-like task engine with states (CREATED, STARTED, SUCCEEDED, FAILED, EXPIRED, CANCELLED) and three daemons: SchedulingDaemon (evaluates schedules), ExpiringDaemon (expires stale tasks), CleaningDaemon (cleanup). Scheduled syncs are triggered via postSyncStart.ts (unpause a recurring sync) and postTrigger.ts (one-shot trigger with modes incremental, full_refresh, or full_refresh_and_clear_cache). Both call syncManager.runSyncCommand. Incremental cursors are implemented in packages/records/lib/cursor.ts as base64-encoded last_modified_at||id strings. The records package provides sync state tracking with upsert semantics. Webhook ingestion uses per-provider routing scripts in packages/server/lib/webhook/ — 40+ scripts (HubSpot, Shopify, Salesforce, GitHub, etc.) that parse webhooks, verify signatures (signature.ts), and map to the provider's format. The webhook.manager.ts:25-120 routeWebhook function looks up webhook_routing_script from providers.yaml, dispatches to the matching handler, then fans out via dispatchWebhookExecutions. Large webhook fan-outs use the dispatch queue (dispatch-queue/publisher.ts) backed by AWS SQS with batching (max 10 entries, 1MB).
PipedreamHQ/pipedream
answeredThree delivery patterns. Sources (triggers) use one of three patterns: polling, webhook, or hybrid. Each source component exports type: "source", a dedupe strategy (standard: "unique"), and emits events via this.$emit(data, { id, summary, ts }).
Polling (timer-based sync). A polling source declares a $.interface.timer prop with a default intervalSeconds (commonly 900, the DEFAULT_POLLING_SOURCE_TIMER_INTERVAL). Persistent cursor state is kept in $.service.db — the common pattern encapsulates _getLastTimestamp() and _setLastTimestamp() in private methods. On each timer fire, the run() method fetches new items since the stored cursor and emits each via $emit(). The CrowdStrike Falcon common polling module illustrates this.
Webhook ingestion. A webhook source declares $.interface.http (which provides this.http.endpoint) and implements activate()/deactivate() hooks. activate() registers the webhook with the third-party service (e.g. github.createOrgWebhook()). deactivate() removes it. Incoming payloads are received by run({ body, headers }) then passed to processEvent() which calls this.$emit(). The GitHub "New or Updated Issue" source shows the full hybrid pattern with sample events for both webhook and timer testing.
Hybrid sources. Many GitHub sources support both push (webhook) and timer (polling) via a shared base common module. The component detects which trigger mechanism fired at runtime.
Deduplication. The dedupe: "unique" strategy ensures events with duplicate id values are silently dropped, even across source restarts. The id must be a stable, globally-unique identifier for the real-world event. The component guidelines warn against using Date.now() or Math.random() as IDs. State in $.service.db survives across runs, providing incremental cursor persistence for polling sources.
IBM/mcp-context-forge
answeredData sync is primarily event-driven through Redis Pub/Sub, with incremental background sync via the dataplane publisher.
Event Service: EventService implements a centralized pub/sub event bus using Redis Pub/Sub for distributed broadcasting across multiple gateway instances, falling back to asyncio.Queue for single-node development. Each event channel has a unique name (e.g., mcpgateway:tool_events). The publish_event() method sends dict payloads. GatewayService and ToolService each create their own EventService instance for lifecycle events (added, updated, removed).
Dataplane Publisher: The dataplane publisher periodically exports user configuration (gateways, tools, resources, prompts, virtual hosts) from the database to Redis using msgpack serialization. It runs on a configurable interval and is disabled by default. The publisher snaps full state (not incremental cursors) to Redis under the UserConfig key.
Incremental sync: ToolService.list_tools() supports cursor-based pagination (opaque base64 cursor token), enabling clients to page through tools incrementally. There is no built-in incremental cursor tracking for external data sources.
Webhook ingestion: A2A push notification configs support registering webhooks for task events. A2AService.upsert_push_config() stores webhook URLs with encrypted bearer tokens. The Rust MCP runtime handles push dispatch with AES-GCM decryption of stored webhook credentials.
Health checks: GatewayService runs periodic health checks at GW_HEALTH_CHECK_INTERVAL (300s) with an in-memory failure count tracker for active/inactive gateway management.
MCP notifications: The gateway sends notifications/tools/list_changed when tool availability changes, enabling clients to refresh their tool list. There is no cron-based scheduler, no incremental cursor for third-party API sync, and no webhook receiver that maps incoming webhooks to tool calls or agent triggers.
metorial/metorial
answeredTriggers organized into trigger groups with two-phase event architecture. Each group has invocation type (polling or webhook) and required routingMatchers handler (packages/proto/src/types/triggerGroup.ts, packages/provider/src/action/triggerGroup.ts).
Webhook groups use autoRegistration (list targets, register) or manualRegistration (setup docs). process handler verifies signatures, extracts events with matchers via slates/trigger_group.webhook.process (packages/proto/src/messages/triggerGroup.ts:240-275). Slack shows HMAC verification, url_verification challenge, authorization resolution (integrations/slack/src/triggers/eventsTriggerGroup.ts:79-198).
Polling groups use min 600s intervals. pollEvents receives prior state, returns events plus updatedState via slates/trigger_group.polling.poll (packages/proto/src/messages/triggerGroup.ts:308-333). Individual triggers have matches() (no auth) and map() (with auth) via slates/action.trigger.map_event. Legacy per-trigger handlers disabled when groups announced (packages/provider-handler/src/index.ts:1014-1094).
Klavis-AI/klavis
insufficient evidenceNo centralized webhook or sync framework found. MCP servers are stateless request-response. Slack event routes (mcp-clients/src/mcp_clients/slack/event_routes.py:1-50) handle incoming Slack events (POST /slack/events) and interactive components (POST /slack/interactive) -- platform-specific message routing, not a generic webhook system. No scheduled syncs, incremental cursors, or event triggers for agents. Pagination handled internally by servers. These features may exist in the hosted Klavis cloud.
aipotheosis-labs/aci
not applicableThe repository does not implement scheduled data syncs, incremental cursors, webhook ingestion for external app data, or event triggers for agents. The two webhook endpoints in the repo are platform-internal: /v1/webhooks/auth/user-created (webhooks.py:24-124) handles PropelAuth user signup and auto-provisions a project and agent, verified via Svix signatures; /v1/billing/webhook (billing.py:183-200) consumes Stripe webhooks for subscription lifecycle. Neither receives external app webhook payloads (e.g., Slack events, GitHub push hooks). There is no background task scheduler, no cron-based sync, and no cursor-based incremental data sync. Each integration call is purely request-driven — the platform acts as a proxy, not a sync engine.
UsefulSoftwareCo/executor
not applicableExecutor is not a data sync platform and does not implement scheduled syncs, incremental cursors, webhook ingestion, or event triggers for agent tools. It is a synchronous tool catalog and execution proxy: an agent calls a tool, the plugin makes the API request, and the result returns immediately. The cloud product handles WorkOS webhooks for user/auth lifecycle events (apps/cloud/src/auth/workos-webhook.ts), but these are for platform operation (user provisioning, auth, billing), not for syncing data through integrations. If an agent needs to poll for changes or receive events, it calls tools explicitly as part of its code execution loop.
merge-api/merge-mcp
not applicableThis repository does not implement any data sync, webhook ingestion, scheduled synchronization, incremental cursors, or event triggers for agents. It is a purely synchronous request-response MCP proxy: an LLM agent makes a tool call, the server proxies it to the Merge REST API, and returns the result. There are no background workers, no webhook listeners, no cron jobs, and no subscription/polling mechanisms anywhere in the codebase. The Merge API itself may support webhooks and sync (server-side), but this MCP server does not consume or interact with those features.
← How is a tool call executed? · How is it self-hosted and what is open vs proprietary? →