Events
Events let your agent or app react to changes in external apps — a new contact created in HubSpot, a message posted in Slack, a file uploaded to Google Drive. Membrane subscribes to these changes and delivers them to your application.
Event Types
Events can come from two sources:
Data collection events — triggered by changes to records in a specific data collection (e.g., contacts, deals, messages):
data-record-created— a new record appears in the external appdata-record-updated— an existing record changesdata-record-deleted— a record is removed
Connector events — custom events defined by the connector itself, not tied to a specific data collection (e.g., form-submitted, payment-received).
See the External Event Subscriptions API for managing subscriptions, and External Events for the full reference.
How Events Are Delivered
Membrane uses whichever mechanism the external app supports, in order of preference:
| Method | How it Works | When Used |
|---|---|---|
| Webhook | External app pushes changes to Membrane in real time | App supports webhooks (recommended) |
| Pull Latest | Membrane polls for records newer than last check | App supports timestamp filtering |
| Custom Pull | Membrane uses delta/change tracking APIs | App has change tracking but no webhooks |
| Full Scan | Membrane compares complete snapshots | No better option; small collections only |
Membrane picks the best available method automatically. You don't need to configure this unless you want to override the default.
Subscribing to Events
Event subscriptions are created through flows. A flow is a multi-step workflow triggered by an event — in the simplest form, it just sends a webhook to your app.
How to subscribe
- Create a Flow in your Membrane workspace (via Console, CLI, or API).
- Set the trigger to a data event (e.g.,
data-record-createdon the contacts data source) or a connector event. - Add steps to process the event. The simplest setup is a single
api-request-to-your-appnode that sends the event data to your backend as a webhook.
Console
Go to Flows in the Console, create a new Flow, and configure the trigger and steps.
API
See the Flows API for creating flows programmatically.
Configuring Polling Intervals
For polling-based event implementations (pull-latest, custom-pull, full-scan), you can configure the polling interval:
- Pull-based: default 300 seconds (5 minutes)
- Full scan: default 10,800 seconds (3 hours)
Set these at the trigger node level or data source level. See Limits for minimum allowed intervals.
Logging
Membrane provides detailed logging for every step of the event pipeline:
- External Webhooks — raw incoming webhook payloads from external apps, including headers and response status
- External Event Pulls — records of each polling cycle: when it ran, how many events were collected, duration, and errors
- External Event Logs — processed events with their payload, which flow runs they triggered, and success/error status
- Flow Runs — execution logs for each flow triggered by an event, including step-by-step results
All logs are available in the Console under Activity.
Updated about 4 hours ago