Automations
Automations are workflow-driven business processes that execute automatically in response to triggers like entity events, HTTP webhooks, or scheduled cron jobs. They allow you to build complex business logic without writing backend code.
What are Automations?
Automations define sequences of actions that execute when triggered:
- React to entity changes - When a customer is created, send a welcome email
- Expose webhook endpoints - External systems can trigger workflows via HTTP
- Schedule recurring tasks - Run nightly reports or monthly cleanups
- Chain multiple actions - Query data → Transform → Send notification → Update records
When you define an automation, Stack9 automatically:
- ✅ Registers the trigger (webhook, entity event, or schedule)
- ✅ Executes actions in sequence
- ✅ Handles errors and retries
- ✅ Logs execution history
- ✅ Manages async processing
Why Use Automations?
Traditional Approach
// Multiple files, scattered logic
app.post('/api/customer-created-webhook', async (req, res) => {
const customer = req.body;
await sendWelcomeEmail(customer);
await updateCRM(customer);
await notifySlack(customer);
res.json({ success: true });
});
Stack9 Automations
{
"key": "when_customer_created",
"triggerType": "afterCreate",
"entityKey": "customer",
"actions": [
{ "actionTypeKey": "send_welcome_email" },
{ "actionTypeKey": "update_crm" },
{ "actionTypeKey": "notify_slack" }
]
}
Benefits: