8
n8n 中文网amn8n.com

监控Jamf策略完整性并发送Slack变更警报

高级

这是一个自动化工作流,包含 23 个节点。主要使用 If, Set, Xml, Code, Slack 等节点。 监控Jamf策略完整性并在变更时发送Slack警报

前置要求
  • Slack Bot Token 或 Webhook URL
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "894b3446666dc2807d20dfad165e2f6f3696905c2f8c352081f4fd666cdd7b1c",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "b944be24-1707-46da-8df2-7279dc87beea",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -288,
        336
      ],
      "webhookId": "78761599-3932-41f1-9668-fd019bd40680",
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "e383809e-c269-4965-8594-d9c0d0a558f5",
      "name": "ID",
      "type": "n8n-nodes-base.set",
      "position": [
        96,
        160
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "db2c7535-cbfd-42af-9431-ec6c9a1ce9a8",
      "name": "拆分群组",
      "type": "n8n-nodes-base.code",
      "position": [
        288,
        160
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "4cfb00a3-8350-41ca-a02b-dc0467c4e208",
      "name": "Jamf Server",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        160
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "c2348a64-e068-433d-9857-2d353828276e",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -288,
        160
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "c7c8fed1-8bd1-445b-a32d-05d54c3e93e2",
      "name": "Hash_policy",
      "type": "n8n-nodes-base.crypto",
      "position": [
        880,
        160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "044ba5a6-26dc-49d6-87c6-7f7931d6fab4",
      "name": "条件哈希差异",
      "type": "n8n-nodes-base.if",
      "position": [
        1376,
        240
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "d34c5b21-6e2b-45c5-82d9-b0cc9421b9bd",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -32
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "48807bc8-d4d2-4764-b34c-c10452d68420",
      "name": "更新哈希",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1648,
        224
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "68d57c39-8a80-4de9-8635-f34dbd2d7d4e",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        -32
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "3d353ccc-b7b4-4482-8f52-94ff3b8f9c2a",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -32
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "59d4b110-4ce6-4332-9a92-95a70fb20020",
      "name": "获取 /id",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        512,
        160
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "14449796-3ced-4fed-860a-55fd8c36caa8",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -32
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "6ff80123-f16a-4161-aad6-93faa1296f39",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        -32
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "4628148c-f2ae-4f55-820c-0ace384d4e5d",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -32
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "3fa8915a-7ffd-467e-9ecf-adff5200ef7f",
      "name": "插入新策略",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1248,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7f5dc520-448e-4c37-984a-3a137f27542b",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        -32
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "3019b883-8663-4cd5-b6c5-708656197728",
      "name": "如果策略不存在",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1088,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d752d43a-23bc-4f4b-bb2f-52310d02031f",
      "name": "获取策略",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1216,
        240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c40c8a36-415d-4f0e-9ab0-1b022744ecc9",
      "name": "XML 转 JSON",
      "type": "n8n-nodes-base.xml",
      "position": [
        704,
        160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5771408f-6435-450e-8e83-143c6f312aa1",
      "name": "手动执行",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -288,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "297db7c0-a007-49e2-82fa-9a0c61c3ba9b",
      "name": "发送警报到 Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1808,
        224
      ],
      "webhookId": "e0f4910c-2332-4a87-b946-fd9cff9f4d1c",
      "parameters": {},
      "typeVersion": 2.3
    },
    {
      "id": "1595181f-f216-4a29-a817-22f1a5d48c44",
      "name": "无操作,不执行任何操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1424,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "IDs": {
      "main": [
        [
          {
            "node": "Split groups",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get /id": {
      "main": [
        [
          {
            "node": "XML to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Jamf Server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Policy": {
      "main": [
        [
          {
            "node": "Condition hash Diff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hash_policy": {
      "main": [
        [
          {
            "node": "If Policy does not exist",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Policy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jamf Server": {
      "main": [
        [
          {
            "node": "IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Hash": {
      "main": [
        [
          {
            "node": "Send Alert to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "XML to JSON": {
      "main": [
        [
          {
            "node": "Hash_policy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split groups": {
      "main": [
        [
          {
            "node": "Get /id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Execution": {
      "main": [
        [
          {
            "node": "Jamf Server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Jamf Server",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert new Policy": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Condition hash Diff": {
      "main": [
        [
          {
            "node": "Update Hash",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Alert to Slack": {
      "main": [
        []
      ]
    },
    "If Policy does not exist": {
      "main": [
        [
          {
            "node": "Insert new Policy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量23
分类-
节点类型13
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
外部链接
在 n8n.io 查看

分享此工作流