{
  "name": "Route revenue transactions and assess AI outputs with Anthropic Claude and OpenAI",
  "nodes": [
    {
      "id": "db738604-8327-4e32-ab93-6d50f8ba509d",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1760,
        272
      ]
    },
    {
      "id": "efc35e80-b30d-41c1-bdef-72164d24f257",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1536,
        272
      ]
    },
    {
      "id": "df98c1e9-4a36-4c82-bd08-86ec75692913",
      "name": "Generate Sample Revenue Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -1312,
        272
      ]
    },
    {
      "id": "f595713f-ea15-4fb1-a12a-0de19d33a0f6",
      "name": "Revenue Signal Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1088,
        272
      ]
    },
    {
      "id": "620cc606-6e7f-4ecb-90e5-c061d59f402d",
      "name": "Anthropic Model - Revenue Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -1136,
        496
      ]
    },
    {
      "id": "9ccec2a0-45e4-450b-9ff8-e60411241f17",
      "name": "Revenue Validation Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -960,
        496
      ]
    },
    {
      "id": "1cf414c1-845c-4b44-b800-1b5e6475ab7c",
      "name": "Route by Validation Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        -720,
        256
      ]
    },
    {
      "id": "67e8c79f-fdd6-46ed-a8c3-838e52fde728",
      "name": "Governance Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -64,
        160
      ]
    },
    {
      "id": "12c8f11d-128e-4f4c-a950-4681e50c02fe",
      "name": "Anthropic Model - Governance Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -544,
        416
      ]
    },
    {
      "id": "df19c336-4777-4226-ba63-ad882c4a133e",
      "name": "Governance Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -384,
        416
      ]
    },
    {
      "id": "2ce36366-6d51-48ec-8377-b3d6931d9dce",
      "name": "Payout Calculation Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -256,
        320
      ]
    },
    {
      "id": "a98def78-bddb-4222-be9a-185166f6d677",
      "name": "Anthropic Model - Payout Tool",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -288,
        528
      ]
    },
    {
      "id": "0c11a85d-e50a-4ba6-a1c9-60a38d0d3e88",
      "name": "Payout Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -96,
        528
      ]
    },
    {
      "id": "048485d2-6495-47cb-ab3e-b2a147b18b12",
      "name": "Compliance Check Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        80,
        320
      ]
    },
    {
      "id": "20ac6c4a-fc90-4c38-9ebb-7b29a9e3dd82",
      "name": "Anthropic Model - Compliance Tool",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        80,
        528
      ]
    },
    {
      "id": "0faaddfc-bc84-42a0-9c46-a12640c9ef0d",
      "name": "Compliance Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        288,
        528
      ]
    },
    {
      "id": "980e3b90-cf06-4950-ada9-686b89344ee5",
      "name": "Risk Assessment Agent Tool",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        416,
        320
      ]
    },
    {
      "id": "4faf3fcf-f1bb-47f0-9795-5f615570ea56",
      "name": "Anthropic Model - Risk Tool",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        464,
        528
      ]
    },
    {
      "id": "03e934aa-e94f-4a1a-9e71-9917c51d0030",
      "name": "Risk Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        672,
        528
      ]
    },
    {
      "id": "2884bb07-51e7-44a2-82ee-dbc205f6fbcf",
      "name": "Tax Calculation Tool",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "position": [
        752,
        320
      ]
    },
    {
      "id": "d426c3d8-991d-4a6e-8660-424784a34a05",
      "name": "Route by Risk Level",
      "type": "n8n-nodes-base.switch",
      "position": [
        960,
        176
      ]
    },
    {
      "id": "18e94122-9075-4bd7-9ada-3e071a1ebeb4",
      "name": "Store Approved Transactions",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1232,
        160
      ]
    },
    {
      "id": "2923b02c-fdf9-4ebc-ab17-4ae234c4ee93",
      "name": "Store High Risk Transactions",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1232,
        352
      ]
    },
    {
      "id": "33d297e6-5c13-45e6-bd3b-c493b4e05ea1",
      "name": "Store Failed Validations",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1232,
        624
      ]
    },
    {
      "id": "952da337-e41a-457f-a761-33a74441de92",
      "name": "Aggregate Results",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1712,
        352
      ]
    },
    {
      "id": "7602ac53-2a83-4837-9967-72723ef30073",
      "name": "Reporting Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1904,
        352
      ]
    },
    {
      "id": "ee1d7cf1-9f79-4724-a3f3-b4c53b3c4ecc",
      "name": "Anthropic Model - Reporting Agent",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        1904,
        576
      ]
    },
    {
      "id": "7c0469a2-d685-44dc-a8cb-cdda7505974d",
      "name": "Reporting Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2096,
        576
      ]
    },
    {
      "id": "88471f6a-f42c-45b9-a18e-1e071ccc325d",
      "name": "Store Final Report",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2256,
        352
      ]
    },
    {
      "id": "830ded1e-2509-48b2-8a38-8dadcd83315a",
      "name": "Merge Storage Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        1456,
        336
      ]
    },
    {
      "id": "ac70415b-8948-4240-b764-a152d9ba4775",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -368
      ],
      "parameters": {
        "width": 576,
        "height": 320,
        "content": "## Prerequisites\nActive API accounts for Anthropic Claude and OpenAI. \n## Use Cases\nCustomer support ticket routing and quality monitoring. \n## Customization\nAdjust classification logic by modifying v"
      }
    },
    {
      "id": "50f3ab4c-90ba-4bfb-a10a-4a9a5f73e8d5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -336
      ],
      "parameters": {
        "width": 544,
        "height": 304,
        "content": "\n## Setup Steps\n1. Connect Anthropic and OpenAI  API credentials in n8n credentials manager\n2. Configure Google Sheets connection for storing validation results and flagged responses\n3. Set Schedule T"
      }
    },
    {
      "id": "fcd6b834-7e0c-4ee2-a6a3-4103bd03a628",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -304
      ],
      "parameters": {
        "width": 848,
        "height": 224,
        "content": "## How It Works\nThis workflow automates intelligent routing of user queries to optimal AI models (Anthropic, OpenAI) based on complexity analysis, then validates outputs through multi-stage quality as"
      }
    },
    {
      "id": "a67991d2-9ac7-4fb0-927c-f8783462236e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        32
      ],
      "parameters": {
        "width": 752,
        "height": 832,
        "content": "## Assess Risk  \n**What:** Assess risk simultaneously.\n**Why:** Comprehensive quality assurance  "
      }
    },
    {
      "id": "f307ecd2-f8dd-4bc4-8045-3334f07bedd0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        32
      ],
      "parameters": {
        "width": 1440,
        "height": 736,
        "content": "## Model-Specific Agents\n**What:** Anthropic and OpenAI generate responses based on routing.\n**Why:** Leverages each model's strengths for optimal performance."
      }
    },
    {
      "id": "a1340649-9522-4ecc-9623-dc0e8d95353f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        32
      ],
      "parameters": {
        "width": 1248,
        "height": 720,
        "content": "## Query Classification\n**What:** Categorizes incoming requests by complexity and domain.\n**Why:** Determines optimal routing path and appropriate model selection."
      }
    },
    {
      "id": "a601b9df-eff4-478d-97b1-629803747d45",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        32
      ],
      "parameters": {
        "width": 832,
        "height": 832,
        "content": "\n## Results Reporting \n**What:** Consolidates validation scores and flags issues.\n**Why:** Provides unified quality metrics for decision-making  "
      }
    }
  ],
  "connections": {
    "Reporting Agent": {
      "main": [
        [
          {
            "node": "Store Final Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Governance Agent": {
      "main": [
        [
          {
            "node": "Route by Risk Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Results": {
      "main": [
        [
          {
            "node": "Reporting Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Risk Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Risk Assessment Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Route by Risk Level": {
      "main": [
        [
          {
            "node": "Store Approved Transactions",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store High Risk Transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Payout Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Payout Calculation Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Revenue Signal Agent": {
      "main": [
        [
          {
            "node": "Route by Validation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tax Calculation Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Merge Storage Results": {
      "main": [
        [
          {
            "node": "Aggregate Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Generate Sample Revenue Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reporting Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Reporting Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Compliance Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Compliance Check Agent Tool",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Governance Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Governance Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Store Failed Validations": {
      "main": [
        [
          {
            "node": "Merge Storage Results",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Risk Assessment Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Route by Validation Status": {
      "main": [
        [
          {
            "node": "Governance Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store Failed Validations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Risk Tool": {
      "ai_languageModel": [
        [
          {
            "node": "Risk Assessment Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Compliance Check Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Store Approved Transactions": {
      "main": [
        [
          {
            "node": "Merge Storage Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Sample Revenue Data": {
      "main": [
        [
          {
            "node": "Revenue Signal Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store High Risk Transactions": {
      "main": [
        [
          {
            "node": "Merge Storage Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Anthropic Model - Payout Tool": {
      "ai_languageModel": [
        [
          {
            "node": "Payout Calculation Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Payout Calculation Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "Governance Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Revenue Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Revenue Signal Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Revenue Validation Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Revenue Signal Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Compliance Tool": {
      "ai_languageModel": [
        [
          {
            "node": "Compliance Check Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Reporting Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Reporting Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Model - Governance Agent": {
      "ai_languageModel": [
        [
          {
            "node": "Governance Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}