v2026.1 Open Portal ↗
On this page

AI Workflows

Workflow Builder Overview

AI Workflows are visual no-code automations that combine AI decision-making with StackFlow ITSM actions. The workflow builder provides a drag-and-drop canvas where you connect trigger nodes, AI nodes, condition nodes, and action nodes. Workflows run as Lambda invocations triggered by SQS messages or EventBridge events.

⚙️ Minimum Requirements
  • DynamoDB: StackFlow_Workflow and StackFlow_WorkflowExecution tables provisioned
  • SQS: StackFlow-WorkflowExecution.fifo queue for async workflow step execution
  • Lambda: StackFlowWorkflowEngine consuming from SQS with bedrock:InvokeModel for AI nodes
  • IAM: Workflow engine role must have permissions for all action types: SES, SNS, DynamoDB, Lambda invoke

Workflows are stored as JSON definitions in Aurora and compiled to Lambda execution plans. The SQS queues StackFlow-Events-Ingestion.fifo and StackFlow-Remediation-P1.fifo provide the event backbone for workflow execution.

AI Nodes

Node TypeDescriptionOutput
AI ClassifierClassifies input into predefined categoriesCategory label + confidence
AI Text GeneratorGenerates text from a prompt and contextGenerated text string
AI Decision RouterRoutes workflow based on AI analysisNamed route (true/false/custom)
KB LookupSemantic search in Bedrock KBTop N matching articles
Sentiment AnalyzerAnalyzes sentiment of text inputPositive/Negative/Neutral + score
Entity ExtractorExtracts structured data from textJSON object with extracted fields

Trigger Configuration

Workflows can be triggered by: ITSM record state changes, SQS message arrival, scheduled EventBridge rule, webhook (external HTTP POST), or manual execution from the portal. SQS-triggered workflows support automatic retry with exponential backoff via the DLQ (StackFlow-Remediation-DLQ.fifo).

{
  "workflow": {
    "name": "Auto-Route Incident by AI Classification",
    "trigger": {"type": "itsm_event", "record_type": "incident", "event": "created"},
    "nodes": [
      {
        "id": "classify",
        "type": "ai_classifier",
        "input": "{{incident.short_description}} {{incident.description}}",
        "categories": ["database", "network", "application", "security", "end_user"],
        "model": "claude-3-haiku"
      },
      {
        "id": "route",
        "type": "condition",
        "input": "{{classify.category}}",
        "branches": {
          "database": "assign_to_platform_eng",
          "network": "assign_to_network_ops",
          "security": "assign_to_security_ops"
        },
        "default": "assign_to_service_desk"
      }
    ]
  }
}
Tip: Start with the pre-built workflow templates in AI → Workflows → Templates. Templates for common patterns (auto-triage, auto-remediation, SLA escalation) are available and can be customized for your environment.

Sample Workflows

Auto-Remediation Workflow: Triggers on P1 incidents with category "database", runs Neptune impact analysis, attempts automated restart of the affected service via SSM Run Command, and if successful, adds a work note and moves the incident to "Resolved" state. Failed remediations are escalated via the escalation workflow.

Debugging Workflows

Each workflow execution generates a detailed trace log accessible in AI → Workflows → Execution History. The trace shows each node's input, output, and execution time. Failed executions include the full error stack trace and the SQS message ID for correlation with CloudWatch Logs.