Savannah Cloud

Worker Templates

Built-in job types and custom handler patterns for Savannah Cloud workers.

Savannah Cloud includes a wide set of built-in workers, and you can also add custom handlers for application-specific logic.

Built-in job types

TemplateJob TypeKey payload fields
Send Emailsend_emailto, subject, body
Send SMSsend_smsto, message
Webhookwebhookurl, payload
Generate PDFgenerate_pdftemplate, data
Git Deploygit_deployrepo, branch
Stack Deploystack_deployproject, stack
ML Threat Checkml_checkpayload, type

Submit a job

curl -X POST http://localhost:8080/jobs \
  -H "X-API-Key: sc_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "ID": "email-001",
    "Type": "send_email",
    "Payload": {
      "to": "user@example.com",
      "subject": "Welcome to Savannah Cloud",
      "body": "Your account is ready."
    },
    "MaxRetries": 3
  }'

Custom worker patterns

Add a case in the worker switch and call your preferred downstream service.

case "send_email":
    to := payload["to"].(string)
    subject := payload["subject"].(string)
    body := payload["body"].(string)
    err = sendEmailViaResend(to, subject, body)

case "send_sms":
    to := payload["to"].(string)
    message := payload["message"].(string)
    err = sendSMS(to, message)

case "webhook":
    url := payload["url"].(string)
    data := payload["payload"]
    err = postWebhook(url, data)

This keeps job implementations decoupled from the API layer and gives you a clean place to extend the platform.


Retry behavior

  • MaxRetries: 0 → one attempt only
  • MaxRetries: N → retries on failure up to N times
  • failed jobs are recorded with logs and status
  • the dashboard exposes current attempts and error context

Built-in jobs are a good starting point, but custom domain-specific automation is supported by adding new handlers and registering new job Type values.

On this page