Triggers
Webhooks
Webhooks expose functions as HTTP endpoints. When a request arrives at a webhook path, Sinas executes the linked function with the request data.
Key properties:
Property | Description |
|---|---|
| URL path (e.g., |
| GET, POST, PUT, DELETE, or PATCH |
| Target function |
| Whether the caller must provide a Bearer token |
| Default parameters merged with request data (request takes priority) |
How input is extracted:
POST/PUT/PATCHwith JSON body → body becomes the inputGET→ query parameters become the inputDefault values are merged underneath (request data overrides)
Example:
Endpoints:
Schedules
Schedules trigger functions or agents on a cron timer.
Key properties:
Property | Description |
|---|---|
| Unique name (per user) |
|
|
| Function or agent to trigger |
| Standard cron expression (e.g., |
| Schedule timezone (default: |
| Input passed to the function or agent |
| Message content (agent schedules only) |
For agent schedules, a new chat is created for each run with the schedule name and timestamp as the title.
Endpoints:
Database Triggers (CDC)
Database triggers watch external database tables for changes and automatically execute functions when new or updated rows are detected. This is poll-based Change Data Capture — no setup required on the source database.
How it works:
A separate CDC service polls the configured table at a fixed interval
It queries rows where
poll_column > last_bookmark(e.g.,updated_at > '2026-03-01T10:00:00')If new rows are found, they are batched into a single function call
The bookmark advances to the highest value in the batch
On first activation, the bookmark is set to
MAX(poll_column)— no backfill of existing data
Key properties:
Property | Description |
|---|---|
| Unique trigger name (per user) |
| Which database connection to poll |
| Database schema (default: |
| Table to watch |
|
|
| Function to execute when changes are detected |
| Monotonically increasing column used as bookmark (e.g., |
| How often to poll (1–3600, default: |
| Max rows per poll (1–10000, default: |
| Enable/disable without deleting |
| Current bookmark (managed automatically) |
| Last error, if any (visible in UI) |
The poll_column must be a column whose value only increases — timestamps, auto-increment IDs, or sequences. The column type is detected automatically and comparisons are cast to the correct type.
Function input payload:
When changes are detected, the target function receives all new rows in a single call:
If a poll returns zero rows, no function call is made.
Error handling: On failure, the trigger logs the error to error_message and retries with exponential backoff (up to 60 seconds). The trigger continues retrying until deactivated or the issue is resolved.
Limitations:
Cannot detect
DELETEoperations (poll-based limitation)Changes are detected with a delay equal to the poll interval
The
poll_columnmust never decrease — resetting it will cause missed or duplicate rows
Endpoints:
Declarative configuration:
Previous
storage