Triggers

Webhook Triggers

Copy page

Create webhook endpoints that let external services invoke your agents via HTTP

Webhook triggers give you an HTTP endpoint that external services — like GitHub, Zendesk, Stripe, or PagerDuty — can POST to.

Incoming payloads are validated, transformed into a message, and used to start a new conversation asynchronously.

Create a webhook trigger

Open the triggers page

Navigate to your project and select Triggers in the left sidebar, then choose the Webhooks tab.

Triggers menu item in the left sidebar

Start a new trigger

Click New Webhook Trigger. Select the agent you want the trigger to invoke, then click Continue.

Webhooks tab with the New Webhook Trigger button

Configure and save

Fill in the trigger settings described below, then click Create Trigger.

Trigger configuration form with name, message template, and authentication fields

Verify the trigger

The new webhook URL appears in the webhooks tab — copy it into your external service's webhook configuration.

Webhooks tab with the new webhook URL

Configuration reference

Required fields

FieldDescription
NameHuman-readable identifier (e.g., "GitHub Issues" or "Stripe Payments")
Message TemplateConverts the webhook payload into a message for the agent. Uses {{placeholder}} syntax for interpolation (e.g., New issue: {{issue.title}} by {{issue.user.login}})

Optional fields

FieldDescription
DescriptionExplains what the trigger does
EnabledToggle on to activate immediately after creation
Input SchemaJSON Schema to validate incoming payloads — rejects requests that don't match
AuthenticationOne or more custom headers with expected values (see Authentication)
Signing SecretHMAC-SHA256 secret for signature verification (GitHub, Stripe, Slack)
Output TransformReshape payloads before interpolating the message template (see Payload transformation)
Run As UserExecute the trigger as a specific user to access their connected credentials (see User-scoped execution)

Message templates

Templates use {{placeholder}} syntax to pull values from the (optionally transformed) payload. Nested properties use dot notation:

New order received:
- Order ID: {{order.id}}
- Customer: {{customer.name}} ({{customer.email}})
- Total: ${{order.total}}

Please process this order and send a confirmation.

When the trigger fires, the agent receives a multi-part message: a text part generated from the template and a data part containing the full structured payload.

Authentication

Triggers support flexible header-based authentication. Configure one or more headers that every incoming request must match:

ApproachWhen to use
Custom header (e.g., X-API-Key)Simple API key verification
Authorization: Bearer <token>OAuth-style authentication
Multiple headersCombined verification (e.g., API key + client ID)
Signing secret onlyServices that sign requests (GitHub, Stripe, Slack)
No authenticationPublic endpoints (use with caution)
Note
Note

Header values are securely hashed before storage — original values are never persisted. For services that sign webhooks, you can rely on the signing secret alone for security.

Payload transformation

Transform incoming payloads before they reach the message template. Choose one approach:

ApproachBest forComplexity
Object TransformationSimple field remappingLow
JMESPathFiltering arrays, conditional logic, complex restructuringHigh

Object Transformation maps input fields to output fields. For example, mapping payload.user.display_nameuserName and payload.action.typeactionName.

JMESPath uses a full query language for advanced cases. For example, { activeUsers: join(', ', users[?active==true].name) } filters an array and joins the results. See jmespath.org for the full specification.

Tip
Tip

Object Transformation is converted to JMESPath under the hood. Start with object transformation and switch to JMESPath only when you need filtering, conditionals, or array operations.

User-scoped execution

By default, webhook triggers run without a user identity — tools requiring user-scoped credentials are skipped. Setting Run As User makes the trigger execute as a specific user, enabling access to their connected credentials (e.g., per-user OAuth tokens for GitHub, Slack, or Jira).

When a run-as user is set, agents automatically use that user's profile timezone for time-aware responses.

How webhooks are processed

  1. An external service sends an HTTP POST to the trigger's webhook URL
  2. Authentication headers or signing secret are verified
  3. The payload is validated against the input schema (if configured)
  4. The payload is transformed using the output transform (if configured)
  5. The message template is interpolated with the (transformed) payload
  6. The webhook returns 202 Accepted immediately
  7. The agent processes the message asynchronously in a new conversation

Monitor invocations

View invocations from the trigger's dropdown menu to monitor activity, debug failures, and audit usage.

Select view invocations

Every webhook invocation is tracked with:

FieldDescription
Statuspendingsuccess or failed
Request PayloadThe original webhook body
Transformed PayloadThe payload after output transformation
Conversation IDLinks to the conversation the invocation created
Error MessageDetails if the invocation failed

Next steps