Automations

Automations for AI agent event flows.

Run versioned logic in the event path before your agent sees the event. Code Mode transforms normalize, redact, and shape a persisted dispatch snapshot for deterministic recovery.

Starter+ for delivery-path Automations. Enterprise for self-managed exact-host egress.

transform.js
Code Mode
export async function run(input) {
  const source = input.source.payload
  const event = source.payload ?? source

  return {
    type: "dispatch",
    body: {
      kind: event.type,
      tenant: source.webhook?.name,
      data: event.data,
      receivedAt: new Date().toISOString()
    }
  }
}

Event path

Logic runs before delivery, not inside every agent.

Automations sit between routing and dispatch. Your agent receives a stable output shape, while Hooksbase keeps the run ledger, logs, quotas, and replay behavior attached to the delivery pipeline.

01
Event accepted

HTTP, email, form, or schedule ingress is verified and persisted before delivery work starts.

02
Route on source truth

Routing rules choose the destination using the original payload, headers, content type, and provider metadata.

03
Automation runs

Code Mode transforms normalize, redact, or reshape the event and produce the dispatch snapshot.

04
Agent receives it

Your agent gets the versioned output. Retries and replays use the saved snapshot instead of re-running current code.

Why it matters

Keep agent context clean, versioned, and recoverable.

Normalize provider events

Turn Stripe, GitHub, Clerk, Slack, or custom webhook payloads into one stable agent input contract.

Redact before model context

Remove sensitive fields before the payload reaches the agent, queue, or downstream destination.

Version event-path logic

Upload immutable versions, activate deliberately, test with sample payloads, and inspect run history.

Observe the runtime

Use bounded logs, result previews, run exports, quota state, and Enterprise egress audit events.

Control plane

Dashboard for humans. API, SDK, and CLI for agents.

Author and inspect Automations in the dashboard, then use public routes, @hooksbase/sdk, or the hooksbase CLI when a coding agent or deployment script needs repeatable operations.

Enterprise egress

Outbound fetch stays explicit.

Default Automation egress is blocked. Starter, Pro, and Business can run Automations with default egress blocked unless Hooksbase support attaches a policy. Enterprise can self-manage exact-host egress policies and gateway credentials.

Exact host allowlists
Gateway-managed credentials
Per-run egress audit events