Webhook Triggers

Webhook triggers let external systems start runs via HTTP POST. Three types:

TypeWhat it triggersPayload
Task webhookRuns a pre-created taskOptional JSON body (task has its own instructions)
Agent webhookStarts a new dynamic runRequires {"message": "..."} in body
App triggerRuns a task on app eventsAutomatic, Composio delivers event data

Rule of thumb: same work every time → task webhook. Different message per trigger → agent webhook. A connected app should fire it (e.g. "on every GitHub push") → app trigger.

Task Webhooks

Attach a webhook trigger to a task, then POST to the generated URL to run it:

Python

Any system can now trigger it. The body is optional; the task already has its instructions:

Disable the webhook when you no longer need it; if the URL leaked, re-enabling rotates it (fresh token, old URL dead):

Python

Agent Webhooks

Enable a webhook directly on an agent. Each POST creates a new run with the message you provide:

Python

Important: The webhook URL contains a secret token and is only shown once. Store it securely.

POST a JSON body with a message field; the agent processes it with its configured instructions and tools:

App Triggers

App triggers start task runs when events occur in your connected apps (GitHub, Slack, ...). No webhook URL management: connect the app, pick an event, and Composio delivers it.

Python

When the event fires, the task runs with the event data injected into its instructions. If the app is disconnected or the connection expires, its triggers are disabled automatically.

Prerequisite: The app must be connected first via client.apps.connect() or the dashboard.

Managing Triggers

Python
When to use which: example scenarios
Use CaseType
Automated report on a schedule + manual triggerTask webhook
CI/CD pipeline triggers a fixed analysisTask webhook
Slack/Discord bot forwards messagesAgent webhook
Customer support system routes ticketsAgent webhook
Run task on every GitHub pushApp trigger
Process new Slack messages automaticallyApp trigger
React to CRM events (new deal, updated contact)App trigger
Deduplication: retried deliveries

Include an X-M8tes-Event-Id header so a retried delivery doesn't start a duplicate run:

Python

Next: Scheduling · Email Inbox · Webhook Events

Was this page helpful?