> ## Documentation Index
> Fetch the complete documentation index at: https://developers.zite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

> Workflows are an app's backend — typed server-side logic triggered by the app, a schedule, or a webhook.

A **workflow** is server-side logic that runs securely away from the browser. Anything the client shouldn't
do — elevated database access, calling a third-party API with a secret key, a nightly job — belongs in a
workflow.

Each workflow is one file in an app's `src/api/` directory, defined with `createEndpoint` and typed
Zod input/output. The frontend calls it through a generated, tRPC-like client. See the
[workflow reference](/framework/workflows) for the full API.

## Three triggers

| Trigger         | Config key  | Invoked by                                                                  | `context.user`     | Reference                                  |
| --------------- | ----------- | --------------------------------------------------------------------------- | ------------------ | ------------------------------------------ |
| HTTP / RPC      | — (default) | The app via `zitejs/api`, or publicly at `POST /public/{flowId}/api/{name}` | The signed-in user | [Workflow reference](/framework/workflows) |
| Scheduled       | `schedule`  | A cadence, or once at a future time                                         | `null`             | [Schedules](/framework/schedules)          |
| Inbound webhook | `webhook`   | An external POST to a secret URL                                            | `null`             | [Webhooks](/framework/webhooks)            |

Workflows run in an isolated cloud runtime — they use the database client, send email, call integrations
with securely-stored [secrets](/concepts/integrations-secrets), and enforce [permissions](/concepts/permissions)
on every database call.
