Backends & Data
Scheduled flows and backend logic for your app
Backends let an app run code on a schedule in start.chat’s cloud. They’re the bridge between external services and your workspace — fetching data, processing webhooks, sending notifications, and keeping everything in sync without anyone lifting a finger.
Most apps use suggestedFlowsAndBlocks inside createApp() to seed
install-time automation threads. Suggested flows can run actions on a schedule
and call your existing actions. A standalone backend export is for custom scheduled logic
that doesn’t fit into the action model (e.g. multi-step syncs, cursor-based
pagination, or work that spans several data calls).
Defining a backend
Export a backend object from your app with a schedule and a run function:
The runsEvery property accepts intervals from '10 seconds' up to '1 day'.
The run function receives a context object with the tools described below.
Run context
| Property | Description |
|---|---|
tools | APIs for data, messaging, AI, and more |
options | User-configured app options |
controller | Abort controller for cancellation |
oauthToken | OAuth token if the app uses OAuth |
See Tools API for the complete tools reference.
Sandbox
Backends run in a sandboxed environment with access to fetch, timers,
URL/URLSearchParams, console, Buffer, TextEncoder/TextDecoder,
btoa/atob, and the Web Crypto API. No direct filesystem access — all
external communication goes through fetch.
Example
A backend that syncs GitHub repositories and sends a workspace notification: