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

# Plain webhooks

> Receive and verify Plain webhooks with Trigger.dev. Check the HMAC-SHA256 signature in plain-request-signature and run a task for each Plain event, filtered on event.type.

**`webhooks.plain()` verifies the HMAC-SHA256 signature Plain sends in `plain-request-signature` on every request.**

```ts /trigger/plain.ts theme={"theme":"css-variables"}
import { webhook, webhooks } from "@trigger.dev/sdk";

export const plain = webhooks.endpoint.define({
  id: "plain",
  source: webhooks.plain(),
});

export const plainEvents = webhook({
  id: "plain-events",
  endpoint: plain,
  filter: "event.type == 'thread.thread_created'",
  onEvent: async ({ event }) => {
    console.log(event);
  },
});
```

| Setting | Value |
| - | - |
| Source | `webhooks.plain()` |
| Verification | HMAC-SHA256 in `plain-request-signature` |
| Credential | Signing secret issued by Plain |
| Event type | `event.type` |
| Plain docs | [Plain webhook docs](https://www.plain.com/docs/webhooks) |

## Set up Plain

1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
2. As a workspace admin, view or generate the request signing secret under **Settings > Request signing**. It is one secret for the whole workspace, so read the existing one if other webhook targets use it.
3. Choose **Set signing secret** on the Trigger.dev endpoint and paste it.
4. Add the target under **Settings > Webhooks > Add webhook target**, with the webhook URL and the events your subscribers need.
5. Send a test event from Plain, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](https://trigger.dev/docs/webhooks/connect.md#verify-the-connection) if nothing arrives.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.