How to Trigger an Integration Flow when an Event happens in Your App
Often the simplest way to set up an integration is to trigger it when something happens in your app. This is achieved by configuring an App Event and using an App Event Trigger in your Flow.

Setting up App Event

To create an App Event, got to the App Events page in Console and click "Create New". You'll need to provide its name and a Data Schema. The simplest way to do it is to copy an example of the event's data in JSON or YAML format, paste it into the "Example" tab, and generate schema from the example.
You can edit the schema manually if you want to specify advanced options such as possible values for some fields.
Now you can send app events to the platform and they will be displayed on the "App Events" tab of the "Activity Log" page. There are two ways to trigger App Event:
  1. 1.
    Global Webhook
  2. 2.
    User Subscriptions

Using Global Webhook

You should use Global Webhook if it is simple for you to add one place in your code that will send events to the platform. Simply go to the "Global Webhook" tab of the App Event configuration, copy the URL and make a POST request to it.
As soon as you send the request, you should see the app event logged on the "Activity Log" page.

User ID in Event Data

For integration.app to know which user the event belongs to, you need to provide user id somewhere in the event data. Make sure that the field you add user id to is represented in the Event's schema and select it in the "User ID" setting of the Global Webhook:
To verify that it works, send an example event associated with your Test User's id and check that App Event was associated correctly on the "Activity Logs" page.

Using User Subscriptions

If you don't want to send every event to integration.app, and instead want to subscribe individual users to their events, use the "Subscriptions" tab of the App Event Type configuration:
Whenever a user creates a Flow Instance that uses this App Event Type for the first time, integration.app will send an HTTP request you configured. You should use User and webhookUri variables in the request. User will contain a way for you to authenticate the request (usually an API Key), and webhookUri gives you a callback to send events to.
When your application sends requests to webhookUri, they will be interpreted as events of this type associated to the user that was subscribed. Each user will have an unique webhookUri.
You can see the list of individual user subscriptions and their status on the "Subscriptions" tab of the App Events page:

Using App Event Trigger

For App Events to trigger your integration flow, add the App Event Trigger to it:
When configuring the App Event Trigger, select the App Event Type you want to use, and optionally configure filters using the event's Data Schema:
If you use the filter, only events with data matching the filter will run the flow.
Copy link
Outline
Setting up App Event
Using Global Webhook
User ID in Event Data
Using User Subscriptions
Using App Event Trigger