JamfのポリシーをCSVとしてSlackへエクスポートし、リアルタイム監査を行う
上級
これはSecOps分野の自動化ワークフローで、19個のノードを含みます。主にSet, Xml, Slack, Webhook, SplitOutなどのノードを使用。 JamfのポリシーをCSVにエクスポートしてSlackで即座に監査
前提条件
- •Slack Bot Token または Webhook URL
- •HTTP Webhookエンドポイント(n8nが自動生成)
- •ターゲットAPIの認証情報が必要な場合あり
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "894b3446666dc2807d20dfad165e2f6f3696905c2f8c352081f4fd666cdd7b1c",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "5ca81fc1-614a-4631-8c7c-e5245be5cf17",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-448,
-112
],
"parameters": {
"width": 260,
"height": 320,
"content": "## Set \nSet your jamf BaseURL \nfrom your jamf URL\nhttps://yourServer.jamfcloud.com"
},
"typeVersion": 1
},
{
"id": "ba77dd94-871d-42ff-821d-197568974504",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-112
],
"parameters": {
"color": 3,
"width": 188,
"height": 320,
"content": "## Get \nGet the list of policies from your jamf patch management"
},
"typeVersion": 1
},
{
"id": "7d304368-ae37-4508-b76d-d9f5dca6e353",
"name": "クリック",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-640,
80
],
"parameters": {},
"typeVersion": 1
},
{
"id": "359efbe9-baef-4136-85e2-ace0e53d0f21",
"name": "アイテムをループ処理",
"type": "n8n-nodes-base.splitInBatches",
"position": [
528,
32
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "361358cd-6e1a-4453-8d2b-5c1aa1f23476",
"name": "付箋8",
"type": "n8n-nodes-base.stickyNote",
"position": [
272,
-112
],
"parameters": {
"color": 6,
"width": 170,
"height": 320,
"content": "## Split\nSplit the array return into items"
},
"typeVersion": 1
},
{
"id": "d8ba1ba1-d77d-4062-801a-83a594b266a1",
"name": "Jamf Server",
"type": "n8n-nodes-base.set",
"position": [
-368,
48
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "d5945b47-962f-4cea-8bb8-a8f61ee468ec",
"name": "server",
"type": "string",
"value": "youserver"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "0f55f295-4b0c-49d4-8d99-2658d17742a2",
"name": "XML",
"type": "n8n-nodes-base.xml",
"onError": "continueRegularOutput",
"position": [
752,
-96
],
"parameters": {
"options": {},
"dataPropertyName": "=data"
},
"typeVersion": 1
},
{
"id": "b72b34e8-2c7c-4b19-81bf-a4bbfa730dd0",
"name": "Webhook-policies",
"type": "n8n-nodes-base.webhook",
"position": [
-640,
-112
],
"webhookId": "",
"parameters": {
"path": "",
"options": {}
},
"typeVersion": 2
},
{
"id": "ef2147db-2fc3-4906-ac31-864666bd755e",
"name": "付箋9",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
-112
],
"parameters": {
"color": 2,
"width": 188,
"height": 320,
"content": "## Convert \nJamf v1 api JSS uses xml, so this node is needed to convert the output to JSON"
},
"typeVersion": 1
},
{
"id": "f3e2dd39-75d2-4021-80a2-ba252066474e",
"name": "XML-JSON",
"type": "n8n-nodes-base.xml",
"position": [
96,
48
],
"parameters": {
"options": {},
"dataPropertyName": "=data"
},
"typeVersion": 1
},
{
"id": "bebaba2f-376e-4b3e-96af-7c9424f26108",
"name": "ポリシーIDを分割",
"type": "n8n-nodes-base.splitOut",
"position": [
320,
48
],
"parameters": {
"include": "selectedOtherFields",
"options": {},
"fieldToSplitOut": "policies.policy",
"fieldsToInclude": "server"
},
"typeVersion": 1
},
{
"id": "0ffca65c-85dc-47e6-96a1-a2ccfa79056e",
"name": "ポリシーIDを取得",
"type": "n8n-nodes-base.httpRequest",
"position": [
-128,
48
],
"parameters": {
"url": "=https://{{ $json.server }}.jamfcloud.com/JSSResource/policies",
"options": {},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "oAuth2Api",
"headerParameters": {
"parameters": [
{
"name": "Accept",
"value": "application/xml"
}
]
}
},
"credentials": {
"oAuth2Api": {
"id": "",
"name": ""
}
},
"typeVersion": 4.2
},
{
"id": "9ce5001c-3bb2-4afb-9e99-a6995e7a59ad",
"name": "ポリシー:idを取得",
"type": "n8n-nodes-base.httpRequest",
"position": [
752,
80
],
"parameters": {
"url": "=https://{{ $('Jamf Server').item.json.server }}.jamfcloud.com/JSSResource/policies/id/{{ $json['policies.policy'].id }}",
"options": {},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "oAuth2Api",
"headerParameters": {
"parameters": [
{
"name": "Accept",
"value": "application/xml"
}
]
}
},
"credentials": {
"oAuth2Api": {
"id": "",
"name": ""
}
},
"typeVersion": 4.2
},
{
"id": "d73f87b7-a4c2-4ac2-9986-fe4ba78e45b3",
"name": "Slackに投稿",
"type": "n8n-nodes-base.slack",
"position": [
1456,
-96
],
"webhookId": "4ae7b233-a125-4249-b76c-226b26340331",
"parameters": {
"options": {
"fileName": "Policies.csv",
"channelId": ""
},
"resource": "file"
},
"credentials": {
"slackApi": {
"id": "8kwaKSXWJHzDApmZ",
"name": "Slack"
}
},
"typeVersion": 2.3
},
{
"id": "6e5d07d9-6ef0-4a0b-b800-bcd6c1b4dc0c",
"name": "付箋10",
"type": "n8n-nodes-base.stickyNote",
"position": [
480,
-240
],
"parameters": {
"color": 4,
"width": 470,
"height": 520,
"content": "## Loop\n\nLoop on each ID to get the policy details.\nOnce done the XML output is converted to JSON\n"
},
"typeVersion": 1
},
{
"id": "a9352d9b-b4d4-4a42-b1f7-9a311312485b",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
976,
-240
],
"parameters": {
"height": 360,
"content": "## Set\nSet the fields to show in the XLSX output"
},
"typeVersion": 1
},
{
"id": "46f2f4ce-a981-465c-a5af-4d4316164385",
"name": "フィールドを設定",
"type": "n8n-nodes-base.set",
"position": [
1040,
-96
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bfeee80d-4878-4e0b-b4b1-84c648f901ff",
"name": "ID",
"type": "number",
"value": "={{ $json.policy.general.id }}"
},
{
"id": "be741659-a897-4190-837c-1e91958cd26f",
"name": "Policy Name",
"type": "string",
"value": "={{ $json.policy.general.name }}"
},
{
"id": "b69579f9-200b-4960-b985-62ccddf1251d",
"name": "Category",
"type": "string",
"value": "={{ $json.policy.general.category.name }}"
},
{
"id": "10420196-7d61-463b-ab21-b74929e1d0cb",
"name": "Trigger",
"type": "string",
"value": "={{ $json.policy.general.trigger }}"
},
{
"id": "fcfa2c98-d7b7-46cd-91a7-09f10c743ea6",
"name": "Frequency",
"type": "string",
"value": "={{ $json.policy.general.frequency }}"
},
{
"id": "744213ce-da86-4b07-9707-63c28dcbd5f0",
"name": "Scope - Computers",
"type": "string",
"value": "={{ \n $json.policy.scope.all_computers === \"true\"\n ? \"All\"\n : Array.isArray($json.policy.scope.computers?.computer)\n ? $json.policy.scope.computers.computer.length\n : $json.policy.scope.computers?.computer\n ? \"1\"\n : \"None\"\n}}\n"
},
{
"id": "dc229e19-652a-4c92-9b76-e4f4eae15c13",
"name": "Self Service",
"type": "string",
"value": "={{ $json.policy.self_service.use_for_self_service }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "fd80fda5-d6c8-4b26-b45c-7d60571064b2",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1248,
-240
],
"parameters": {
"color": 7,
"width": 340,
"height": 360,
"content": "## Convert & Send\nConvert the selected JSON field to xlsx and send the file to slack"
},
"typeVersion": 1
},
{
"id": "59596d74-768a-4e0f-9074-80580d1b5bf6",
"name": "変換",
"type": "n8n-nodes-base.convertToFile",
"position": [
1280,
-96
],
"parameters": {
"options": {},
"binaryPropertyName": "=data"
},
"typeVersion": 1.1
}
],
"pinData": {},
"connections": {
"0f55f295-4b0c-49d4-8d99-2658d17742a2": {
"main": [
[
{
"node": "46f2f4ce-a981-465c-a5af-4d4316164385",
"type": "main",
"index": 0
}
]
]
},
"7d304368-ae37-4508-b76d-d9f5dca6e353": {
"main": [
[
{
"node": "d8ba1ba1-d77d-4062-801a-83a594b266a1",
"type": "main",
"index": 0
}
]
]
},
"59596d74-768a-4e0f-9074-80580d1b5bf6": {
"main": [
[
{
"node": "d73f87b7-a4c2-4ac2-9986-fe4ba78e45b3",
"type": "main",
"index": 0
}
]
]
},
"f3e2dd39-75d2-4021-80a2-ba252066474e": {
"main": [
[
{
"node": "bebaba2f-376e-4b3e-96af-7c9424f26108",
"type": "main",
"index": 0
}
]
]
},
"46f2f4ce-a981-465c-a5af-4d4316164385": {
"main": [
[
{
"node": "59596d74-768a-4e0f-9074-80580d1b5bf6",
"type": "main",
"index": 0
}
]
]
},
"d8ba1ba1-d77d-4062-801a-83a594b266a1": {
"main": [
[
{
"node": "0ffca65c-85dc-47e6-96a1-a2ccfa79056e",
"type": "main",
"index": 0
}
]
]
},
"9ce5001c-3bb2-4afb-9e99-a6995e7a59ad": {
"main": [
[
{
"node": "359efbe9-baef-4136-85e2-ace0e53d0f21",
"type": "main",
"index": 0
}
]
]
},
"359efbe9-baef-4136-85e2-ace0e53d0f21": {
"main": [
[
{
"node": "0f55f295-4b0c-49d4-8d99-2658d17742a2",
"type": "main",
"index": 0
}
],
[
{
"node": "9ce5001c-3bb2-4afb-9e99-a6995e7a59ad",
"type": "main",
"index": 0
}
]
]
},
"0ffca65c-85dc-47e6-96a1-a2ccfa79056e": {
"main": [
[
{
"node": "f3e2dd39-75d2-4021-80a2-ba252066474e",
"type": "main",
"index": 0
}
]
]
},
"b72b34e8-2c7c-4b19-81bf-a4bbfa730dd0": {
"main": [
[
{
"node": "d8ba1ba1-d77d-4062-801a-83a594b266a1",
"type": "main",
"index": 0
}
]
]
},
"bebaba2f-376e-4b3e-96af-7c9424f26108": {
"main": [
[
{
"node": "359efbe9-baef-4136-85e2-ace0e53d0f21",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - セキュリティ運用
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
JamfのスマートグループメンバーシップをSlackへ可視CSVレポートとしてエクスポート
JamfのインテリジェントグループメンバーシップをSlackへ閲覧可能なCSVレポートとしてエクスポート
Set
Code
Slack
+
Set
Code
Slack
21 ノードJean-Marie Rizkallah
DevOps
n8nノードの探索(可視化リファレンスライブラリ内)
n8nノードを可視化リファレンスライブラリで探索
If
Ftp
Set
+
If
Ftp
Set
113 ノードI versus AI
その他
NucleiとProject Discoveryを使ったバウンティ有以下更多コンテンツを含む脆弱性リスクプロジェクトの自動CVEスキャン
NucleiとProject Discoveryを使用した自動 CVE スキャンによるバウンティプログラム
If
Set
Ssh
+
If
Set
Ssh
32 ノードJavier Rieiro
セキュリティ運用
AI生成WordPress記事要約ブロック
WordPress記事のAI生成要約ブロック
If
Set
Slack
+
If
Set
Slack
32 ノードDataki
人工知能
潜在顧客開掘とメールワーキングフロー
Google Maps、SendGrid、AIを使用してB2Bリード獲得とメールマーケティングを自動化
If
Set
Code
+
If
Set
Code
141 ノードEzema Kingsley Chibuzo
リード獲得
OpenAI、RunwayML、ElevenLabsを使って無顔の短い動画を自動化
OpenAI、RunwayML、ElevenLabs を使ってアニメ顔の短い動画を自動化:スクリプトからソーシャルメディアへ
Set
Code
Wait
+
Set
Code
Wait
56 ノードLeeWei
コンテンツ作成