Exportar estrategias de Jamf como CSV a Slack para una auditoría instantánea

Avanzado

Este es unSecOpsflujo de automatización del dominio deautomatización que contiene 19 nodos.Utiliza principalmente nodos como Set, Xml, Slack, Webhook, SplitOut. Exportar estrategias de Jamf como CSV a Slack para auditorías instantáneas

Requisitos previos
  • Bot Token de Slack o URL de Webhook
  • Punto final de HTTP Webhook (n8n generará automáticamente)
  • Pueden requerirse credenciales de autenticación para la API de destino
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "894b3446666dc2807d20dfad165e2f6f3696905c2f8c352081f4fd666cdd7b1c",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "5ca81fc1-614a-4631-8c7c-e5245be5cf17",
      "name": "Nota adhesiva",
      "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": "Nota adhesiva1",
      "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": "Click",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -640,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "359efbe9-baef-4136-85e2-ace0e53d0f21",
      "name": "Recorrer elementos",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        528,
        32
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "361358cd-6e1a-4453-8d2b-5c1aa1f23476",
      "name": "Nota adhesiva8",
      "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": "Disparador Webhook-policies",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -640,
        -112
      ],
      "webhookId": "",
      "parameters": {
        "path": "",
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "ef2147db-2fc3-4906-ac31-864666bd755e",
      "name": "Nota adhesiva9",
      "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": "Split Policies 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": "Get Policies ids",
      "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": "Get Policy: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": "Post to 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": "Nota adhesiva10",
      "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": "Nota adhesiva2",
      "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": "Establecer-fields",
      "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": "Nota adhesiva3",
      "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": "Convert",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1280,
        -96
      ],
      "parameters": {
        "options": {},
        "binaryPropertyName": "=data"
      },
      "typeVersion": 1.1
    }
  ],
  "pinData": {},
  "connections": {
    "0f55f295-4b0c-49d4-8d99-2658d17742a2": {
      "main": [
        [
          {
            "node": "Set-fields",
            "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
          }
        ]
      ]
    },
    "Set-fields": {
      "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": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "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
          }
        ]
      ]
    },
    "Webhook-policies": {
      "main": [
        [
          {
            "node": "d8ba1ba1-d77d-4062-801a-83a594b266a1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bebaba2f-376e-4b3e-96af-7c9424f26108": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Avanzado - Operaciones de seguridad

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos19
Categoría1
Tipos de nodos10
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34