Webhook trigger

A URL that starts the agent when something posts to it: copy it, send a test, then see each delivery and replay one.

Loading preview…

Install

  1. 1

    Run this command in your Tailwind CSS project. It adds components/ai/webhook-trigger-setup.tsx and installs its dependencies.

    $ npx shadcn@latest add https://gradientdeck.com/ai-components/r/webhook-trigger-setup.json

Usage & API

Example

webhook-trigger-setup.tsx
import { WebhookSetup } from "@/components/ai/webhook-trigger-setup"

<WebhookSetup
  name="…"
  url="…"
  secret="…"
  onRegenerateSecret={() => {}}
  test={test}
  onSendTest={() => {}}
  onCancelTest={() => {}}
  mappings={[]}
/>

Props WebhookSetup

PropType & descriptionRequired
namestringRequired
urlstringRequired
secretstringRequired
onRegenerateSecret() => voidRequired
testWebhookTestRequired
onSendTest() => voidRequired
onCancelTest() => voidRequired
mappingsInputMapping[]Required
onOpenRun(run: string) => voidOptional

Dependencies

  • React
  • Tailwind CSS
  • motion
  • lucide-react
Implementation notes

Setup shows the endpoint URL with a copy button, and the method POST. The signing secret is masked, with show, copy, and regenerate. Regenerate opens a confirm step before onRegenerateSecret. Send a test calls onSendTest. While listening, the card counts seconds and can be cancelled. When a request has been received it shows the status, the timing, the size, the body pairs and a link to the run if you pass onOpenRun. What the agent gets lists each mapping: the incoming field, the agent input or Not used, and the sample value. The preview uses a deploy-finished event.

Choosing a layout

Use setup when someone is connecting another system and needs the URL, the secret and proof that a test post landed. Use deliveries when the endpoint is already live and the question is why a particular post did not start a run, or how to send that same body again. The two are the same webhook at different moments.

The index of every trigger, including this one, is the trigger list, whose activity log is a thinner history across kinds. An app event with conditions, such as a pull request opening, is the event trigger, and the picker there even points people at webhooks for anything that is not one of those events. This screen is only the URL and its posts.

Does regenerating the secret invalidate the old one inside this component?

Regenerate calls onRegenerateSecret after the confirm step, and the field shows whatever secret string you pass next. The component does not remember the previous value or notify senders. Copy reads the current string to the clipboard.

What is the difference between replay and retry now?

Replay confirms, then calls onReplay with the delivery, and a new row can point back at the original with replayOf. Retry now calls onRetryNow, meant for a delivery that already has a later attempt scheduled. Ignoring a delivery is an outcome you set, not a button.