{
  "id": "qXQ3KVJuhwtuLLAt",
  "name": "23. Automate Financial Operations with O3 CFO & GPT-4.1-mini Finance Team",
  "tags": [],
  "nodes": [
    {
      "id": "02905360-ed3a-48e2-8dfa-69a2d26aa716",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1520,
        448
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "d170c8d7-9aa3-4e56-a3f5-f7e4d19b0e78",
      "name": "CFO Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1296,
        448
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "28f5c17c-a682-4bc0-997c-1c8f943675be",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        -1168,
        768
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "97d8ae90-cba4-4d66-935c-3fd6be58d5d0",
      "name": "Financial Planning Analyst",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -896,
        1168
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "call this AI Agent that specializes in financial planning, budgeting, forecasting, and strategic financial modeling"
      },
      "typeVersion": 2.2
    },
    {
      "id": "f4cf8b18-75d4-4377-a039-c1ff18a854da",
      "name": "Accounting Specialist",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        64,
        560
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "call this AI Agent that specializes in bookkeeping, financial statements, tax preparation, and accounting compliance"
      },
      "typeVersion": 2.2
    },
    {
      "id": "0ab21873-c7fb-4c69-90e2-94fdc86f00e7",
      "name": "Treasury & Cash Management Specialist",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -496,
        960
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "call this AI Agent that specializes in cash flow management, treasury operations, banking relationships, and liquidity planning"
      },
      "typeVersion": 2.2
    },
    {
      "id": "e5e4567e-05a0-4e3a-b5e3-fbd354d5b220",
      "name": "Financial Analyst",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        16,
        1184
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "call this AI Agent that specializes in financial analysis, variance analysis, KPI reporting, and performance metrics"
      },
      "typeVersion": 2.2
    },
    {
      "id": "03dffedb-4891-402f-9e80-a87e29887525",
      "name": "Investment & Risk Analyst",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -400,
        240
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "call this AI Agent that specializes in investment analysis, risk assessment, financial modeling, and capital allocation"
      },
      "typeVersion": 2.2
    },
    {
      "id": "14c15ad5-83db-4de6-8e8b-90ccd1d53ed3",
      "name": "Internal Audit & Controls Specialist",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        0,
        0
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "call this AI Agent that specializes in internal auditing, financial controls, compliance monitoring, and risk management"
      },
      "typeVersion": 2.2
    },
    {
      "id": "cf03e2d4-5b7b-4f76-bc9e-504fe830e64c",
      "name": "OpenAI Chat Model CFO",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1328,
        768
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "o3",
          "cachedResultName": "o3"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "d49035f7-14b3-4d5f-8785-99a49d204b18",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -864,
        1632
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "7ea131b5-80e2-4dbc-a962-97cb19f7c9bc",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        32,
        768
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "4b074f32-5136-4cdd-9a4d-2657691e2eec",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -528,
        1168
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "2dc89e09-f601-4fe5-a79a-5401ae01501a",
      "name": "OpenAI Chat Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -32,
        1440
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "d5deac93-94f4-4aa0-a8f7-f43628306786",
      "name": "OpenAI Chat Model5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -432,
        496
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "cd106024-e898-4f05-bbff-e5cc9eca2c9d",
      "name": "OpenAI Chat Model6",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        32,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "228dbb49-3947-4449-9648-5912330174b8",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3440,
        -32
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "=======================================\n            WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4a23f347-1ac6-4b4b-8587-bf78ccf9bce4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3440,
        304
      ],
      "parameters": {
        "color": 4,
        "width": 1289,
        "height": 1854,
        "content": "# Automate Financial Operations with O3 CFO & GPT-4.1-mini Finance Team\n\nThis workflow builds a **virtual finance department** inside n8n. At the center is a **CFO Agent (O3 model)** who acts like a strategic leader. When a financial request comes in, the CFO interprets it, decides the strategy, and delegates to the **specialist agents** (each powered by GPT-4.1-mini for cost efficiency).\n\n---\n\n## \ud83d\udfe2 Section 1 \u2013 Entry & Leadership\n\n**Nodes:**\n\n* \ud83d\udcac **When chat message received** \u2192 Entry point for user financial requests.\n* \ud83d\udcbc **CFO Agent (O3)** \u2192 Acts as the Chief Financial Officer. Interprets the request, decides the approach, and delegates tasks.\n* \ud83d\udca1 **Think Tool** \u2192 Helps the CFO brainstorm and refine financial strategies.\n* \ud83e\udde0 **OpenAI Chat Model CFO (O3)** \u2192 High-level reasoning engine for strategic leadership.\n\n\u2705 **Beginner view:** Think of this as your **finance CEO\u2019s desk** \u2014 requests land here, the CFO figures out what needs to be done, and the right specialists are assigned.\n\n---\n\n## \ud83d\udcca Section 2 \u2013 Specialist Finance Agents\n\nEach specialist is powered by **GPT-4.1-mini** (fast + cost-effective).\n\n* \ud83d\udcc8 **Financial Planning Analyst** \u2192 Builds budgets, forecasts, and financial models.\n* \ud83d\udcda **Accounting Specialist** \u2192 Handles bookkeeping, tax prep, and compliance.\n* \ud83c\udfe6 **Treasury & Cash Management Specialist** \u2192 Manages liquidity, banking, and cash flow.\n* \ud83d\udcca **Financial Analyst** \u2192 Runs KPI tracking, performance metrics, variance analysis.\n* \ud83d\udcbc **Investment & Risk Analyst** \u2192 Performs investment evaluations, capital allocation, and risk management.\n* \ud83d\udd0d **Internal Audit & Controls Specialist** \u2192 Checks compliance, internal controls, and audits.\n\n\u2705 **Beginner view:** This section is your **finance department** \u2014 every role you\u2019d find in a real company, automated by AI.\n\n---\n\n## \ud83d\udccb Section 3 \u2013 Flow of Execution\n\n1. User sends a request (e.g., *\u201cCreate a financial forecast for Q1 2026\u201d*).\n2. CFO Agent (O3) interprets it \u2192 \u201cWe need planning, analysis, and treasury.\u201d\n3. Delegates tasks to the **relevant specialists**.\n4. Specialists process in parallel, generating plans, numbers, and insights.\n5. CFO Agent compiles and returns a **comprehensive financial report**.\n\n\u2705 **Beginner view:** The CFO is the **conductor**, and the specialists are the **musicians**. Together, they produce the financial \u201csymphony.\u201d\n\n---\n\n## \ud83d\udcca Summary Table\n\n| Section                | Key Roles                                               | Model             | Purpose             | Beginner Benefit                       |\n| ---------------------- | ------------------------------------------------------- | ----------------- | ------------------- | -------------------------------------- |\n| \ud83d\udfe2 Entry & Leadership  | CFO Agent, Think Tool                                   | O3                | Strategic direction | Acts like a real CFO                   |\n| \ud83d\udcca Finance Specialists | FP Analyst, Accounting, Treasury, FA, Investment, Audit | GPT-4.1-mini      | Specialized tasks   | Each agent = finance department role   |\n| \ud83d\udccb Execution Flow      | All connected                                           | O3 + GPT-4.1-mini | Collaboration       | Output = complete financial management |\n\n---\n\n## \ud83c\udf1f Why This Workflow Rocks\n\n* **Full finance department in n8n**\n* **Strategic + execution separation** \u2192 O3 for CFO, GPT-4.1-mini for team\n* **Cost-optimized** \u2192 Heavy lifting done by mini models\n* **Scalable** \u2192 Easily add more finance roles (tax, payroll, compliance, etc.)\n* **Practical outputs** \u2192 Reports, budgets, risk analyses, audit notes\n\n---\n\n\ud83d\udc49 Example Use Case:\n*\u201cGenerate a Q1 financial forecast with cash flow analysis and risk report.\u201d*\n\n* CFO reviews request.\n* Financial Planning Analyst \u2192 Budget + Forecast.\n* Treasury Specialist \u2192 Cash flow modeling.\n* Investment Analyst \u2192 Risk review.\n* Audit Specialist \u2192 Compliance check.\n* CFO delivers a **packaged financial report** back to you.\n\n---"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bc532958-bfda-419f-a640-e50340d023ae",
  "connections": {
    "Think": {
      "ai_tool": [
        [
          {
            "node": "CFO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Financial Analyst": {
      "ai_tool": [
        [
          {
            "node": "CFO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Financial Planning Analyst",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Accounting Specialist",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Treasury & Cash Management Specialist",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "Financial Analyst",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "Investment & Risk Analyst",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model6": {
      "ai_languageModel": [
        [
          {
            "node": "Internal Audit & Controls Specialist",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Accounting Specialist": {
      "ai_tool": [
        [
          {
            "node": "CFO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model CFO": {
      "ai_languageModel": [
        [
          {
            "node": "CFO Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Investment & Risk Analyst": {
      "ai_tool": [
        [
          {
            "node": "CFO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Financial Planning Analyst": {
      "ai_tool": [
        [
          {
            "node": "CFO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "CFO Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Internal Audit & Controls Specialist": {
      "ai_tool": [
        [
          {
            "node": "CFO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Treasury & Cash Management Specialist": {
      "ai_tool": [
        [
          {
            "node": "CFO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}