> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getmembrane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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. See [External Events API Reference](/reference/workspace-elements/external-events) for the full API.

## Subscribing to Events

Event subscriptions are created through [Flows](/reference/workspace-elements/flows). A flow is a multi-step workflow triggered by an event — in the simplest form, it just sends a webhook to your app.

1. Create a Flow in your Membrane workspace (via Console, CLI, or API).
2. Set the trigger to an event type (see below).
3. Add steps to process the event — the simplest setup is a single `api-request-to-your-app` node that sends the event data to your backend.

## Event Types

### Internal Events

Custom events defined by the connector — not tied to a specific data collection. Examples: `form-submitted`, `payment-received`, `message-posted`.

Use a `connector-event-trigger` or `app-event-trigger` in your flow.

### Stand-alone External Event Types (experimental)

If you want to subscribe to an external event without modifying a connector, you can define an
[External Event Type](/reference/workspace-elements/external-events/external-event-types) directly
in your workspace. The type owns its own `subscribe` / `handle` / `unsubscribe` JavaScript and can
be scoped universally, to a single integration, or to a single connection.

Stand-alone External Event Types **do not work as Flow triggers**. To consume their events,
create an [External Event Subscription](/reference/workspace-elements/external-events/external-event-subscriptions)
with the `connectionId` and `externalEventTypeId`, then `PATCH` a `webhookUri` onto it.
Membrane will POST each emitted event to that URI.

### Data Collection Events

Triggered by changes to records in a specific data collection (contacts, deals, messages, etc.):

* `data-record-created` — a new record appears in the external app
* `data-record-updated` — an existing record changes
* `data-record-deleted` — a record is removed

Use `data-record-created-trigger`, `data-record-updated-trigger`, or `data-record-deleted-trigger` in your flow.

#### Polling Intervals

For data collection events, Membrane detects changes via webhooks or polling. 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](/docs/managing-membrane/limits) for minimum allowed intervals.

## Logging

Membrane provides detailed logging for every step of the event pipeline:

* **[External Webhooks](/docs/managing-membrane/monitoring-troubleshooting/logs/external-webhooks)** — raw incoming webhook payloads from external apps
* **[External Event Pulls](/docs/managing-membrane/monitoring-troubleshooting/logs/external-event-pulls)** — records of each polling cycle
* **[External Events](/docs/managing-membrane/monitoring-troubleshooting/logs/external-events)** — processed events with their payload and status
* **[Flow Runs](/docs/managing-membrane/monitoring-troubleshooting/logs/flow-runs)** — execution logs for each flow triggered by an event
