Skip to content

Steps & actions

Steps are the individual actions a workflow performs. Each step is defined in JSON and can use data from the triggering event to customize its behavior.

Step types

Step typeDescription
Send notificationSend a message via Slack, PagerDuty, or email
Update incidentChange incident status, severity, or add a comment
Update status pageSet component status on a status page
Create ticketCreate a ticket in Jira, Linear, or GitHub Issues
HTTP requestSend an HTTP request to any external API
DelayWait for a specified duration before the next step
ConditionalBranch based on a condition

Defining a step

Each step is defined as a JSON object with a type and configuration:

json
{
  "type": "send_notification",
  "channel": "slack",
  "target": "#incidents",
  "message": "Incident {{incident.id}} declared as {{incident.severity}}: {{incident.title}}"
}

Template variables

Steps can reference incident data using {{variable}} syntax:

VariableDescription
{{incident.id}}Incident identifier
{{incident.title}}Incident title
{{incident.severity}}Severity level (P1-P4)
{{incident.status}}Current status
{{incident.type}}Incident type
{{incident.commander}}Commander's name
{{incident.url}}URL to the incident in Batida

Conditional logic

Use conditional steps to branch your workflow based on incident properties:

json
{
  "type": "conditional",
  "condition": "{{incident.severity}} == 'P1'",
  "if_true": [
    { "type": "send_notification", "channel": "pagerduty", "target": "exec-escalation" }
  ],
  "if_false": [
    { "type": "send_notification", "channel": "slack", "target": "#incidents" }
  ]
}

Parallel execution

By default, steps run sequentially. To run steps in parallel, group them in a parallel block:

json
{
  "type": "parallel",
  "steps": [
    { "type": "send_notification", "channel": "slack", "target": "#incidents" },
    { "type": "update_status_page", "component": "API", "status": "degraded" }
  ]
}

Parallel steps are all started simultaneously. The workflow waits for all parallel steps to complete before moving to the next sequential step.

Error handling

When a step fails, the workflow behavior depends on your configuration:

On failureDescription
StopThe workflow stops and logs the error
ContinueThe workflow skips the failed step and continues
RetryThe workflow retries the step up to 3 times with backoff

By default, workflows use the Stop behavior. You can override this per step in the workflow editor.

Step execution logs

Every step execution is logged. You can view the logs from the workflow detail page to see:

  • Which steps succeeded and which failed.
  • The input data and output of each step.
  • Execution timestamps and durations.

Built by the Batida team