Dexby

Triggers and webhooks

Get signed events on your server when something happens in a user's app or your project.

A webhook endpoint is a URL on your server. Dexby posts project events to it, signed with the Standard Webhooks scheme. A trigger listens for one event, such as a new Slack message, on one user's connection and forwards it to your webhooks.

Add a webhook endpoint

In the dashboard, open Configure → Webhooks, click Add endpoint, enter a public https URL, and pick events. Copy the signing secret (whsec_...). It is shown once.

Verify each delivery

webhook.ts
import { Webhook } from 'standardwebhooks'

const webhook = new Webhook(process.env.DEXBY_WEBHOOK_SECRET ?? '')

export async function POST(request: Request) {
	const body = await request.text()
	const event = webhook.verify(body, Object.fromEntries(request.headers)) // throws if forged
	console.log(event)
	return new Response(null, { status: 204 })
}

Answer 2xx within 10 seconds. Anything else is retried for about two days. webhook-id stays the same on every retry, so use it to drop duplicates.

Create a trigger

Connect a WooCommerce account for the user before creating this order.created trigger.

trigger.ts
import { Dexby } from '@dexby.ai/sdk'

const dexby = new Dexby()

const trigger = await dexby.createTrigger({
	connectionId: '<connection-id>',
	event: 'order.created'
})
if (trigger.isErr()) throw new Error(trigger.error.message)
  • <connection-id>: the user's connected WooCommerce account, from Operate → Connections → open the account → Connection ID, or GET /v1/connections?userId=user_123.
  • event: an event the app supports (table below). Or create the trigger in Operate → Triggers → New trigger, which lists them.

Events then arrive as trigger.fired, with data.userId set to your user. Pass that id when creating the agent's session so it uses that user's connected accounts.

Apps with triggers

AppEventsSetup
ShipStationtrack, fulfillment_shipped_v2, fulfillment_rejected_v2, batchAutomatic
Slackmessage, app_mention, reaction_addedManual
Telegrammessage, edited_message, channel_post, callback_queryAutomatic
WooCommerceorder.created, order.updated, product.created, product.updated, customer.createdAutomatic

Manual (Slack): pass secret (your Slack app's Signing secret). The response has a url, shown once. Paste it as the Request URL under Event Subscriptions in your Slack app, and subscribe to the bot event.

Events

EventWhendata
trigger.firedA trigger received an event.triggerId, connectorId, event, userId, connectionId, eventId, receivedAt, payload
connection.createdA user connected an account.connectionId, connectorId, userId, name
connection.deletedAn account was removed and its credential erased.connectionId, connectorId, userId
connection.reauth_requiredAn account needs reconnecting.connectionId, connectorId, userId
execution.failedA tool run failed.toolId, connectorId, userId, errorCode
mcp_server.tools_changedAn MCP server's tools changed.server, toolCount

For a global account, the connection.* events carry "userId": null and "global": true.

Every delivery has the shape { "type", "timestamp", "data" }. Payloads never include tool input or output, except the app's own payload in trigger.fired.

On this page