webhook

Schema Definition

type: object
required:
  - type
  - name
properties:
  type:
    type: string
    enum: [webhook]
    description: Block type identifier
  name:
    type: string
    description: Display name for this webhook block
  inputs:
    type: object
    properties:
      webhookConfig:
        type: object
        description: Webhook configuration settings
        properties:
          enabled:
            type: boolean
            description: Whether the webhook is active
            default: true
          secret:
            type: string
            description: Secret key for webhook verification
          headers:
            type: array
            description: Expected headers for validation
            items:
              type: object
              properties:
                key:
                  type: string
                  description: Header name
                value:
                  type: string
                  description: Expected header value
          methods:
            type: array
            description: Allowed HTTP methods
            items:
              type: string
              enum: [GET, POST, PUT, DELETE, PATCH]
            default: [POST]
      responseConfig:
        type: object
        description: Response configuration for the webhook
        properties:
          status:
            type: number
            description: HTTP status code to return
            default: 200
            minimum: 100
            maximum: 599
          headers:
            type: array
            description: Response headers
            items:
              type: object
              properties:
                key:
                  type: string
                  description: Header name
                value:
                  type: string
                  description: Header value
          body:
            type: string
            description: Response body content
  connections:
    type: object
    properties:
      success:
        type: string
        description: Target block ID for successful webhook processing
      error:
        type: string
        description: Target block ID for error handling

Connection Configuration

Connections define where the workflow goes based on webhook processing:

Examples

Basic Webhook Trigger

Slack Event Webhook

Payment Webhook (Stripe)

Generic API Webhook

Multi-Method Webhook

Webhook Variables

Inside webhook-triggered workflows, these special variables are available:

Output References

After a webhook processes a request, you can reference its data:

Security Best Practices

  • Always use webhook secrets for verification

  • Validate expected headers and methods

  • Implement proper error handling

  • Use HTTPS endpoints in production

  • Monitor webhook activity and failures

  • Set appropriate response timeouts

  • Validate payload structure before processing

Was this helpful?