workflow:
  id: jira-create-ticket-on-alert
  name: Create Jira Ticket on Alert
  description: Create Jira ticket when alert fires
  disabled: false
  triggers:
    - type: alert
      cel: status == "firing"
  actions:
    - name: jira-action
      if: "not '{{ alert.ticket_id }}'"
      provider:
        type: jira
        config: "{{ providers.JiraCloud }}"
        with:
          board_name: YOUR_BOARD_NAME  # Change this to your board name
          issue_type: Task  # Or Bug, Story, etc.
          summary: "{{ alert.name }} - {{ alert.description }}"
          description: |
            "This ticket was created automatically by Keep.

            Alert Details:
            {code:json}
            {{ alert }}
            {code}"
          enrich_alert:
            - key: ticket_type
              value: jira
            - key: ticket_id
              value: results.issue.key
            - key: ticket_url
              value: results.ticket_url