{
  "name": "Manage Cloudflare DNS records with AI-powered chat assistant",
  "nodes": [
    {
      "id": "053140b0-8397-40b4-877d-e784b7ff42d6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -96
      ],
      "parameters": {
        "width": 620,
        "height": 240,
        "content": "# Requirements\n\nFor storing and processing of data in this flow you will need:\n\n- CloudFlare.com API key/token - for retrieving your data (https://dash.cloudflare.com/?to=/:account/api-tokens)\n- OpenA"
      }
    },
    {
      "id": "94a62db1-db0f-41d6-b4ca-33c0afa77a77",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        160
      ],
      "parameters": {
        "width": 620,
        "height": 604,
        "content": "# Author\n![Kpendic](https://gravatar.com/avatar/8e343ec0d9b4fb672f921e822a8561be?size=188)\n### Kresimir Pendic\nSenior professional, specializing in automation, AI and data analysis. \n\n### Video overvi"
      }
    },
    {
      "id": "ee3394d5-ac45-4561-b4c0-ec68961453b9",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        784
      ],
      "parameters": {
        "width": 620,
        "height": 140,
        "content": "# Need help?\nFor getting help with this workflow, please create a topic on the community forums here:\nhttps://community.n8n.io/c/questions/"
      }
    },
    {
      "id": "415e9c96-1bd0-472c-b92e-3ebc1e667a62",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -256
      ],
      "parameters": {
        "width": 1480,
        "height": 140,
        "content": ""
      }
    },
    {
      "id": "d9fc97f1-30a6-4450-b976-8deb32d536e1",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -224
      ],
      "parameters": {
        "width": 700,
        "height": 80,
        "content": "# CloudFlare chat ↪️️ get / set DNS records"
      }
    },
    {
      "id": "11b2465a-9298-437d-b49d-b036e14479dc",
      "name": "Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -96
      ],
      "parameters": {
        "width": 840,
        "height": 640,
        "content": "## Chat step\n\n1. Use what ever LLM model you like - I've tested it with Gemini and GPT 4o-mini - and both work flawlessly.\n\n2. Prepared main get|set TLD DNS records ops with easy prompt, also extend i"
      }
    },
    {
      "id": "50256a12-4a51-486e-a2be-a98e24b6f85f",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        160,
        128
      ]
    },
    {
      "id": "d0e313c9-3df3-4fcc-8dd6-8fa0838b812b",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        224,
        352
      ]
    },
    {
      "id": "fe26fbe4-bd00-446f-b738-84484b07ade4",
      "name": "Chat Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        368,
        128
      ]
    },
    {
      "id": "7489f1c5-68dc-46c9-a80c-f104f661898e",
      "name": "Get TLDs",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        608
      ]
    },
    {
      "id": "2bfd5981-6511-4ce8-944e-f583e577519d",
      "name": "Json",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        944
      ]
    },
    {
      "id": "a6d94bec-619d-4863-833d-479cfcac458b",
      "name": "Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        576
      ],
      "parameters": {
        "width": 840,
        "height": 544,
        "content": "## Cloudflare ops\n\n- this is main operation call for getting, setting DNS records"
      }
    },
    {
      "id": "8c84645c-f5a8-41a2-9bad-c93d29f803fa",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        368,
        800
      ]
    },
    {
      "id": "5980e4a6-805b-4266-9039-87ae6034dc66",
      "name": "Postgres Chat Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        400,
        384
      ]
    },
    {
      "id": "24f1a023-b3b3-4c8c-8878-a008a4a05aba",
      "name": "CloudFlare tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        608,
        384
      ]
    },
    {
      "id": "1831596a-e9a6-4d64-a5b6-817c0a1f6c26",
      "name": "End",
      "type": "n8n-nodes-base.noOp",
      "position": [
        704,
        128
      ]
    },
    {
      "id": "d1d69661-c963-46aa-9f4e-2b5912a83d21",
      "name": "SubCall",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        128,
        688
      ]
    },
    {
      "id": "3645506b-0bae-4868-af6f-ffac27aa42db",
      "name": "Host details",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        768,
        608
      ]
    },
    {
      "id": "51811193-5d44-4314-b9d7-a5bf317fc535",
      "name": "Getter",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        768
      ]
    },
    {
      "id": "d78642dd-e0bd-470e-9e0a-c602c80e8f5b",
      "name": "Setter",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        928
      ]
    }
  ],
  "connections": {
    "Json": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Get TLDs",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Getter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Setter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SubCall": {
      "main": [
        [
          {
            "node": "Json",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get TLDs": {
      "main": [
        [
          {
            "node": "Host details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Agent": {
      "main": [
        [
          {
            "node": "End",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Host details": {
      "main": [
        []
      ]
    },
    "CloudFlare tool": {
      "ai_tool": [
        [
          {
            "node": "Chat Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Chat Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "Chat Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Chat Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}