@devries-cameron20 / composio Mirror · read-only / commits / 409e7944a
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 23:30 UTC

docs(triggers): list composio.trigger.disabled in supported events; tighten changelog reasons table

- Add composio.trigger.disabled row to the Webhooks events table on the "Subscribing to triggers" page so the new event is discoverable alongside composio.trigger.message and composio.connected_account.expired. - Tighten the changelog's reasons table: describe subscription_auth_failure and subscription_refresh_failure on their own terms (rejected credentials vs. could not reach provider), drop retry-count internals. - Drop the redundant Handling section from the changelog; the table and the existing subscribing-to-events page cover routing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Anshu Garg committed Apr 22, 2026 at 22:41 UTC 409e7944afddf79b4e08e35500c871d769c72b91
2 files changed +6 -31
docs/content/changelog/04-22-26-trigger-disabled-event.mdx
+3 -29
@@ -13,8 +13,8 @@ The event is emitted only for platform-initiated disables. `data.disabled_reason
13 | `disabled_reason` | What it means |
14 |---|---|
15 | `connection_expired` | The connected account entered `EXPIRED` and the trigger was paused. Auto-re-enabled when the account returns to `ACTIVE`. |
16 -| `subscription_auth_failure` | Composio tried to refresh the provider-side webhook subscription and the provider rejected the credential. |
17 -| `subscription_refresh_failure` | Composio tried to refresh the provider-side webhook subscription and retries ran out. |
16 +| `subscription_auth_failure` | The provider rejected the credentials when Composio tried to refresh the webhook subscription. Re-auth the connection to resolve. |
17 +| `subscription_refresh_failure` | Composio could not reach the provider to refresh the webhook subscription (provider error, timeout, or network issue). Re-enable the trigger once the provider is healthy. |
18 | `polling_failure_in_composio_infra` | A polling trigger was reported unhealthy by Composio's polling infrastructure. |
19
20 The event does not fire when you disable a trigger yourself — neither through the trigger instance manage endpoint nor by deactivating the connected account with `PATCH /api/v3/connected_accounts/{nanoid}/status`.
@@ -65,30 +65,4 @@ The event is V3-only. Subscriptions on V1 or V2 payloads cannot enable it.
65
66 `user_id` is `null` on triggers from toolkits that do not require authentication. The `data` object mirrors the non-deprecated fields returned per item by `GET /api/v3/trigger_instances/active`, plus `disabled_reason`.
67
68 -## Handling
69 -
70 -Route on `type` alongside your existing handlers:
71 -
72 -```typescript
73 -type NextApiRequest = { body: any };
74 -type NextApiResponse = { status: (code: number) => { json: (data: any) => void } };
75 -// ---cut---
76 -export default async function webhookHandler(req: NextApiRequest, res: NextApiResponse) {
77 - const payload = req.body;
78 -
79 - if (payload.type === 'composio.trigger.disabled') {
80 - const { id, connected_account_id, trigger_name, disabled_reason } = payload.data;
81 -
82 - if (disabled_reason === 'connection_expired') {
83 - // Prompt the user to re-authenticate; the trigger re-enables on its own.
84 - } else {
85 - // subscription_auth_failure, subscription_refresh_failure, polling_failure_in_composio_infra
86 - // These do not auto-re-enable — inspect the trigger and re-enable once resolved.
87 - }
88 - }
89 -
90 - res.status(200).json({ status: 'ok' });
91 -}
92 -```
93 -
94 -For general webhook setup, see [subscribing to triggers](/docs/setting-up-triggers/subscribing-to-events); for re-auth flows on connection expiry, see [subscribing to connection expiry events](/docs/subscribing-to-connection-expiry-events).
68 +See [subscribing to triggers](/docs/setting-up-triggers/subscribing-to-events) for handler setup and [subscribing to connection expiry events](/docs/subscribing-to-connection-expiry-events) for re-auth flows on `connection_expired`.
docs/content/docs/setting-up-triggers/subscribing-to-events.mdx
+3 -2
@@ -6,12 +6,13 @@ keywords: [webhooks, subscribe, events, webhook payload, V3]
6
7 ## Webhooks
8
9 -Webhooks are the recommended way to receive trigger events in production. To start receiving events, create a webhook subscription with your endpoint URL and select which event types you want to receive. You can subscribe to one or both:
9 +Webhooks are the recommended way to receive trigger events in production. To start receiving events, create a webhook subscription with your endpoint URL and select which event types you want to receive. You can subscribe to any combination:
10
11 | Event type | Description |
12 |------------|-------------|
13 -| `composio.trigger.message` | Fired when a trigger receives data from an external service |
13 +| `composio.trigger.message` | Fired when a trigger receives data from an external service. |
14 | `composio.connected_account.expired` | Fired when a connected account expires and needs re-authentication. See [Subscribing to connection expiry events](/docs/subscribing-to-connection-expiry-events). |
15 +| `composio.trigger.disabled` | Fired when Composio automatically disables a trigger (expired connection, webhook refresh failure, or unhealthy polling). Not fired when you disable a trigger or its connected account yourself. |
16
17 Set your webhook URL in the [dashboard settings](https://platform.composio.dev?next_page=/settings/webhook) or via the [Webhook Subscriptions API](/reference/api-reference/webhooks):
18