{
  "id": "beuPPZxGmHhhRxKV",
  "name": "Real-Time Tax Compliance Watchdog with Automated Revenue Monitoring and Correction",
  "tags": [],
  "nodes": [
    {
      "id": "8f49106b-66b2-4ed2-aac1-3636e1c39014",
      "name": "Weekly/Monthly Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1584,
        192
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "322d8833-24da-49bd-98f1-95f38ab8d0c0",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1360,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "revenueApiUrl",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Revenue API endpoint URL__>"
            },
            {
              "id": "id-2",
              "name": "accountingSoftwareApiUrl",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Accounting software API endpoint URL__>"
            },
            {
              "id": "id-3",
              "name": "taxAgentEmail",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Tax agent email address__>"
            },
            {
              "id": "id-4",
              "name": "reportingPeriod",
              "type": "string",
              "value": "weekly"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "1d3a2dc1-a92a-4283-9104-d59900c2dae5",
      "name": "Fetch Revenue Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1136,
        192
      ],
      "parameters": {
        "url": "={{ $('Workflow Configuration').first().json.revenueApiUrl }}",
        "options": {}
      },
      "typeVersion": 4.3
    },
    {
      "id": "16817c07-e0f5-4a7b-9cca-0aee2cd54a18",
      "name": "Tax Categorization Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -912,
        192
      ],
      "parameters": {
        "text": "={{ $json }}",
        "options": {
          "systemMessage": "You are a tax compliance specialist AI that categorizes revenue streams according to tax rules.\n\nYour task is to:\n1. Analyze each revenue transaction from the input data\n2. Categorize each transaction by the appropriate tax rule (e.g., sales tax, VAT, income tax, exempt)\n3. Identify the tax jurisdiction and applicable rate\n4. Flag any transactions that require special attention\n5. Return structured data with categorized transactions\n\nBe thorough and accurate in your categorization as this affects tax compliance."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "bea797b8-f2e6-4d5f-9cd2-d33c1ed3cb89",
      "name": "OpenAI Model - Categorization",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -912,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "2b86f88c-d35e-47ee-a161-45b3d13ae6fa",
      "name": "Categorization Output Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -784,
        416
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"transactionId\": {\n      \"type\": \"string\"\n    },\n    \"amount\": {\n      \"type\": \"number\"\n    },\n    \"currency\": {\n      \"type\": \"string\"\n    },\n    \"taxCategory\": {\n      \"type\": \"string\"\n    },\n    \"taxRate\": {\n      \"type\": \"number\"\n    },\n    \"jurisdiction\": {\n      \"type\": \"string\"\n    },\n    \"requiresAttention\": {\n      \"type\": \"boolean\"\n    },\n    \"notes\": {\n      \"type\": \"string\"\n    }\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "b7100f4f-f7bb-4019-9b47-398a2806449f",
      "name": "Anomaly Detection Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -560,
        192
      ],
      "parameters": {
        "text": "={{ $json }}",
        "options": {
          "systemMessage": "You are an anomaly detection specialist for tax compliance.\n\nYour task is to:\n1. Review the categorized revenue transactions\n2. Detect anomalies such as:\n   - Missing invoices or documentation\n   - Incorrect tax categories\n   - Unusual transaction patterns\n   - Mismatched amounts or rates\n   - Duplicate entries\n3. Assess the severity of each anomaly (low, medium, high, critical)\n4. Provide detailed explanations for each detected issue\n5. Return structured data with anomaly findings\n\nBe vigilant and thorough in detecting compliance issues."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "b395cbf8-fb81-4d14-bc91-e5dd4c56faef",
      "name": "OpenAI Model - Anomaly Detection",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -560,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "c987f22d-a7d5-4db5-adc2-d225baae3bdd",
      "name": "Anomaly Detection Output Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -432,
        416
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"hasAnomalies\": {\n\t\t\t\"type\": \"boolean\"\n\t\t},\n\t\t\"anomalyCount\": {\n\t\t\t\"type\": \"number\"\n\t\t},\n\t\t\"anomalies\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"properties\": {\n\t\t\t\t\t\"transactionId\": {\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t\"issueType\": {\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t\"severity\": {\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t\"description\": {\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t\"suggestedCorrection\": {\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "ee406ebb-facc-4e0e-80c1-809be7c139dc",
      "name": "Check for Anomalies",
      "type": "n8n-nodes-base.if",
      "position": [
        -208,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $('Anomaly Detection Agent').item.json.hasAnomalies }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "45d1810c-1ad4-4688-bb06-bd87d307808f",
      "name": "Correction Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        32,
        304
      ],
      "parameters": {
        "text": "={{ $json }}",
        "options": {
          "systemMessage": "You are a tax correction specialist AI.\n\nYour task is to:\n1. Review the detected anomalies and issues\n2. Generate precise corrections for each issue\n3. Draft corrected transaction records with proper tax categorization\n4. Provide clear explanations for each correction\n5. Ensure all corrections comply with tax regulations\n6. Return structured correction data ready for accounting system sync\n\nBe accurate and compliant in all corrections."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "ed852ea8-9646-4c7b-8a11-c39af3553421",
      "name": "OpenAI Model - Correction",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        32,
        528
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "dbb559c6-2ee1-4e4d-83ec-9a1050b190e2",
      "name": "Correction Output Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        160,
        528
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"correctionCount\": {\n\t\t\t\"type\": \"number\",\n\t\t\t\"description\": \"Total number of corrections made\"\n\t\t},\n\t\t\"corrections\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"properties\": {\n\t\t\t\t\t\"transactionId\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"Unique identifier for the transaction\"\n\t\t\t\t\t},\n\t\t\t\t\t\"originalValue\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"Original value before correction\"\n\t\t\t\t\t},\n\t\t\t\t\t\"correctedValue\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"Corrected value\"\n\t\t\t\t\t},\n\t\t\t\t\t\"correctionType\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"Type of correction applied\"\n\t\t\t\t\t},\n\t\t\t\t\t\"explanation\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"Explanation for the correction\"\n\t\t\t\t\t},\n\t\t\t\t\t\"timestamp\": {\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"description\": \"Timestamp when correction was made\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"required\": [\"transactionId\", \"originalValue\", \"correctedValue\", \"correctionType\", \"explanation\", \"timestamp\"]\n\t\t\t}\n\t\t}\n\t},\n\t\"required\": [\"correctionCount\", \"corrections\"]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "8a5eebab-df48-4051-ab41-5e9a0b29eb58",
      "name": "Sync to Accounting Software",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        320
      ],
      "parameters": {
        "url": "={{ $('Workflow Configuration').first().json.accountingSoftwareApiUrl }}",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ $json }}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.3
    },
    {
      "id": "661d1922-f278-4b0a-be80-df2d53abb465",
      "name": "Aggregate All Results",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        640,
        192
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "ea90a3f4-c89f-44b2-bb96-a1b7b9896771",
      "name": "Generate Compliance Summary",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        192
      ],
      "parameters": {
        "jsCode": "// Generate Comprehensive Compliance Summary Report\nconst items = $input.all();\n\n// Initialize counters and data structures\nlet totalTransactions = 0;\nlet categorizedTransactions = 0;\nlet anomaliesDetected = 0;\nlet correctionsMade = 0;\nlet syncedTransactions = 0;\nlet failedSyncs = 0;\n\nconst categoryBreakdown = {};\nconst anomalyTypes = [];\nconst correctionDetails = [];\n\n// Process all items to gather statistics\nitems.forEach(item => {\n  const data = item.json;\n  \n  // Count total transactions\n  totalTransactions++;\n  \n  // Track categorization\n  if (data.category || data.taxCategory) {\n    categorizedTransactions++;\n    const category = data.category || data.taxCategory;\n    categoryBreakdown[category] = (categoryBreakdown[category] || 0) + 1;\n  }\n  \n  // Track anomalies\n  if (data.hasAnomaly || data.anomalyDetected) {\n    anomaliesDetected++;\n    if (data.anomalyType) {\n      anomalyTypes.push(data.anomalyType);\n    }\n  }\n  \n  // Track corrections\n  if (data.corrected || data.correctionApplied) {\n    correctionsMade++;\n    if (data.correctionDetails) {\n      correctionDetails.push(data.correctionDetails);\n    }\n  }\n  \n  // Track sync status\n  if (data.syncStatus === 'success' || data.synced === true) {\n    syncedTransactions++;\n  } else if (data.syncStatus === 'failed' || data.synced === false) {\n    failedSyncs++;\n  }\n});\n\n// Calculate compliance score (0-100)\nlet complianceScore = 100;\n\n// Deduct points for anomalies\nif (totalTransactions > 0) {\n  const anomalyRate = (anomaliesDetected / totalTransactions) * 100;\n  complianceScore -= anomalyRate * 0.5; // 0.5 point per 1% anomaly rate\n}\n\n// Deduct points for failed syncs\nif (totalTransactions > 0) {\n  const failedSyncRate = (failedSyncs / totalTransactions) * 100;\n  complianceScore -= failedSyncRate * 0.3; // 0.3 point per 1% failed sync rate\n}\n\n// Bonus points for corrections made\nif (anomaliesDetected > 0) {\n  const correctionRate = (correctionsMade / anomaliesDetected) * 100;\n  complianceScore += correctionRate * 0.1; // 0.1 point per 1% correction rate\n}\n\n// Ensure score is between 0 and 100\ncomplianceScore = Math.max(0, Math.min(100, complianceScore));\n\n// Determine compliance status\nlet complianceStatus = 'Excellent';\nif (complianceScore < 95) complianceStatus = 'Good';\nif (complianceScore < 85) complianceStatus = 'Fair';\nif (complianceScore < 70) complianceStatus = 'Needs Attention';\nif (complianceScore < 50) complianceStatus = 'Critical';\n\n// Generate summary report\nconst summary = {\n  reportDate: new Date().toISOString(),\n  complianceScore: Math.round(complianceScore * 100) / 100,\n  complianceStatus: complianceStatus,\n  \n  transactionSummary: {\n    totalTransactions: totalTransactions,\n    categorizedTransactions: categorizedTransactions,\n    categorizationRate: totalTransactions > 0 ? Math.round((categorizedTransactions / totalTransactions) * 100) : 0\n  },\n  \n  categorizationBreakdown: categoryBreakdown,\n  \n  anomalySummary: {\n    anomaliesDetected: anomaliesDetected,\n    anomalyRate: totalTransactions > 0 ? Math.round((anomaliesDetected / totalTransactions) * 100) : 0,\n    anomalyTypes: [...new Set(anomalyTypes)]\n  },\n  \n  correctionSummary: {\n    correctionsMade: correctionsMade,\n    correctionRate: anomaliesDetected > 0 ? Math.round((correctionsMade / anomaliesDetected) * 100) : 0,\n    correctionDetails: correctionDetails\n  },\n  \n  syncStatus: {\n    syncedTransactions: syncedTransactions,\n    failedSyncs: failedSyncs,\n    syncSuccessRate: totalTransactions > 0 ? Math.round((syncedTransactions / totalTransactions) * 100) : 0\n  },\n  \n  recommendations: []\n};\n\n// Add recommendations based on findings\nif (anomaliesDetected > 0 && correctionsMade < anomaliesDetected) {\n  summary.recommendations.push('Review and correct remaining anomalies to improve compliance score');\n}\n\nif (failedSyncs > 0) {\n  summary.recommendations.push('Investigate and resolve failed synchronizations with accounting software');\n}\n\nif (complianceScore < 85) {\n  summary.recommendations.push('Compliance score is below optimal level - immediate review recommended');\n}\n\nif (categorizedTransactions < totalTransactions) {\n  summary.recommendations.push('Some transactions remain uncategorized - complete categorization for full compliance');\n}\n\nreturn [{ json: summary }];"
      },
      "typeVersion": 2
    },
    {
      "id": "1c698131-8753-48f9-80fc-cdf507230042",
      "name": "Send Summary to Tax Agent",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1040,
        192
      ],
      "parameters": {
        "sendTo": "={{ $('Workflow Configuration').first().json.taxAgentEmail }}",
        "message": "={{ $('Generate Compliance Summary').first().json.summary }}",
        "options": {},
        "subject": "={{ 'Tax Compliance Summary - ' + $now.format('MMMM DD, YYYY') }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "646bcfe2-8a19-4927-b782-b18a13fe4518",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -224
      ],
      "parameters": {
        "color": 6,
        "width": 528,
        "height": 208,
        "content": "## Customization  \nAdjust anomaly thresholds per business rules, customize categorization rules for industry standards \n\n## Benefits \nReduces data validation time by 85%, eliminates manual categorization errors, detects fraud patterns"
      },
      "typeVersion": 1
    },
    {
      "id": "a39aa04f-d63f-496f-b9f0-accb8d65f19d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -192
      ],
      "parameters": {
        "color": 3,
        "width": 640,
        "height": 176,
        "content": "## Prerequisites  \nOpenAI API key, accounting software credentials, revenue data source connectivity, Gmail account \n\n## Use Cases  \nAccounting firm multi-client processing, monthly/quarterly tax compliance "
      },
      "typeVersion": 1
    },
    {
      "id": "8a999795-9b58-49e5-a48b-90a009e4908d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        -192
      ],
      "parameters": {
        "color": 5,
        "width": 448,
        "height": 208,
        "content": "## Setup Steps  \n1. Configure OpenAI API keys for categorization and anomaly detection models\n2. Connect revenue data source and accounting software  \n3. Define anomaly detection thresholds and categorization \n4. Set email templates for tax agent communication\n5. Configure weekly schedule trigger timing\n "
      },
      "typeVersion": 1
    },
    {
      "id": "989857da-2ad0-4ca8-9147-75d125ee311e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        -192
      ],
      "parameters": {
        "width": 688,
        "height": 224,
        "content": "## How It Works \nAutomates revenue data validation and intelligent anomaly detection with scheduled weekly processing. Fetches revenue data, applies dual OpenAI models for categorization and anomaly detection, identifies outliers or suspicious patterns, and synchronizes clean data with accounting software. Includes correction workflow through Connection Agent for data quality remediation. System generates compliance summaries and automatically sends reports to tax agents via Gmail. Designed for accounting firms, tax professionals, and finance teams requiring enterprise-grade data validation, fraud detection, and regulatory compliance without manual review bottlenecks."
      },
      "typeVersion": 1
    },
    {
      "id": "437ff991-0ad2-4676-b882-3d91c108ce40",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 640,
        "content": "## Accounting System Sync\n\n**Why:** Maintains a single source of truth by syncing validated data to accounting software via secure connectors."
      },
      "typeVersion": 1
    },
    {
      "id": "8c2e8ec3-d823-4b8c-9c7b-7493c337b063",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 912,
        "height": 576,
        "content": "## Tax Classification & Validation\n\n**Why:** Applies AI-driven tax categorization and anomaly detection to ensure correct tax treatment, identify errors, and flag compliance risks."
      },
      "typeVersion": 1
    },
    {
      "id": "754d6826-2599-4acf-94b1-16b2deecf1fe",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 688,
        "height": 400,
        "content": "## Schedule & Data Ingestion\n\n**Why:** Ensures timely validation and consistent compliance cycles by fetching revenue data on a fixed schedule."
      },
      "typeVersion": 1
    },
    {
      "id": "ab6e7021-156c-470c-bde8-c557eacfdd4b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        48
      ],
      "parameters": {
        "color": 7,
        "width": 624,
        "height": 528,
        "content": "\n## Compliance Reporting & Submission\n\n**Why:** Generates audit-ready summaries and delivers reports to tax agents for timely review and filing."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6cbae6eb-f329-4a4f-adbc-2eb2fc2cd9e4",
  "connections": {
    "Correction Agent": {
      "main": [
        [
          {
            "node": "Sync to Accounting Software",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Revenue Data": {
      "main": [
        [
          {
            "node": "Tax Categorization Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Anomalies": {
      "main": [
        [
          {
            "node": "Correction Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Aggregate All Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All Results": {
      "main": [
        [
          {
            "node": "Generate Compliance Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Fetch Revenue Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anomaly Detection Agent": {
      "main": [
        [
          {
            "node": "Check for Anomalies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly/Monthly Schedule": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Correction Output Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Correction Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Tax Categorization Agent": {
      "main": [
        [
          {
            "node": "Anomaly Detection Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Correction": {
      "ai_languageModel": [
        [
          {
            "node": "Correction Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Compliance Summary": {
      "main": [
        [
          {
            "node": "Send Summary to Tax Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync to Accounting Software": {
      "main": [
        [
          {
            "node": "Aggregate All Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Categorization Output Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Tax Categorization Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Categorization": {
      "ai_languageModel": [
        [
          {
            "node": "Tax Categorization Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Anomaly Detection Output Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Anomaly Detection Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Anomaly Detection": {
      "ai_languageModel": [
        [
          {
            "node": "Anomaly Detection Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}