---
title: "Event Handlers"
description: "Trigger-based runs of workflows and resources from tables, mail, and WhatsApp."
canonical_url: "https://docs.vettero.com/build/event-handlers"
---
# Event Handlers

> Trigger-based runs of workflows and resources from tables, mail, and WhatsApp.

**Event handlers** are workspace triggers. When an emitter fires — a [table](https://docs.vettero.com/data/tables) change, Gmail, Drive, or WhatsApp — Vettero runs either a **handler workflow** or a **mapped** existing resource (agent, workflow, function, query, or chat widget).

Inbound HTTP APIs live under **HTTP Servers**, not this menu. Recurring cron lives under **Schedule** (Repetitive), not this menu.

They are not [channels](https://docs.vettero.com/build/channels) (inbound chat sessions with a default agent). They are not [Schedule](https://docs.vettero.com/activity/schedule) one-time datetime or timeout jobs.

Prefer **Free-form workflow** unless a single existing resource is enough and you do not need extra blocks.

## Triggers

See **Triggers** for the full list of event types (table changes, mail, and WhatsApp). Types that need a [connected service](https://docs.vettero.com/integrations/third-party-services/providers) appear in the product only when a matching connection exists.

## When to use

- Automate when table rows are inserted, updated, deleted, archived, or when a field changes or a field action fires
- Handle inbound Gmail, Drive file changes, or WhatsApp in a flow instead of (or alongside) a channel default agent

## Create an event handler

Open **Build → Event handlers** (workspace-wide) or the **Event handlers** panel on an [agent](https://docs.vettero.com/build/agents) or assistant (scoped to that agent). Click **Create event**.

The wizard walks through:

1. **Event type** — pick from the grid. Types that need a [connected service](https://docs.vettero.com/integrations/third-party-services) appear only when a matching connection exists.
2. **Name and description** — required name so the handler is easy to find.
3. **Payload** — type-specific config (table, mailbox, and so on).
4. **Run condition** — optional filter on event args, or skip so the handler always runs.
5. **Handler mode** — **Free-form workflow** or **Linear resource mapping**.
6. **Mapping target** (mapping mode only) — pick an agent, workflow, function, query, or chat widget, then map inputs and, when the emitter needs a response, outputs.

After create, the detail view opens for that handler.

## Configure the handler

<table>
<thead>
  <tr>
    <th>
      Section
    </th>
    
    <th>
      What you configure
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Name
      </strong>
      
       / <strong>
        Description
      </strong>
    </td>
    
    <td>
      Identity in lists and Studio
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Enabled
      </strong>
    </td>
    
    <td>
      Active handlers run; inactive ones do not
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Payload
      </strong>
    </td>
    
    <td>
      Emitter config (and, for HTTP, the webhook URL)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Run condition
      </strong>
    </td>
    
    <td>
      Optional filter on event args; empty means always run
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Handler workflow
      </strong>
    </td>
    
    <td>
      Read-only canvas in workflow mode; open the flow in the builder to extend it
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Mapping
      </strong>
    </td>
    
    <td>
      Target resource, input mapping, and output mapping in mapping mode
    </td>
  </tr>
</tbody>
</table>

Delete from the danger zone. Soft-deleted handlers go to [Trash](https://docs.vettero.com/activity/trash).

## Handler modes

### Free-form workflow

Vettero creates a system-managed handler workflow. Extend it in the [workflow](https://docs.vettero.com/build/workflows) builder (query a table, send a notification, branch, and so on).

You cannot delete that flow as a normal workflow. Disable the handler or delete the event handler instead.

### Linear resource mapping

The handler invokes one existing resource on a fixed graph (main → resource → return). You cannot edit that graph as a free-form flow.

Map event input (`args.*`) into the resource’s input schema. When the emitter requires a response (for example HTTP wait-for-flow with validate response), map resource output (`res.*`) or event fields (`args.*`) into the emitter’s output shape.

## Run condition

Optional filter on event input. Paths are `args.*` from the emitter’s input schema (same fields you map in input mapping).

If there is no condition, the handler runs whenever the emitter fires and the handler is **Enabled**.

Changing payload (for example a different table) can change available `args.*` paths — re-check the condition after you save payload.

## Limits

- Inactive handlers do not run.
- Mapping-mode graphs are not freely edited in the workflow builder.
- System-managed handler workflows cannot be deleted as ordinary workflows.
- Payload changes can invalidate input mapping, output mapping, and run conditions.
- Service-backed types need a connected service with the matching capability enabled.

## Where event handlers are used

<table>
<thead>
  <tr>
    <th>
      Place
    </th>
    
    <th>
      How
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Build → Event handlers
      </strong>
    </td>
    
    <td>
      Workspace-wide list and detail
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Build → HTTP Servers
      </strong>
    </td>
    
    <td>
      Inbound HTTP APIs (not created here)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Activity → Schedule
      </strong>
    </td>
    
    <td>
      Recurring cron (not created here)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Runtime
      </strong>
    </td>
    
    <td>
      Table dispatcher, Gmail and WhatsApp inbound
    </td>
  </tr>
</tbody>
</table>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
