{
  "schema_version": "1.0.0",
  "id": "jira-highest-to-oncall",
  "title": "Page the on-call channel for a Highest priority Jira issue",
  "category": "ops",
  "difficulty": "beginner",
  "featured": false,
  "description": "Watch new Jira issues, and post only Highest priority ones to the on-call Slack channel and an incident log sheet.",
  "tags": [
    "jira",
    "slack",
    "on-call",
    "incidents",
    "google-sheets"
  ],
  "apps": [
    "Jira Software Cloud",
    "Filter by Zapier",
    "Slack",
    "Google Sheets"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 3 steps after the trigger",
      "Filter by Zapier"
    ]
  },
  "tasks": {
    "typical": 0,
    "max": 2
  },
  "trigger": {
    "app": "Jira Software Cloud",
    "event": "New Issue",
    "kind": "polling",
    "title": "New issue in Support escalations",
    "why": "Fires for every new issue in the escalations project.",
    "config": {
      "Site": "YOUR_JIRA_SITE",
      "Project": "Support escalations"
    },
    "outputs": [
      "issue_key",
      "summary",
      "priority",
      "reporter",
      "issue_type",
      "created",
      "url"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "highest",
      "kind": "filter",
      "app": "Filter by Zapier",
      "event": "Only continue if...",
      "title": "Only Highest priority",
      "why": "Normal bugs go through the backlog as usual. Only Highest wakes the channel.",
      "conditions": [
        [
          {
            "field": "{{trigger.priority}}",
            "operator": "(Text) Exactly matches",
            "value": "Highest"
          }
        ]
      ],
      "usually": false
    },
    {
      "key": "page",
      "kind": "action",
      "app": "Slack",
      "event": "Send Channel Message",
      "title": "Post to #eng-oncall",
      "why": "Uses @here so the person on call sees it on their phone.",
      "fields": {
        "Channel": "#eng-oncall",
        "Message Text": "<!here> :rotating_light: {{trigger.issue_key}} {{trigger.summary}} (reported by {{trigger.reporter}}). {{trigger.url}}",
        "Send as a bot?": "Yes",
        "Bot Name": "Zap alerts",
        "Include a link to this Zap?": "No"
      },
      "outputs": [
        "ts",
        "permalink"
      ]
    },
    {
      "key": "log",
      "kind": "action",
      "app": "Google Sheets",
      "event": "Create Spreadsheet Row",
      "title": "Add it to the incident log",
      "why": "A simple log for the monthly incident review: when it was filed and when Slack was told.",
      "fields": {
        "Drive": "My Google Drive",
        "Spreadsheet": "Engineering",
        "Worksheet": "Incidents",
        "Columns": {
          "issue_key": "{{trigger.issue_key}}",
          "summary": "{{trigger.summary}}",
          "filed_at": "{{trigger.created}}",
          "paged_at": "{{meta.human_now}}",
          "slack_link": "{{page.permalink}}"
        }
      },
      "outputs": [
        "id",
        "row_number"
      ]
    }
  ]
}
