App Event Types
To use Internal Events, you need to define one or more App Event Types. You can do it on the App Event Types page. Each App Event Type has:- Schema – a Data Schema describing the event’s contents.
- Example – an example of the event’s contents matching the Schema. You can use Example to generate schema.
Sending Events to Membrane
Global Webhook
Use Global Webhook to send app events to Membrane in a centralized (not per-user) way. Simply make an HTTP request of any type to the webhook URI and the event will be captured and processed.- Authentication Token (Recommended) – Include the tenant’s authentication token in the
Authorizationheader. Membrane will automatically extract the tenant ID from the token. - Tenant ID Formula – Configure a formula in the App Event Type settings that extracts the tenant ID from the event payload. This is useful when you cannot include an authentication token in the request.
- User ID Formula (Legacy) – For backward compatibility, you can use the older “User ID Formula” field which works the same way as Tenant ID Formula.
Per-Tenant Subscriptions
If instead of a Global Webhook, you want to use per-user webhooks or if you already have an API that allows per-user event subscriptions, you can configure subscriptions for your App Event. When configured, Membrane:- Makes an HTTP request to your application’s subscription API
- Provides a unique webhook URL in the request (available as
{{webhookUri}}variable) - Expects your application to send events to that specific webhook URL
- Tracks the subscription request and response for troubleshooting
webhookUri variables to configure the request.
The request will be called the first time this App Event Type is used for a given User. You can find the subscription request and response, as well as other information about subscriptions on the Subscriptions page.
Batch Events
If the body of the request your app sends to Membrane is an array, it will be treated as multiple events. For global webhooks with batch events, each event can be associated with a different tenant by including tenant identification in each event payload.How Subscriptions Work
Internal event subscriptions are created when a Flow has a trigger that reacts to Internal Events and the flow is enabled. When you enable a Flow that uses an App Event Trigger node, Membrane automatically:- Creates an App Event Subscription for the specified Internal Event and Tenant.
- If configured, makes an HTTP subscription request to your application’s API.
- Generates a unique webhook URL for receiving events.
Automatic De-duplication
Membrane automatically de-duplicates subscriptions. If multiple Flow Instances need the same Internal Event Type for the same tenant and instance key, only one subscription is created and shared between them. For example:- Flow A and Flow B both trigger on “Order Created” events for Tenant X
- Only one App Event Subscription is created
- Both flows are launched when an event arrives
- The subscription remains active until both flows are disabled
Monitoring and Troubleshooting
Viewing Subscriptions
Navigate to App Event Subscriptions to see:- All active and inactive subscriptions
- Subscription status (subscribed/unsubscribed)
- The webhook URL for each subscription
- Subscription and unsubscription request/response history
- Associated App Event Type and tenant
Viewing Events
Navigate to App Events to see:- All received events
- Which subscription received each event
- Event payload and timestamp
- Which Flows were triggered
- Execution status of triggered Flows
Flow Was Not Launched
If you expected a webhook to launch a flow, but it didn’t: Step 1: Check Logs Go to the Webhook Logs and check if the events you expected are there. Use filters to narrow down the list. If you found the record, check its details:- Is it associated to the correct App User?
- Does it have the data you expected?
- Does the trigger use the right webhook? Check node dependencies on the Flow Instance page.
- Does it have a filter that excludes the event?
Webhook Events Do Not Appear in Logs
Step 1: Check Subscription If you are using a webhook with subscription, find the subscription by Webhook and User, and check its status. Is it subscribed successfully? Step 2: Trigger the Webhook Manually Make an HTTP request to the webhook URL:- If using a subscription – find the webhook URL on the corresponding subscription page.
- If not – use the URL from the webhook page.