{
  "name": "Gate AI Slack DevOps bot actions with OpenAI and Permit.io RBAC",
  "nodes": [
    {
      "id": "e2b71c25-9820-4fc3-8edb-ac66a67598d7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -64
      ],
      "parameters": {
        "width": 436,
        "height": 712,
        "content": "## Gate AI Slack bot actions with role-based permissions from Permit.io\n\n### How it works\nA Slack bot that handles DevOps requests and checks every action against Permit.io RBAC before execution.\n\n1. "
      }
    },
    {
      "id": "96226226-75ad-4647-8353-c2abb4eecbab",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        96
      ],
      "parameters": {
        "width": 516,
        "height": 288,
        "content": "### 1. Trigger & Classify\nSlack trigger captures the @mention, then OpenAI extracts the action and resource from natural language."
      }
    },
    {
      "id": "a83091f1-f07a-494d-834f-adb23750680a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        80
      ],
      "parameters": {
        "width": 268,
        "height": 304,
        "content": "### 2. Permission Gate\nPermit.io checks RBAC policy. The IF node branches on the result."
      }
    },
    {
      "id": "433a4b61-fb3d-461f-a18d-72a92a2e35b8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        -64
      ],
      "parameters": {
        "width": 548,
        "height": 352,
        "content": "### 3a. Allowed → Execute\nReplace this HTTP Request with your actual infra endpoint (GitHub Actions, ArgoCD, Jenkins, etc.)"
      }
    },
    {
      "id": "898d810a-fa16-406c-b08e-3d677c66ffee",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        160
      ],
      "parameters": {
        "width": 844,
        "height": 320,
        "content": "### 3b. Denied → Help\nTells the user what they CAN do and who to escalate to."
      }
    },
    {
      "id": "d7fe3502-734f-4d64-8a53-44d7596dd229",
      "name": "Slack Trigger - Bot Mention",
      "type": "n8n-nodes-base.slackTrigger",
      "position": [
        528,
        224
      ]
    },
    {
      "id": "f7b009d2-7db5-4c38-badc-4e84d5a5b607",
      "name": "Classify DevOps Intent",
      "type": "n8n-nodes-base.openAi",
      "position": [
        752,
        224
      ]
    },
    {
      "id": "e3f3bd66-7d50-402c-b5ab-54b70873fcc0",
      "name": "Check Permission",
      "type": "@permitio/n8n-nodes-permitio.permit",
      "position": [
        976,
        224
      ]
    },
    {
      "id": "0880127b-7f77-4658-975f-50ec1fa4e169",
      "name": "Is Allowed?",
      "type": "n8n-nodes-base.if",
      "position": [
        1200,
        224
      ]
    },
    {
      "id": "3b508186-d1f2-4ed1-a801-7b29e6df9413",
      "name": "Execute DevOps Action (Mock)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1424,
        128
      ]
    },
    {
      "id": "f549ad19-adf1-479f-8cb7-7028b92b870d",
      "name": "Slack - Action Succeeded",
      "type": "n8n-nodes-base.slack",
      "position": [
        1648,
        128
      ]
    },
    {
      "id": "60c248fe-3748-4b7a-9ea5-a8cb95965e3d",
      "name": "Get User Permissions",
      "type": "@permitio/n8n-nodes-permitio.permit",
      "position": [
        1424,
        320
      ]
    },
    {
      "id": "4b8739bf-7616-4c5c-b32f-42287a1e17c4",
      "name": "Get Authorized Users",
      "type": "@permitio/n8n-nodes-permitio.permit",
      "position": [
        1648,
        320
      ]
    },
    {
      "id": "80b9ad86-d7fe-47bc-bc42-c165b9b4fa10",
      "name": "Slack - Permission Denied",
      "type": "n8n-nodes-base.slack",
      "position": [
        1872,
        320
      ]
    }
  ],
  "connections": {
    "Is Allowed?": {
      "main": [
        [
          {
            "node": "Execute DevOps Action (Mock)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get User Permissions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Permission": {
      "main": [
        [
          {
            "node": "Is Allowed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Authorized Users": {
      "main": [
        [
          {
            "node": "Slack - Permission Denied",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User Permissions": {
      "main": [
        [
          {
            "node": "Get Authorized Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify DevOps Intent": {
      "main": [
        [
          {
            "node": "Check Permission",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack Trigger - Bot Mention": {
      "main": [
        [
          {
            "node": "Classify DevOps Intent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute DevOps Action (Mock)": {
      "main": [
        [
          {
            "node": "Slack - Action Succeeded",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}