{
  "name": "Conversational Meta ads reporting & management with GPT-5",
  "nodes": [
    {
      "id": "881efba9-1edc-4ec6-ab4e-5ac67ddb27fc",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -384,
        -96
      ]
    },
    {
      "id": "a8e434db-570a-40e0-9b9f-dbca06e6fd76",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        88,
        -96
      ]
    },
    {
      "id": "bd6f4433-634a-4313-a4fc-f76290eedab2",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -160,
        128
      ]
    },
    {
      "id": "f46356dc-c1c8-4798-aacc-f059dbc85b23",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -32,
        128
      ]
    },
    {
      "id": "d88a8ce8-4d31-4cdc-ad84-20d7162aaa34",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -384,
        504
      ]
    },
    {
      "id": "8e7b6270-e895-448c-83fa-f00d2f4f7f54",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        64,
        488
      ]
    },
    {
      "id": "49b75fbb-06e6-4451-b4a2-31410d03bbbf",
      "name": "list accounts",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        96,
        128
      ]
    },
    {
      "id": "3f322a2e-324d-42e3-a657-2880cd893aea",
      "name": "account details",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        224,
        128
      ]
    },
    {
      "id": "ffa7f3ac-b8f7-4b5b-9764-11319699bb0d",
      "name": "graph: adaccounts",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        288,
        312
      ]
    },
    {
      "id": "5e63ad12-607f-4d54-859e-d57d8688057e",
      "name": "account: campaigns",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        736,
        232
      ]
    },
    {
      "id": "5252e239-fb20-43a4-8a41-7b4cf1c9ab01",
      "name": "account: adsets",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        736,
        424
      ]
    },
    {
      "id": "798a573c-707e-4a6b-9093-7b9f8aa61cb0",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        960,
        584
      ]
    },
    {
      "id": "01f68eb7-c747-4134-971e-bf18822d6009",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        1184,
        616
      ]
    },
    {
      "id": "2da3e999-12e7-4370-ac21-3f447b6b3289",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        512,
        504
      ]
    },
    {
      "id": "fb4d9260-92bb-45cf-9055-a746f1aace7b",
      "name": "account: ads",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        736,
        616
      ]
    },
    {
      "id": "f6f46492-052c-4e7d-8f1e-d5c42b84450c",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        288,
        1000
      ]
    },
    {
      "id": "03766677-b021-48d7-8b44-9fe278c415c6",
      "name": "since, until",
      "type": "n8n-nodes-base.set",
      "position": [
        -160,
        504
      ]
    },
    {
      "id": "d3ed3c25-a702-44e5-be77-3303960ed0fb",
      "name": "fix missing act_",
      "type": "n8n-nodes-base.set",
      "position": [
        288,
        504
      ]
    },
    {
      "id": "12c8ba0e-e1e4-49f8-aadb-9d8a9c40b0e5",
      "name": "No Operation, do nothing1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        512,
        1000
      ]
    },
    {
      "id": "629df03e-4091-487a-b0ec-32e366b9b008",
      "name": "account insights",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        736,
        808
      ]
    },
    {
      "id": "c8e86105-8551-4777-b36b-8870ac20e09b",
      "name": "ads: insights",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        736,
        1000
      ]
    },
    {
      "id": "ed5b25f1-ccc1-4ca4-80f7-12f2e5f44020",
      "name": "ad details",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        352,
        128
      ]
    },
    {
      "id": "f6a1df1a-3f2d-497a-ac3a-ceba3f043cb3",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        480,
        128
      ]
    },
    {
      "id": "763f01ad-0888-4434-b9c4-c47e9880b7cb",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        960,
        1000
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "graph: adaccounts",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "fix missing act_",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "ad details": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "No Operation, do nothing1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "account: ads": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "since, until": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "ads: insights": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "list accounts": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "account details": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "account: adsets": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "account insights": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "fix missing act_": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "graph: adaccounts": {
      "main": [
        []
      ]
    },
    "account: campaigns": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Operation, do nothing": {
      "main": [
        [
          {
            "node": "account: campaigns",
            "type": "main",
            "index": 0
          },
          {
            "node": "account: adsets",
            "type": "main",
            "index": 0
          },
          {
            "node": "account: ads",
            "type": "main",
            "index": 0
          },
          {
            "node": "account insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Operation, do nothing1": {
      "main": [
        [
          {
            "node": "ads: insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "since, until",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}