Hookbase
Docs
GuideAPI ReferenceIntegrationsUse CasesCLIMCP
Getting StartedSDK ReferencePortal ComponentsAPI Reference
Get Started

Getting Started

IntroductionQuick StartBest PracticesPipeline Architecture

Core Concepts

SourcesDestinationsRoutes

Advanced Features

TransformsAI TransformsFiltersSchemasDeduplicationCustom DomainsTunnelsCron JobsScheduled Sends

Enterprise Security

OverviewCircuit BreakerFailover DestinationsIP FilteringStatic IP DeliveryNotification ChannelsObservability ExportField EncryptionAudit Logs

Kubernetes

Operator GuideCRD ReferenceHelm Chart

Operations

Plans & LimitsProduction ReadinessTroubleshootingTestingComparison
DocsReceiveGuideAi Transforms

AI-Powered Transform Generation

Generate transform code from natural language descriptions using Hookbase's built-in AI.

Overview

Instead of writing JSONata, JavaScript, or Liquid transforms from scratch, describe what you want in plain English and let AI generate the code for you.

Available on: Starter, Pro, and Business plans.

How It Works

  1. Click AI Generate in the Transforms page
  2. Describe what the transform should do
  3. Optionally provide a sample input payload
  4. Select the target language (JSONata, JavaScript, or Liquid)
  5. Review the generated code
  6. Apply it to a new or existing transform

Using the AI Generator

Via Dashboard

Navigate to Tools → Transforms and click the AI Generate button. Fill in:

FieldRequiredDescription
DescriptionYesPlain English description of the transform
Transform TypeYesJSONata, JavaScript, or Liquid
Sample InputNoExample webhook payload for better accuracy

Via API

curl -X POST https://api.hookbase.app/api/organizations/{orgId}/transforms/generate \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Extract customer email and order total from Stripe checkout.session.completed",
    "transformType": "jsonata",
    "sampleInput": {
      "type": "checkout.session.completed",
      "data": {
        "object": {
          "customer_email": "jane@example.com",
          "amount_total": 4999,
          "currency": "usd"
        }
      }
    }
  }'

The response is streamed via SSE:

data: {"type":"token","token":"{\n"}
data: {"type":"token","token":"  \"email\": $.data.object.customer_email,\n"}
data: {"type":"token","token":"  \"total\": $.data.object.amount_total / 100\n"}
data: {"type":"token","token":"}"}
data: {"type":"done","code":"{\n  \"email\": $.data.object.customer_email,\n  \"total\": $.data.object.amount_total / 100\n}","valid":true}

Example Prompts

Here are some effective prompts to try:

PromptLanguageOutput
"Extract email and name from a Stripe customer.created event"JSONata{ "email": $.data.object.email, "name": $.data.object.name }
"Convert Shopify order to a Slack message block"JSONataStructured Slack Block Kit payload
"Filter to only include items over $50 and sum their prices"JSONataFiltered and aggregated result
"Rename all snake_case keys to camelCase"JavaScriptJS transform with key mapping
"Format as an HTML email template with order details"LiquidLiquid template with HTML

Tips for Best Results

  • Be specific: "Extract customer email from Stripe checkout" works better than "get email"
  • Provide sample data: Including a sample payload dramatically improves accuracy
  • Specify the output shape: If you know what the output should look like, describe it
  • Iterate: Generate, review, and regenerate with a refined description if needed
  • Always review: AI-generated code should be tested before using in production

Rate Limits

AI transform generation is rate-limited to 10 requests per minute per organization.

See Also

  • Transforms Guide — Manual transform creation
  • Transforms API — Full API reference
  • Pipeline Architecture — How transforms fit in the pipeline
PreviousTransformsNextFilters

On this page

OverviewHow It WorksUsing the AI GeneratorVia DashboardVia APIExample PromptsTips for Best ResultsRate LimitsSee Also