Using Triggers

Managing triggers

Markdown

Listing active triggers

List trigger instances that have been created. Results are cursor-paginated.

from composio import Composio

composio = Composio()

active = composio.triggers.list_active(
    connected_account_ids=["ca_def456"],
)

for trigger in active.items:
    print(f"{trigger.id} ({trigger.trigger_name}) - disabled_at={trigger.disabled_at}")

# Paginate with cursor
if active.next_cursor:
    next_page = composio.triggers.list_active(cursor=active.next_cursor)
import { Composio } from '@composio/core';

const composio = new Composio();

const active = await composio.triggers.listActive({
  connectedAccountIds: ['ca_def456'],
});

for (const trigger of active.items) {
  console.log(`${trigger.id} (${trigger.triggerName}) - disabled: ${trigger.disabledAt !== null}`);
}

// Paginate with cursor
if (active.nextCursor) {
  const nextPage = await composio.triggers.listActive({ cursor: active.nextCursor });
}
FilterDescription
connected_account_ids / connectedAccountIdsArray of connected account IDs
trigger_ids / triggerIdsArray of trigger instance IDs
trigger_names / triggerNamesArray of trigger type slugs
auth_config_ids / authConfigIdsArray of auth config IDs
show_disabled / showDisabledInclude disabled triggers (default: false)

Enable / Disable triggers

Pause a trigger temporarily without deleting it:

# Disable a trigger
composio.triggers.disable(trigger_id="ti_abcd123")

# Re-enable when needed
composio.triggers.enable(trigger_id="ti_abcd123")
// Disable a trigger
await composio.triggers.disable('ti_abcd123');

// Re-enable when needed
await composio.triggers.enable('ti_abcd123');

You can also toggle triggers from the dashboard:

  1. Go to Auth Configs and select your auth config
  2. Navigate to Active Triggers
  3. Toggle the trigger on or off
Enable/disable triggers from the dashboard
Enable/disable triggers from the dashboard

Deleting triggers

Permanently remove a trigger instance:

composio.triggers.delete(trigger_id="ti_abcd123")
await composio.triggers.delete('ti_abcd123');

Deleting a trigger is permanent. Use disable() instead to temporarily stop receiving events.