Monitoring Connected Accounts via Webhooks
Learn how to configure and utilize Admin Webhooks for real-time notifications about connected account activities in your integration.
Configuring Your Webhook
Set Up Your Webhook URL in Composio
- Navigate to your Composio dashboard
- Access the “Settings” section
- Locate and click on “Events and Triggers”
- In the “Admin Event Webhook URL” field, input your designated URL
- Confirm by clicking the “Update” button
Install Required Packages
Implement the Webhook Receiver
Understanding the Webhook Payload
The Admin Webhook delivers a rich JSON payload containing vital information about connected account activities. Let’s explore a sample payload to understand its structure and the data it provides.
Sample Payload: Slack Connection Initiation
Key Insights from the Payload
- Event Type: The
body.type
field is crucial, indicating the specific activity occurring. In this example,"connected_account.add.start"
signifies the initiation of a new connection. - Application Details: The
body.data.app_name
field reveals which application the user is connecting to, in this case, “slack”. - Integration Information:
body.data.integration_name
provides the name you’ve assigned to this particular integration within your Composio setup.
Event Lifecycle
It’s important to note that the webhook system provides updates throughout the connection process. While this example shows a connected_account.add.start
event, you’ll receive a subsequent event with the type connected_account.add.completed
once the connection is successfully established. This allows you to track the full lifecycle of user connections and respond accordingly at each stage.
Leveraging Admin Webhooks
With this real-time data at your fingertips, you can:
- Monitor User Onboarding: Track when and how users are connecting to your integration.
- Enhance User Experience: Provide immediate feedback or assistance to users as they interact with your integration.
- Troubleshoot Issues: Quickly identify and respond to any connection problems or anomalies.
Was this page helpful?