{
  "id": "",
  "name": "Jira High Priority Issue Alerts \u2014 Slack, Google Chat & Email",
  "tags": [],
  "nodes": [
    {
      "id": "2af67584-31b6-480d-922c-41ca02a88cba",
      "name": "ON JIRA ISSUE CREATED",
      "type": "n8n-nodes-base.jiraTrigger",
      "position": [
        -976,
        832
      ],
      "parameters": {
        "events": [
          "jira:issue_created"
        ],
        "additionalFields": {
          "filter": "Project = {{ Jira_Project_Key }} AND Priority = High"
        }
      },
      "retryOnFail": false,
      "typeVersion": 1.1
    },
    {
      "id": "82800275-20cc-418a-882b-e24b9644bb3f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        400
      ],
      "parameters": {
        "width": 752,
        "height": 672,
        "content": "## Jira High Priority Issue Alerts \u2014 Slack, Google Chat & Email\n\nMonitors Jira for HIGH priority issue creation and instantly notifies your Slack channel, Google Chat space, and manager(s) via email.\n\n\n## How it works\nTriggered via Jira webhook when a HIGH priority issue is created. Simultaneously alerts Slack, Google Chat, and sends an escalation email.\n\n\n## Setup\n1. **ON JIRA ISSUE CREATED** node: set your Jira project key\n2. **CONFIGURATION** node: fill in the variables below\n\n### Variables\n- `JIRA_PROJECT_KEY`: e.g. `PROJ`\n- `JIRA_DOMAIN`: e.g. `my-company.atlassian.net`\n- `emailTo`: escalation recipient(s)\n\n\n### Credentials\n- Jira Software Cloud API\n- Gmail (OAuth2) \u00b7 Slack (OAuth2) \u00b7 Google Chat (Service Account)\n\n\n## \ud83d\udce9 Contact & Support\n**aixautomation** \u00b7 [aixautomation01@gmail.com](mailto:aixautomation01@gmail.com) \u00b7 [aixautomation.tech](https://www.aixautomation.tech)\n\nFor questions, setup help, or custom workflow requests \u2014 feel free to reach out."
      },
      "typeVersion": 1
    },
    {
      "id": "8858f67e-f649-440b-89d4-62f170fab8d8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        128
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 608,
        "content": "## Setup Google Chat Node\n[![Watch the video](https://img.youtube.com/vi/EKLzl254UY8/0.jpg)](https://www.youtube.com/watch?v=EKLzl254UY8&t=561s)"
      },
      "typeVersion": 1
    },
    {
      "id": "47a072ff-936f-41a0-a144-9a8d9eda83e1",
      "name": "SEND GOOGLE CHAT CARD",
      "type": "n8n-nodes-base.googleChat",
      "position": [
        32,
        544
      ],
      "parameters": {
        "spaceId": "spaces/AAQAwVn10QQ",
        "messageJson": "={\n  \"cardsV2\": [\n    {\n      \"cardId\": \"jira_issue_card\",\n      \"card\": {\n        \"header\": {\n          \"title\": \"New Jira issue created\",\n          \"subtitle\": \"{{$json.issue.key}} - {{$json.issue.fields.summary}}\"\n        },\n        \"sections\": [\n          {\n            \"widgets\": [\n              {\n                \"decoratedText\": {\n                  \"topLabel\": \"Issue\",\n                  \"text\": \"<a href=\\\"{{  $json.JIRA_DOMAIN }}/browse/{{$json.issue.key}}\\\">{{$json.issue.key}}</a>\"\n                }\n              },\n              {\n                \"decoratedText\": {\n                  \"topLabel\": \"Project\",\n                  \"text\": \"{{$json.issue.fields.project.name}}\"\n                }\n              },\n              {\n                \"decoratedText\": {\n                  \"topLabel\": \"Type\",\n                  \"text\": \"{{$json.issue.fields.issuetype.name}}\"\n                }\n              },\n              {\n                \"decoratedText\": {\n                  \"topLabel\": \"Priority\",\n                  \"text\": \"{{$json.issue.fields.priority ? $json.issue.fields.priority.name : 'Not set'}}\"\n                }\n              },\n              {\n                \"decoratedText\": {\n                  \"topLabel\": \"Status\",\n                  \"text\": \"{{$json.issue.fields.status.name}}\"\n                }\n              },\n              {\n                \"decoratedText\": {\n                  \"topLabel\": \"Reporter\",\n                  \"text\": \"{{$json.issue.fields.reporter ? $json.issue.fields.reporter.displayName : 'Unknown'}}\"\n                }\n              }\n            ]\n          },\n          {\n            \"widgets\": [\n              {\n                \"buttonList\": {\n                  \"buttons\": [\n                    {\n                      \"text\": \"Open in Jira\",\n                      \"onClick\": {\n                        \"openLink\": {\n                          \"url\": \"{{ $json.JIRA_DOMAIN }}/browse/{{$json.issue.key}}\"\n                        }\n                      }\n                    }\n                  ]\n                }\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}",
        "jsonParameters": true,
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "61bb2617-c9cb-4a25-936c-85076c5e52c5",
      "name": "SEND SLACK CARD",
      "type": "n8n-nodes-base.slack",
      "position": [
        32,
        832
      ],
      "parameters": {
        "text": "Hello",
        "select": "channel",
        "blocksUi": "={\n  \"text\": \"New Jira issue created: {{$json.issue.key}} - {{$json.issue.fields.summary}}\",\n  \"blocks\": [\n    {\n      \"type\": \"header\",\n      \"text\": {\n        \"type\": \"plain_text\",\n        \"text\": \"New Jira issue created\"\n      }\n    },\n    {\n      \"type\": \"section\",\n      \"fields\": [\n        {\n          \"type\": \"mrkdwn\",\n          \"text\": \"*Issue:*\\n<{{ $json.JIRA_DOMAIN }}/browse/{{$json.issue.key}}|{{$json.issue.key}}>\"\n        },\n        {\n          \"type\": \"mrkdwn\",\n          \"text\": \"*Project:*\\n{{$json.issue.fields.project.name}}\"\n        },\n        {\n          \"type\": \"mrkdwn\",\n          \"text\": \"*Type:*\\n{{$json.issue.fields.issuetype.name}}\"\n        },\n        {\n          \"type\": \"mrkdwn\",\n          \"text\": \"*Priority:*\\n{{$json.issue.fields.priority ? $json.issue.fields.priority.name : 'Not set'}}\"\n        },\n        {\n          \"type\": \"mrkdwn\",\n          \"text\": \"*Status:*\\n{{$json.issue.fields.status.name}}\"\n        },\n        {\n          \"type\": \"mrkdwn\",\n          \"text\": \"*Reporter:*\\n{{$json.issue.fields.reporter ? $json.issue.fields.reporter.displayName : 'Unknown'}}\"\n        }\n      ]\n    },\n    {\n      \"type\": \"section\",\n      \"text\": {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*Summary:*\\n{{$json.issue.fields.summary}}\"\n      }\n    },\n    {\n      \"type\": \"section\",\n      \"text\": {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*Description:*\\n{{$json.issue.fields.description || 'No description provided'}}\"\n      }\n    },\n    {\n      \"type\": \"actions\",\n      \"elements\": [\n        {\n          \"type\": \"button\",\n          \"text\": {\n            \"type\": \"plain_text\",\n            \"text\": \"Open in Jira\"\n          },\n          \"url\": \"{{ $json.JIRA_DOMAIN }}/browse/{{$json.issue.key}}\"\n        }\n      ]\n    }\n  ]\n}",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#all-n8n-test-space"
        },
        "messageType": "block",
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "bd75a240-0a45-4b9a-bc09-f75f2fe4ea09",
      "name": "SEND EMAIL",
      "type": "n8n-nodes-base.gmail",
      "position": [
        32,
        1072
      ],
      "parameters": {
        "sendTo": "={{ $json.emailTo }}",
        "message": "={{ $json.html }}",
        "options": {},
        "subject": "High Jira issue Created \ud83d\udea8"
      },
      "typeVersion": 2.2
    },
    {
      "id": "f05dda9b-d294-478d-ac3b-6e606aa1a8d2",
      "name": "BUILD HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        -272,
        1072
      ],
      "parameters": {
        "jsCode": "// ============================================================\n// JIRA HIGH TICKET CREATION \u2014 EMAIL NOTIFICATION\n// Same design system as daily briefing & weekly report\n// Triggered: on high/highest priority issue creation\n// ============================================================\n\nconst issue  = $input.first().json.issue;\nconst fields = issue.fields || {};\n\n// \u2500\u2500 Safe helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst s   = (v, f = '') => (v != null ? String(v) : f);\nconst esc = (v) => String(v ?? '')\n  .replace(/&/g, '&amp;').replace(/</g, '&lt;')\n  .replace(/>/g, '&gt;').replace(/\"/g, '&quot;');\n\n// \u2500\u2500 Design tokens (identical to report system) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst BRAND     = '#0F3D6E';\nconst BRAND_ACC = '#0052CC';\nconst SURFACE   = '#FFFFFF';\nconst SURFACE2  = '#F4F5F7';\nconst BORDER    = '#DFE1E6';\nconst TEXT1     = '#172B4D';\nconst TEXT2     = '#5E6C84';\nconst TEXT3     = '#8993A4';\n\nconst JIRA_BASE = $input.first().json.JIRA_DOMAIN + \"/browse\";\n\n// \u2500\u2500 Issue fields \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst issueKey    = s(issue.key);\nconst summary     = s(fields.summary);\nconst project     = s(fields.project?.name);\nconst issueType   = s(fields.issuetype?.name, 'Issue');\nconst priority    = s(fields.priority?.name,  'Not set');\nconst status      = s(fields.status?.name,    'To Do');\nconst reporter    = s(fields.reporter?.displayName, 'Unknown');\nconst assignee    = s(fields.assignee?.displayName, 'Unassigned');\nconst description = s(fields.description, '');\nconst created     = fields.created\n  ? new Date(fields.created).toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' })\n  : '';\n\nconst issueUrl = `${JIRA_BASE}/${issueKey}`;\n\n// \u2500\u2500 Priority colours \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst priorityMap = {\n  'Highest': { bg: '#FFEBE6', text: '#BF2600', border: '#BF2600', dot: '#BF2600', label: 'HIGHEST' },\n  'High':    { bg: '#FFEBE6', text: '#BF2600', border: '#FF5630', dot: '#FF5630', label: 'HIGH'    },\n  'Medium':  { bg: '#FFFAE6', text: '#FF8B00', border: '#FF8B00', dot: '#FF8B00', label: 'MEDIUM'  },\n  'Low':     { bg: '#E3FCEF', text: '#006644', border: '#36B37E', dot: '#36B37E', label: 'LOW'     },\n  'Lowest':  { bg: '#F4F5F7', text: '#5E6C84', border: '#8993A4', dot: '#8993A4', label: 'LOWEST'  },\n};\nconst pc = priorityMap[priority] || priorityMap['Medium'];\n\n// \u2500\u2500 Status colours \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst statusMap = {\n  'To Do':       { bg: '#F4F5F7', text: '#42526E' },\n  'In Progress': { bg: '#DEEBFF', text: '#0052CC' },\n  'In Review':   { bg: '#EAE6FF', text: '#6554C0' },\n  'Done':        { bg: '#E3FCEF', text: '#006644' },\n  'Blocked':     { bg: '#FFEBE6', text: '#BF2600' },\n};\nconst sc = statusMap[status] || { bg: SURFACE2, text: TEXT2 };\n\n// \u2500\u2500 Issue type colours \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst typeMap = {\n  'Bug':     { bg: '#FFEBE6', text: '#BF2600' },\n  'Feature': { bg: '#EEF4FF', text: '#0052CC' },\n  'Story':   { bg: '#E3FCEF', text: '#006644' },\n  'Task':    { bg: '#F4F5F7', text: '#42526E' },\n  'Epic':    { bg: '#EAE6FF', text: '#6554C0' },\n};\nconst tc = typeMap[issueType] || { bg: SURFACE2, text: TEXT2 };\n\n// \u2500\u2500 Is this a highest/high urgency? \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst isUrgent = priority === 'Highest' || priority === 'High';\n\n// \u2500\u2500 Meta row helper \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst metaRow = (label, value, last = false) =>\n  `<tr style=\"border-bottom:${last ? 'none' : '1px solid '+BORDER};\">\n    <td style=\"padding:10px 16px 10px 0;width:110px;vertical-align:top;\">\n      <div style=\"font-size:10px;font-weight:700;color:${TEXT3};text-transform:uppercase;letter-spacing:0.07em;\">${label}</div>\n    </td>\n    <td style=\"padding:10px 0;vertical-align:top;\">\n      <div style=\"font-size:13px;color:${TEXT1};\">${value}</div>\n    </td>\n  </tr>`;\n\n// \u2500\u2500 Pill badge \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst pill = (label, bg, text) =>\n  `<span style=\"display:inline-block;background:${bg};color:${text};border-radius:3px;padding:2px 8px;font-size:11px;font-weight:700;letter-spacing:0.04em;\">${esc(label)}</span>`;\n\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n// HEADER\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\nconst headerHtml = `\n<tr><td style=\"background:${BRAND};border-radius:8px 8px 0 0;padding:24px 30px;\">\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr valign=\"top\">\n\n    <td style=\"padding-right:16px;\">\n      <div style=\"font-size:9px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:rgba(255,255,255,0.4);margin-bottom:8px;\">\n        ${esc(project)} &nbsp;/&nbsp; New Issue Created\n      </div>\n      <div style=\"font-size:17px;font-weight:700;color:#FFFFFF;line-height:1.35;margin-bottom:8px;\">\n        ${esc(summary)}\n      </div>\n      <div style=\"font-size:11px;color:rgba(255,255,255,0.45);\">${created ? `Created ${created}` : ''}</div>\n    </td>\n\n    <!-- Issue key badge -->\n    <td style=\"width:140px;vertical-align:top;\">\n      <table width=\"140\" cellpadding=\"0\" cellspacing=\"0\"\n             style=\"background:rgba(255,255,255,0.11);border:1px solid rgba(255,255,255,0.15);border-radius:6px;\">\n      <tr><td style=\"padding:12px 14px;text-align:center;\">\n        <div style=\"font-size:9px;font-weight:700;letter-spacing:0.09em;color:rgba(255,255,255,0.4);text-transform:uppercase;margin-bottom:6px;\">Issue Key</div>\n        <div style=\"font-size:18px;font-weight:700;color:#FFFFFF;margin-bottom:10px;\">${esc(issueKey)}</div>\n        <div style=\"background:${pc.bg};border-radius:20px;padding:3px 10px;white-space:nowrap;display:inline-block;\">\n          <span style=\"font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:0.07em;color:${pc.text};white-space:nowrap;\">\u25cf ${pc.label}</span>\n        </div>\n      </td></tr>\n      </table>\n    </td>\n\n  </tr></table>\n</td></tr>`;\n\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n// URGENT ALERT BANNER (High / Highest only)\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\nconst alertBanner = isUrgent ? `\n<tr><td style=\"background:#FFEBE6;border-left:4px solid #BF2600;border-right:1px solid ${BORDER};padding:11px 24px;\">\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr valign=\"middle\">\n    <td style=\"font-size:10px;font-weight:700;color:#BF2600;text-transform:uppercase;letter-spacing:0.07em;width:1%;white-space:nowrap;padding-right:12px;\">\ud83d\udd34 High Priority Issue</td>\n    <td style=\"font-size:11px;color:#7F2000;line-height:1.5;\">\n      This issue has been flagged as <strong>${esc(priority)}</strong> priority and requires prompt attention.\n    </td>\n  </tr></table>\n</td></tr>` : '';\n\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n// QUICK STATS STRIP \u2014 3 key facts at a glance\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\nconst statsStrip = `\n<tr><td style=\"background:${SURFACE};border-left:1px solid ${BORDER};border-right:1px solid ${BORDER};border-top:1px solid ${BORDER};padding:14px 20px;\">\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"table-layout:fixed;\"><tr valign=\"middle\">\n\n    <td style=\"text-align:center;padding:6px 4px;border-right:1px solid ${BORDER};\">\n      <div style=\"margin-bottom:5px;\">${pill(issueType, tc.bg, tc.text)}</div>\n      <div style=\"font-size:9px;font-weight:700;color:${TEXT3};text-transform:uppercase;letter-spacing:0.06em;\">Type</div>\n    </td>\n\n    <td style=\"text-align:center;padding:6px 4px;border-right:1px solid ${BORDER};\">\n      <div style=\"margin-bottom:5px;\">${pill(priority, pc.bg, pc.text)}</div>\n      <div style=\"font-size:9px;font-weight:700;color:${TEXT3};text-transform:uppercase;letter-spacing:0.06em;\">Priority</div>\n    </td>\n\n    <td style=\"text-align:center;padding:6px 4px;\">\n      <div style=\"margin-bottom:5px;\">${pill(status, sc.bg, sc.text)}</div>\n      <div style=\"font-size:9px;font-weight:700;color:${TEXT3};text-transform:uppercase;letter-spacing:0.06em;\">Status</div>\n    </td>\n\n  </tr></table>\n</td></tr>`;\n\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n// ISSUE DETAILS \u2014 meta table\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\nconst detailsHtml = `\n<tr><td style=\"background:${SURFACE};border-left:1px solid ${BORDER};border-right:1px solid ${BORDER};border-top:1px solid ${BORDER};padding:20px 30px;\">\n  <div style=\"border-bottom:1px solid ${BORDER};padding-bottom:10px;margin-bottom:16px;\">\n    <span style=\"font-size:13px;font-weight:700;color:${TEXT1};\">Issue Details</span>\n  </div>\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n    ${metaRow('Issue',    `<a href=\"${esc(issueUrl)}\" style=\"color:${BRAND_ACC};font-weight:700;text-decoration:none;\">${esc(issueKey)}</a>`)}\n    ${metaRow('Project',  esc(project))}\n    ${metaRow('Type',     pill(issueType, tc.bg, tc.text))}\n    ${metaRow('Priority', pill(priority,  pc.bg, pc.text))}\n    ${metaRow('Status',   pill(status,    sc.bg, sc.text))}\n    ${metaRow('Reporter', esc(reporter))}\n    ${metaRow('Assignee', esc(assignee), !description)}\n    ${description ? metaRow('Description', `<div style=\"font-size:12px;color:${TEXT2};line-height:1.7;\">${esc(description)}</div>`, true) : ''}\n  </table>\n</td></tr>`;\n\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n// CTA \u2014 Open in Jira button\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\nconst ctaHtml = `\n<tr><td style=\"background:${BRAND};border-left:1px solid ${BORDER};border-right:1px solid ${BORDER};border-top:1px solid ${BORDER};padding:16px 30px;\">\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr valign=\"middle\">\n    <td>\n      <div style=\"font-size:12px;font-weight:700;color:#FFFFFF;margin-bottom:3px;\">Review this issue in Jira</div>\n      <div style=\"font-size:10px;color:rgba(255,255,255,0.5);\">\n        Assign, comment, update priority or start working on it directly.\n      </div>\n    </td>\n    <td style=\"text-align:right;white-space:nowrap;padding-left:16px;\">\n      <a href=\"${esc(issueUrl)}\" target=\"_blank\"\n         style=\"display:inline-block;background:rgba(255,255,255,0.15);border:1px solid rgba(255,255,255,0.3);border-radius:4px;padding:8px 18px;font-size:11px;font-weight:700;color:#FFFFFF;text-decoration:none;white-space:nowrap;\">\n        Open in Jira \u2192\n      </a>\n    </td>\n  </tr></table>\n</td></tr>`;\n\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n// FOOTER\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\nconst footerHtml = `\n<tr><td style=\"background:${SURFACE};border-left:1px solid ${BORDER};border-right:1px solid ${BORDER};padding-bottom:16px;\"></td></tr>\n<tr><td style=\"background:${BRAND};border-radius:0 0 8px 8px;padding:14px 30px;\">\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>\n    <td style=\"font-size:10px;color:rgba(255,255,255,0.4);\">\n      Auto-generated by n8n &nbsp;\u00b7&nbsp; Jira \u2014 IG Green Team\n    </td>\n    <td align=\"right\" style=\"font-size:10px;color:rgba(255,255,255,0.3);white-space:nowrap;padding-left:8px;\">\n      Do not reply\n    </td>\n  </tr></table>\n</td></tr>`;\n\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n// ASSEMBLE\n// \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\nconst html = `<!DOCTYPE html>\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n  <meta charset=\"UTF-8\"/>\n  <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\"/>\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/>\n  <title>New Issue: ${esc(issueKey)}</title>\n</head>\n<body style=\"margin:0;padding:0;background:#E4E8EF;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Helvetica Neue',Arial,sans-serif;\">\n\n  <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background:#E4E8EF;padding:28px 0;\">\n    <tr><td align=\"center\">\n      <table width=\"620\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"max-width:620px;width:100%;\">\n\n        ${headerHtml}\n        ${alertBanner}\n        ${statsStrip}\n        ${detailsHtml}\n        ${ctaHtml}\n        ${footerHtml}\n\n      </table>\n    </td></tr>\n  </table>\n\n</body>\n</html>`;\n\n// \u2500\u2500 Subject line \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nconst subjectPrefix = isUrgent ? `\ud83d\udd34 [${priority.toUpperCase()}]` : `\ud83d\udccb [${priority.toUpperCase()}]`;\nconst subject = `${subjectPrefix} ${issueKey} \u2014 ${summary}`;\n\nreturn [{\n  json: {\n    html,\n    subject,\n    emailTo: $input.first().json.emailTo || '',\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "22c93e36-98a6-4710-b02a-5cc8fd510d68",
      "name": "CONFIGURATION JIRA DOMAIN + Recipients",
      "type": "n8n-nodes-base.set",
      "position": [
        -672,
        832
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "72ef49ca-e125-4320-b512-6219abce06e4",
              "name": "JIRA_DOMAIN",
              "type": "string",
              "value": "=REPLACE_BY_YOUR_JIRA_DOMAIN"
            },
            {
              "id": "a941173c-68cd-4df2-b3a7-8ed61ed59d91",
              "name": "emailTo",
              "type": "string",
              "value": "user@example.com"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "BUILD HTML": {
      "main": [
        [
          {
            "node": "SEND EMAIL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ON JIRA ISSUE CREATED": {
      "main": [
        [
          {
            "node": "CONFIGURATION JIRA DOMAIN + Recipients",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIGURATION JIRA DOMAIN + Recipients": {
      "main": [
        [
          {
            "node": "BUILD HTML",
            "type": "main",
            "index": 0
          },
          {
            "node": "SEND GOOGLE CHAT CARD",
            "type": "main",
            "index": 0
          },
          {
            "node": "SEND SLACK CARD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}