{
  "name": "Smart Router Workflow",
  "nodes": [
    {
      "parameters": {
        "path": "smart-router",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Smart Router Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "content-request",
              "leftValue": "={{ $json.requestType }}",
              "rightValue": "content",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            },
            {
              "id": "social-request",
              "leftValue": "={{ $json.requestType }}",
              "rightValue": "social",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            },
            {
              "id": "email-request",
              "leftValue": "={{ $json.requestType }}",
              "rightValue": "email",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "id": "smart-router",
      "name": "Route Request",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:5678/webhook/content-generator",
        "sendQuery": false,
        "sendHeaders": false,
        "sendBody": true,
        "contentType": "json",
        "body": "={{ $json }}"
      },
      "id": "content-route",
      "name": "Route to Content Factory",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        180
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:5678/webhook/social-media",
        "sendQuery": false,
        "sendHeaders": false,
        "sendBody": true,
        "contentType": "json",
        "body": "={{ $json }}"
      },
      "id": "social-route",
      "name": "Route to Social Media",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:5678/webhook/email-automation",
        "sendQuery": false,
        "sendHeaders": false,
        "sendBody": true,
        "contentType": "json",
        "body": "={{ $json }}"
      },
      "id": "email-route",
      "name": "Route to Email Automation",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        420
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={ \"status\": \"routed\", \"target\": \"{{ $json.requestType }}\", \"timestamp\": \"{{ new Date().toISOString() }}\" }"
      },
      "id": "success-response",
      "name": "Success Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        900,
        300
      ]
    }
  ],
  "connections": {
    "Smart Router Webhook": {
      "main": [
        [
          {
            "node": "Route Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Request": {
      "main": [
        [
          {
            "node": "Route to Content Factory",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Route to Social Media",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Route to Email Automation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Content Factory": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Social Media": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Email Automation": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [
    "automation",
    "routing"
  ],
  "triggerCount": 1,
  "updatedAt": "2024-01-15T00:00:00.000Z",
  "versionId": "1"
}