{
  "name": "Fronterio — CI deploy status",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "ci-deploy-complete",
        "options": {}
      },
      "id": "d3c5f71c-1111-4a00-cccc-000000000001",
      "name": "GitHub Actions webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [240, 300],
      "webhookId": "ci-deploy-complete"
    },
    {
      "parameters": {
        "url": "https://fronterio.com/api/mcp/sse",
        "method": "POST",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer {{$credentials.fronterioApiKey}}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "jsonBody": "={\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"check_deployment_compliance\",\n    \"arguments\": {\n      \"agent_id\": \"{{$json.body.agent_id}}\",\n      \"target_platform\": \"{{$json.body.platform}}\",\n      \"environment\": \"{{$json.body.environment}}\"\n    }\n  }\n}",
        "options": {}
      },
      "id": "d3c5f71c-2222-4a00-cccc-000000000002",
      "name": "Pre-deploy compliance check",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [500, 300]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-1",
              "leftValue": "={{$json.result.content[0].passed}}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "true"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "d3c5f71c-3333-4a00-cccc-000000000003",
      "name": "Compliance passed?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [760, 300]
    },
    {
      "parameters": {
        "url": "https://fronterio.com/api/mcp/sse",
        "method": "POST",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer {{$credentials.fronterioApiKey}}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "jsonBody": "={\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"report_deployment_status\",\n    \"arguments\": {\n      \"agent_id\": \"{{$('GitHub Actions webhook').item.json.body.agent_id}}\",\n      \"platform\": \"{{$('GitHub Actions webhook').item.json.body.platform}}\",\n      \"environment\": \"{{$('GitHub Actions webhook').item.json.body.environment}}\",\n      \"status\": \"deployed\",\n      \"deployed_via\": \"ci_pipeline\",\n      \"commit_sha\": \"{{$('GitHub Actions webhook').item.json.body.commit_sha}}\"\n    }\n  }\n}",
        "options": {}
      },
      "id": "d3c5f71c-4444-4a00-cccc-000000000004",
      "name": "Report deployment success",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [1040, 200]
    },
    {
      "parameters": {
        "channel": "={{$env.SLACK_DEPLOY_CHANNEL}}",
        "text": "=:no_entry_sign: Fronterio blocked a deploy.\n\n• Agent: `{{$('GitHub Actions webhook').item.json.body.agent_id}}`\n• Platform: `{{$('GitHub Actions webhook').item.json.body.platform}}`\n• Environment: `{{$('GitHub Actions webhook').item.json.body.environment}}`\n• Commit: `{{$('GitHub Actions webhook').item.json.body.commit_sha}}`\n• Failures:\n```{{$json.result.content[0].failed_checks}}```\n\nFix the failing compliance checks in Fronterio, then re-run the deploy.",
        "otherOptions": {}
      },
      "id": "d3c5f71c-5555-4a00-cccc-000000000005",
      "name": "Alert deploy channel",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [1040, 400]
    }
  ],
  "connections": {
    "GitHub Actions webhook": {
      "main": [[{ "node": "Pre-deploy compliance check", "type": "main", "index": 0 }]]
    },
    "Pre-deploy compliance check": {
      "main": [[{ "node": "Compliance passed?", "type": "main", "index": 0 }]]
    },
    "Compliance passed?": {
      "main": [
        [{ "node": "Report deployment success", "type": "main", "index": 0 }],
        [{ "node": "Alert deploy channel", "type": "main", "index": 0 }]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "source": "fronterio.com/integrations/n8n",
    "description": "Called from a CI pipeline (GitHub Actions, GitLab CI, Jenkins) after a deploy. Runs Fronterio's pre-deploy compliance check (7 checks including FRIA, human oversight, conformity assessment). If all pass, reports the deploy to Fronterio so it lands in the governance dashboard. If any fail, Slacks the deploy channel instead of blessing the release. Set SLACK_DEPLOY_CHANNEL and POST {agent_id, platform, environment, commit_sha} from your CI step."
  }
}
