> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On webhook event

> Start an automation from any signed Discord HTTP Event Webhook event.

`discord.onWebhookEvent` receives every signed HTTP Event Webhook event selected in the Discord Developer Portal, including types without a dedicated semantic trigger.

```ts automations/route-discord-events.automation.ts theme={null}
import { automation } from "automate.ax"
import { discord } from "automate.ax/discord"

export default automation("Route Discord events", () => {
  const event = discord.onWebhookEvent()
  // Route the event by event.type and use event.timestamp for ordering.
})
```

## Options

Optional `account` selects the customer-managed Discord application. The payload includes `applicationId`, `type`, `timestamp`, `version`, and `data`. Data fields use camelCase for supported and unrecognized event types.

This trigger does not poll and does not receive Gateway events such as server messages or reactions.
