Using Triggers
Triggers act as a notification system for your AI applications, enabling your agents to respond dynamically to external events occurring within your apps.
When these events take place, triggers capture relevant information and deliver structured payloads directly to your system, letting you build agents that respond proactively.
Prerequisites
Before proceeding, ensure you’ve created an auth config and established a connection to an app (e.g., Slack, GitHub).
Creating a trigger
Head to any app that supports triggers, such as Slack in the dashboard and enable the trigger of choice.
Dashboard
SDK

In some cases, triggers require certain configuration to set the correct events. You can inspect and add these properties while enabling the triggers.
The dashboard will show you the trigger configuration to fill in.

The triggers page will show you all the triggers that are enabled for your account.
Subscribing to triggers
The typical and recommended way to subscribe to triggers is through webhooks.
To receive trigger events via webhooks, you need to configure a publicly accessible URL where Composio can send the event payloads. This URL should point to an endpoint in your application that can process incoming webhook requests.
Use ngrok/webhook.site for local dev!
During development, you can use ngrok/webhook.site or other services to expose your local server to the internet.

Below are some examples of how to listen in on trigger events for a FastAPI/Next.js application.
Trigger payload types
When subscribing to triggers, it is helpful to know the payload type received from the trigger. You can inspect the payload type by fetching the trigger type.
Prototyping triggers during development
During development, you may not have a proper webhook setup — so you can subscribe to triggers directly through the SDK.
You subscribe to multiple trigger events by configuring the filters. When you specify multiple filters, ALL of them must match for the trigger to be subscribed to.
This method uses WebSocket to subscribe to the trigger.
Enabling/Disabling triggers
In cases where the trigger isn’t required for the system, it can be disabled.
If needed, the trigger can be enabled again.
Troubleshooting
If you encounter issues with triggers or webhook listeners, you can use the Composio dashboard to inspect detailed trigger logs. The dashboard allows you to review event payloads, identify errors, and manually resend events for testing purposes.
Access the trigger logs here.
