Apps: Adding logic to your app
Automations
Run a backend function on a schedule or whenever records are created, updated or deleted.
Run a backend function on a schedule or whenever records are created, updated or deleted.
Automations run one of your backend functions without anyone clicking anything.
| Trigger | Example |
|---|---|
| Schedule | "Every morning, email me yesterday's new orders." Runs every 5 minutes to every 7 days. |
| Data change | "When a booking is created, send the guest a confirmation." Runs on create, update and/or delete of a table. |
Describe what you want in the chat; Draftship writes the function and the automation file in draftship/automations/.
Dashboard → Automations lists each automation with its trigger, last run and result. Run now triggers it immediately; the Enabled switch pauses it. Every run is recorded in Logs, including the function's response when it fails.