Skip to Content
ProvidersBuilt-in providers

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.

/trigger/plain.ts
import { ,  } from "@trigger.dev/sdk";

export const plain = ..define({
  : "plain",
  : .plain(),
});

export const plainEvents = ({
  id: "plain-events",
  : plain,
  : "event.type == 'thread.thread_created'",
  : async ({  }) => {
    .();
  },
});
SettingValue
Sourcewebhooks.plain()
VerificationHMAC-SHA256 in plain-request-signature
CredentialSigning secret issued by Plain
Event typeevent.type
Plain docsPlain webhook docs

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 if nothing arrives.

Was this page helpful?

Last updated

Edit on GitHub

On this page