{
  "name": "Automate Jira backlog hygiene and reporting with Slack, Gmail and GPT-4",
  "nodes": [
    {
      "id": "2c632cb2-a465-48a1-8615-646ae004a906",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2208,
        -672
      ],
      "parameters": {
        "width": 389,
        "height": 564,
        "content": "## 🎯 Backlog Hygiene & Auto-Grooming\n\nAutomated Jira backlog management that identifies issues, takes corrective actions, and generates AI-powered reports.\n\n**What it does:**\n- Runs weekdays at 9 AM t"
      }
    },
    {
      "id": "ef8e559f-6e94-42c5-a70e-6cfd6ddea13f",
      "name": "Daily Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1680,
        -416
      ]
    },
    {
      "id": "30388334-2118-4d6d-a355-cc01ecf97bf5",
      "name": "Note - Schedule",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1760,
        -272
      ],
      "parameters": {
        "width": 262,
        "height": 237,
        "content": "## ⏰ Weekday Mornings\n\nRuns Mon-Fri at 9:00 AM to groom backlog.\n\n**Schedule:** `0 9 * * 1-5`\n**Timing:** Daily at 09:00 on weekdays\n\n"
      }
    },
    {
      "id": "c5ac2613-c23e-40c3-b0ff-0bb805b876e1",
      "name": "Fetch Jira Backlog",
      "type": "n8n-nodes-base.jira",
      "position": [
        -1456,
        -416
      ]
    },
    {
      "id": "c56145cd-e7bd-47f2-945d-331c491d2eab",
      "name": "Note - Fetch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        -704
      ],
      "parameters": {
        "width": 262,
        "height": 269,
        "content": "## 📋 Fetch Backlog Items\n\n**Setup Required:**\n1. Replace `YOUR_PROJECT_KEY` with your Jira project key\n2. Connect Jira credentials\n\n**Fetches:** All issues in \"Backlog\" status, ordered by creation dat"
      }
    },
    {
      "id": "79cc28a5-7047-40ee-816e-ea61635ad230",
      "name": "Extract Jira Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -1232,
        -416
      ]
    },
    {
      "id": "cfe06dcd-cc9d-4eaf-898c-0aa823aa9d2a",
      "name": "Note - Extract",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1296,
        -256
      ],
      "parameters": {
        "width": 262,
        "height": 309,
        "content": "## 🔄 Field Extraction\n\nMaps Jira fields to clean, usable data.\n\n**Extracted Fields:**\n- ID, Key, Status, Summary\n- Created & Last Updated dates\n- Assignee & Creator email\n- Due Date & Priority\n\n**Note"
      }
    },
    {
      "id": "4c294ed5-4ae4-4d24-97f9-575cca486366",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1008,
        -368
      ]
    },
    {
      "id": "684448c6-3f51-401c-8e3c-3e40db0b6ce2",
      "name": "Note - Sheets",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        -480
      ],
      "parameters": {
        "width": 262,
        "height": 285,
        "content": "## 📊 Audit Trail\n\n**Setup Required:**\n1. Replace `YOUR_SHEET_ID` with Google Sheets document ID\n2. Connect Google OAuth2 credentials\n\n**Logs:** All backlog items with timestamps for historical trackin"
      }
    },
    {
      "id": "ef72046f-dd55-429d-be00-c9324dbccaf1",
      "name": "Check Overdue Tasks",
      "type": "n8n-nodes-base.if",
      "position": [
        -1008,
        -704
      ]
    },
    {
      "id": "b27e44f5-db46-4885-9f4a-c65ebecaeff7",
      "name": "Note - Overdue Check",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -992
      ],
      "parameters": {
        "width": 262,
        "height": 261,
        "content": "## ⏰ Overdue Filter\n\n**Logic:** Checks if Due Date is before today\n\n**True Branch:** Overdue tasks\n- Sends Jira notification\n- Posts Slack alert\n\n**False Branch:** Not overdue\n- Continues to priority "
      }
    },
    {
      "id": "11751464-7ff3-40fa-8dd1-c78b008a0dd2",
      "name": "Notify Issue Owner",
      "type": "n8n-nodes-base.jira",
      "position": [
        -720,
        -896
      ]
    },
    {
      "id": "d52caf19-6f96-4565-be5d-ed34d3f55158",
      "name": "Note - Jira Notify",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -1168
      ],
      "parameters": {
        "width": 262,
        "height": 253,
        "content": "## 📧 Jira Notification\n\n**Setup Required:**\n1. Uses same Jira credentials\n2. Removed hardcoded user/group IDs\n\n**Sends:** In-app Jira notification to reporter and assignee for overdue tasks"
      }
    },
    {
      "id": "ef9c4252-1781-4ee0-b0c7-583765206a89",
      "name": "Slack Alert - Overdue",
      "type": "n8n-nodes-base.slack",
      "position": [
        -720,
        -704
      ]
    },
    {
      "id": "30057434-63d2-4d55-a527-a7f20d9233c3",
      "name": "Note - Slack Overdue",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -752
      ],
      "parameters": {
        "width": 262,
        "height": 221,
        "content": "## 💬 Slack - Overdue\n\n**Setup Required:**\n1. Replace `YOUR_CHANNEL_ID` with Slack channel ID\n2. Connect Slack API credentials\n\n**Posts:** Real-time alert for overdue items with full context"
      }
    },
    {
      "id": "1e90d54a-7e05-4cce-859c-ddd62cb498d6",
      "name": "Check Missing Priority",
      "type": "n8n-nodes-base.if",
      "position": [
        -720,
        -512
      ]
    },
    {
      "id": "198c9966-323e-45a6-bdef-3dadb6c01105",
      "name": "Note - Priority Check",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        -320
      ],
      "parameters": {
        "width": 262,
        "height": 309,
        "content": "## 🏷️ Priority Check\n\n**Logic:** Checks if Priority field is empty\n\n**True Branch:** Missing priority\n- Tags issue with \"Needs-Priority\" label\n- Posts Slack alert\n\n**False Branch:** Priority exists\n- "
      }
    },
    {
      "id": "cfca36aa-3f46-4027-8d29-5ef5137e338c",
      "name": "Tag with 'Needs-Priority'",
      "type": "n8n-nodes-base.jira",
      "position": [
        -432,
        -608
      ]
    },
    {
      "id": "f02e8cae-0ec8-4779-a5b2-6a48ede692ea",
      "name": "Note - Tag",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        -832
      ],
      "parameters": {
        "width": 262,
        "height": 205,
        "content": "## 🏷️ Auto-Tag Issue\n\n**Setup Required:**\n1. Uses same Jira credentials\n\n**Action:** Automatically adds \"Needs-Priority\" label to issues missing priority field for easy filtering"
      }
    },
    {
      "id": "11cc0368-975c-4bc0-a2ef-c467df83569d",
      "name": "Slack Alert - Missing Priority",
      "type": "n8n-nodes-base.slack",
      "position": [
        -432,
        -416
      ]
    },
    {
      "id": "39461f27-b8b4-4d4c-baa9-bbc5f4ed29cc",
      "name": "Note - Slack Priority",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -416
      ],
      "parameters": {
        "width": 262,
        "height": 221,
        "content": "## 💬 Slack - Priority\n\n**Setup Required:**\n1. Use same Slack channel ID and credentials\n\n**Posts:** Alert for issues missing priority with action taken (tagged with label)"
      }
    },
    {
      "id": "be03f5d0-6e99-44a8-8d3c-3c293fe58602",
      "name": "Aggregate All Items",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1008,
        -176
      ]
    },
    {
      "id": "5a04bac2-e1c5-4715-8413-776e5cd7f846",
      "name": "Note - Aggregate",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        64
      ],
      "parameters": {
        "width": 262,
        "height": 258,
        "content": "## 📦 Combine Data\n\nAggregates all backlog items into single payload for AI analysis.\n\n**Purpose:** Prepares comprehensive dataset for AI to analyze patterns and generate insights"
      }
    },
    {
      "id": "289d850d-aeb2-475e-a810-822204ac98a6",
      "name": "Generate AI Digest",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -784,
        -176
      ]
    },
    {
      "id": "3a297cb4-3dde-4a58-88a1-a127062b3fca",
      "name": "Note - AI Analysis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        32
      ],
      "parameters": {
        "width": 262,
        "height": 309,
        "content": "## 🤖 AI Analysis Engine\n\n**What it does:**\n- Analyzes all backlog items using AI\n- Identifies patterns and trends\n- Generates structured JSON output with Subject and HTML Body\n\n**Requires:** Azure Ope"
      }
    },
    {
      "id": "53379a85-d8d5-4be5-bf67-e8df4e4098d7",
      "name": "Azure OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        -768,
        64
      ]
    },
    {
      "id": "c78017ec-f5b1-48ce-8586-fef3d75e35a3",
      "name": "Note - Azure",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -176
      ],
      "parameters": {
        "width": 262,
        "height": 237,
        "content": "## 🔗 AI Model Config\n\n**Setup Required:**\n1. Replace credential ID with your Azure OpenAI credentials\n2. Model: gpt-4o-mini (cost-effective)\n\n**Connects:** To AI agent for language processing"
      }
    },
    {
      "id": "6364596e-43e2-402a-a285-1740094c475f",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -640,
        64
      ]
    },
    {
      "id": "8a53abde-9f29-41c7-9917-ccee228748a4",
      "name": "Note - Parser",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        64
      ],
      "parameters": {
        "width": 262,
        "height": 205,
        "content": "## 📋 Output Parser\n\nEnsures AI returns valid JSON with:\n- Subject: Email subject line\n- Body: HTML formatted email\n\n**No setup required** - connects to AI agent automatically"
      }
    },
    {
      "id": "32153f43-2620-40d6-98d9-7793d756d206",
      "name": "Email Weekly Digest",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -432,
        -176
      ]
    },
    {
      "id": "e71a8d4b-aff9-457c-bcbb-b521f9333bd2",
      "name": "Note - Email",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -80
      ],
      "parameters": {
        "width": 262,
        "height": 301,
        "content": "## 📧 Send AI Digest\n\n**Setup Required:**\n1. Replace `YOUR_EMAIL@example.com` with manager's email\n2. Connect Gmail OAuth2 credentials\n\n**Sends:** AI-generated HTML email with backlog summary and actio"
      }
    }
  ],
  "connections": {
    "Azure OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate AI Digest",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Jira Backlog": {
      "main": [
        [
          {
            "node": "Extract Jira Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Digest": {
      "main": [
        [
          {
            "node": "Email Weekly Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All Items": {
      "main": [
        [
          {
            "node": "Generate AI Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Overdue Tasks": {
      "main": [
        [
          {
            "node": "Notify Issue Owner",
            "type": "main",
            "index": 0
          },
          {
            "node": "Slack Alert - Overdue",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check Missing Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Jira Fields": {
      "main": [
        [
          {
            "node": "Aggregate All Items",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check Overdue Tasks",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Missing Priority": {
      "main": [
        [
          {
            "node": "Tag with 'Needs-Priority'",
            "type": "main",
            "index": 0
          },
          {
            "node": "Slack Alert - Missing Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetch Jira Backlog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate AI Digest",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}