ts/examples/triggers/README.md
This example demonstrates how to use Composio SDK for triggers.
Install dependencies:
pnpm install
Configure environment:
cp .env.example .env
Then edit .env and add your API keys:
COMPOSIO_API_KEY: Get it from Composio DashboardCOMPOSIO_WEBHOOK_SECRET: Get it from your webhook configuration in Composio Dashboard# Run the subscription example
pnpm start
# Run in development mode (with file watching)
pnpm dev
# Start the webhook verification server
pnpm webhook:server
# Then expose it with telebit (https://telebit.cloud/)
telebit http 3000
src/index.ts - Trigger Subscriptionsrc/webhook-server.ts - Webhook VerificationverifyWebhook APIWhen receiving webhooks, the following headers are used:
webhook-id: Unique message ID (format: msg_xxx)webhook-timestamp: Unix timestamp in secondswebhook-signature: Signature in format v1,base64EncodedSignatureEdit src/index.ts or src/webhook-server.ts to: