{
  "schema_version": "1.0.0",
  "id": "intercom-bug-to-jira",
  "title": "Open a Jira bug from an Intercom conversation",
  "category": "support",
  "difficulty": "advanced",
  "featured": false,
  "description": "Have AI decide whether an Intercom conversation describes a product bug, and if so open a Jira issue with repro steps and tell engineering.",
  "tags": [
    "intercom",
    "jira",
    "bugs",
    "ai-classification",
    "slack"
  ],
  "apps": [
    "Intercom",
    "AI by Zapier",
    "Filter by Zapier",
    "Jira Software Cloud",
    "Slack"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 4 steps after the trigger",
      "Filter by Zapier",
      "AI by Zapier"
    ]
  },
  "tasks": {
    "typical": 1,
    "max": 3
  },
  "trigger": {
    "app": "Intercom",
    "event": "New Conversation",
    "kind": "instant",
    "title": "New conversation",
    "why": "Fires when a customer starts a new conversation.",
    "config": {
      "Inbox": "Support"
    },
    "outputs": [
      "conversation_id",
      "user_email",
      "user_name",
      "body_text",
      "browser",
      "created_at",
      "conversation_url"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "triage",
      "kind": "ai",
      "app": "AI by Zapier",
      "event": "Analyze and Return Data",
      "title": "Decide if it is a bug and write repro steps",
      "why": "Asks for a yes or no first, and only then for the details, so feature requests and how-to questions do not become Jira noise.",
      "fields": {
        "Model": "Default (fast)",
        "Instructions": "You triage support chats for an engineering team. Return: is_bug (\"yes\" only if the customer describes software behaving incorrectly: an error, a crash, wrong data, something that used to work; \"no\" for questions, feature requests, billing), title (a Jira-style summary under 80 characters), repro_steps (numbered steps to reproduce, from what the customer said only), expected and actual (one line each), severity (one of blocker, major, minor). If is_bug is no, leave the other fields empty.",
        "Input data": "Customer: {{trigger.user_name}} <{{trigger.user_email}}>\nBrowser: {{trigger.browser}}\n\n{{trigger.body_text}}",
        "Output fields": "is_bug, title, repro_steps, expected, actual, severity"
      },
      "outputs": [
        "is_bug",
        "title",
        "repro_steps",
        "expected",
        "actual",
        "severity"
      ]
    },
    {
      "key": "bug",
      "kind": "filter",
      "app": "Filter by Zapier",
      "event": "Only continue if...",
      "title": "Only real bugs",
      "why": "Questions and feature requests stop here and stay with support.",
      "conditions": [
        [
          {
            "field": "{{triage.is_bug}}",
            "operator": "(Text) Exactly matches",
            "value": "yes"
          }
        ]
      ],
      "usually": false
    },
    {
      "key": "issue",
      "kind": "action",
      "app": "Jira Software Cloud",
      "event": "Create Issue",
      "title": "Open the Jira bug",
      "why": "Created in the triage project, labelled so engineering can see what came from customers.",
      "fields": {
        "Site": "YOUR_JIRA_SITE",
        "Project": "YOUR_PROJECT_KEY",
        "Issue Type": "Bug",
        "Summary": "{{triage.title}}",
        "Description": "Reported via Intercom by {{trigger.user_email}} ({{trigger.browser}}).\n\nSteps to reproduce:\n{{triage.repro_steps}}\n\nExpected: {{triage.expected}}\nActual: {{triage.actual}}\n\nConversation: {{trigger.conversation_url}}",
        "Priority": "{{triage.severity}}",
        "Labels": "from-support, intercom"
      },
      "outputs": [
        "id",
        "key",
        "url"
      ]
    },
    {
      "key": "eng",
      "kind": "action",
      "app": "Slack",
      "event": "Send Channel Message",
      "title": "Tell engineering",
      "why": "A one-liner in the triage channel with the Jira key.",
      "fields": {
        "Channel": "#eng-triage",
        "Message Text": ":bug: {{issue.key}} {{triage.title}} ({{triage.severity}}), reported by {{trigger.user_email}}. {{issue.url}}",
        "Send as a bot?": "Yes",
        "Bot Name": "Zap alerts",
        "Include a link to this Zap?": "No"
      },
      "outputs": [
        "ts",
        "permalink"
      ]
    }
  ]
}
