Tutorials
Guided walkthroughs to build production workflows.
1. Trigger: Model Signals
Goal: Send a Welcome Email when a User model is created.
- Define Trigger:
json { "type": "signal", "config": { "model": "auth.User", "signal": "post_save", "condition": "created == true" // Only on create, not update } } - Add Action: Use the
smtp.sendorhttp.postconnector (e.g., to SendGrid).json { "action": "http.post", "config": { "url": "https://api.sendgrid.com/v3/mail/send", "headers": { "Authorization": "Bearer {{$secret.SENDGRID_KEY}}" }, "json": { "personalizations": [{"to": [{"email": "{{event.instance.email}}"}]}], "subject": "Welcome!" } } }
2. Trigger: Inbound Webhook (Stripe)
Goal: Provision access when a checkout.session.completed webhook arrives.
- Configure Ingestion:
Set up a generic webhook endpoint
/api/automate/webhooks/stripe/. Configure signature verification middleware insettings.py. - Define Rule:
json { "and": [ { "==": [{ "var": "type" }, "checkout.session.completed"] }, { "==": [{ "var": "data.object.payment_status" }, "paid"] } ] } - Add Action: Call your internal API to provision access.
3. Human-in-the-loop Approval
Goal: Require admin approval for refunds > $500.
- Step 1: Check value.
json { "if": [ { ">": [{ "var": "amount" }, 500] }, "needs_review", "auto_approve" ] } - Step 2 (Branch: needs_review): Send Slack notification with "Approve" button.
- Step 3:
core.wait_for_signal(Pause execution). The workflow suspends until a specific callback signal is received from the Slack interaction. - Step 4: Process Refund.
4. LLM Chaining
Goal: Summarize support ticket and suggest reply.
- Step 1:
llm.chat.- Prompt: "Summarize this ticket: {{event.payload.description}}"
- Model:
gpt-4o
- Step 2:
llm.chat.- Prompt: "Draft a polite reply based on this summary: {{step.1.output.text}}"
- JSON Schema: Enforce output structure
{"subject": "...", "body": "..."}.
- Step 3: Save draft to Zendesk/Freshdesk via HTTP.