AI駆動のチャットアシスタントでCloudflare DNSレコードを管理

上級

これはDevOps, AI Chatbot分野の自動化ワークフローで、20個のノードを含みます。主にCode, Switch, SplitOut, HttpRequest, Agentなどのノードを使用。 AI駆動のチャットアシスタントでCloudflare DNSレコードを管理する

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • OpenAI API Key
  • PostgreSQLデータベース接続情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "fe41feb5409a7d5eb53f7743740840b086b13d9f15b9a1b3a5f34f2bb43129c3",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "053140b0-8397-40b4-877d-e784b7ff42d6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -96
      ],
      "parameters": {
        "color": 7,
        "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- OpenAPI credentials (or any other LLM provider) saved - for agent chat\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "94a62db1-db0f-41d6-b4ca-33c0afa77a77",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        160
      ],
      "parameters": {
        "color": 7,
        "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 overview\nhttps://youtu.be/bqrxn_41K1Y\n\n## Say hi!\nhttps://www.linkedin.com/in/mkdizajn/\n\n### Check out my other templates\n### 👉 https://n8n.io/creators/kres/\n"
      },
      "typeVersion": 1
    },
    {
      "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/"
      },
      "typeVersion": 1
    },
    {
      "id": "415e9c96-1bd0-472c-b92e-3ebc1e667a62",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -256
      ],
      "parameters": {
        "color": 4,
        "width": 1480,
        "height": 140,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d9fc97f1-30a6-4450-b976-8deb32d536e1",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -224
      ],
      "parameters": {
        "color": 4,
        "width": 700,
        "height": 80,
        "content": "# CloudFlare chat ↪️️ get / set DNS records"
      },
      "typeVersion": 1
    },
    {
      "id": "11b2465a-9298-437d-b49d-b036e14479dc",
      "name": "Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -96
      ],
      "parameters": {
        "color": 3,
        "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 it to other settings or other ops for your CloudFlare if you need"
      },
      "typeVersion": 1
    },
    {
      "id": "50256a12-4a51-486e-a2be-a98e24b6f85f",
      "name": "チャットメッセージ受信時",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        160,
        128
      ],
      "webhookId": "cb890e80-624b-4431-ab35-992849d95cd1",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "d0e313c9-3df3-4fcc-8dd6-8fa0838b812b",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        224,
        352
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "YLUlE1oeNyVmySg5",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fe26fbe4-bd00-446f-b738-84484b07ade4",
      "name": "チャットエージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        368,
        128
      ],
      "parameters": {
        "options": {
          "systemMessage": "=You are dns manager for CloudFlare\n\nYou have cf_tool that is your source for getting and setting DNS records.\nOnly return answers based from cf_tool.\n\nWhen calling cf_tool, data args to pass for actions are:\n\nIf you need to get dns record, call cf_tool and pass:\n- action: 'get_dns'\n- domain_id: domain id\n\nif you need to set dns record, call cf_tool and pass:\n- action: 'set_dns'\n- domain_id: domain id\n- record_id: id of a record\n- record_type: type of DNS record\n- new_record_content: new value\n\nIf you need to get domains available in CF, call cf_tool and pass:\n- action 'domain'\n\nBefore calling any user query action, first execute get all domains action."
        }
      },
      "typeVersion": 1.9
    },
    {
      "id": "7489f1c5-68dc-46c9-a80c-f104f661898e",
      "name": "TLD取得",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        608
      ],
      "parameters": {
        "url": "https://api.cloudflare.com/client/v4/zones",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "per_page",
              "value": "=100"
            }
          ]
        }
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "6l2hwj0eyB10vHc2",
          "name": "CloudFlare headers"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.1
    },
    {
      "id": "2bfd5981-6511-4ce8-944e-f583e577519d",
      "name": "Json",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        944
      ],
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nlet inpt = $input.first().json.query;\nlet out = {};\ntry{\n  out = JSON.parse(inpt)\n} catch{}\nif( out.action ){\n  return {out};\n} else{\n  return {};\n}\n"
      },
      "typeVersion": 2
    },
    {
      "id": "a6d94bec-619d-4863-833d-479cfcac458b",
      "name": "Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        576
      ],
      "parameters": {
        "color": 6,
        "width": 840,
        "height": 544,
        "content": "## Cloudflare ops\n\n- this is main operation call for getting, setting DNS records"
      },
      "typeVersion": 1
    },
    {
      "id": "8c84645c-f5a8-41a2-9bad-c93d29f803fa",
      "name": "スイッチ",
      "type": "n8n-nodes-base.switch",
      "position": [
        368,
        800
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "a542a8cc-a11b-41c7-a288-fc0948d002d3",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.out.action }}",
                    "rightValue": "domain"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6b5fa3fd-e4c2-4e01-bffd-f2ea364dc6a5",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.out.action }}",
                    "rightValue": "get_dns"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f3715811-47d8-4cee-b705-ea1ed4ddd0a3",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.out.action }}",
                    "rightValue": "set_dns"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "5980e4a6-805b-4266-9039-87ae6034dc66",
      "name": "Postgresチャットメモリ",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        400,
        384
      ],
      "parameters": {
        "tableName": "langchain_chat_histories",
        "contextWindowLength": 6
      },
      "credentials": {
        "postgres": {
          "id": "TxgFdIVuxITapbbG",
          "name": "Postgres account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "24f1a023-b3b3-4c8c-8878-a008a4a05aba",
      "name": "CloudFlare tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        608,
        384
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $workflow.id }}",
          "cachedResultName": "={{ $workflow.id }}"
        },
        "description": "=Call this tool to make cloudflare oprations. \nPass down only json with needed data",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1831596a-e9a6-4d64-a5b6-817c0a1f6c26",
      "name": "終了",
      "type": "n8n-nodes-base.noOp",
      "position": [
        704,
        128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d1d69661-c963-46aa-9f4e-2b5912a83d21",
      "name": "サブコール",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        128,
        688
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3645506b-0bae-4868-af6f-ffac27aa42db",
      "name": "ホスト詳細",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        768,
        608
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "result"
      },
      "executeOnce": false,
      "typeVersion": 1
    },
    {
      "id": "51811193-5d44-4314-b9d7-a5bf317fc535",
      "name": "ゲッター",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        768
      ],
      "parameters": {
        "url": "=https://api.cloudflare.com/client/v4/zones/{{ $json.out.domain_id }}/dns_records",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth",
        "queryParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "6l2hwj0eyB10vHc2",
          "name": "CloudFlare headers"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.1
    },
    {
      "id": "d78642dd-e0bd-470e-9e0a-c602c80e8f5b",
      "name": "セッター",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        928
      ],
      "parameters": {
        "url": "=https://api.cloudflare.com/client/v4/zones/{{ $json.out.domain_id }}/dns_records/{{ $json.out.record_id }}",
        "method": "PATCH",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "content",
              "value": "={{ $json.out.new_record_content }}"
            }
          ]
        },
        "genericAuthType": "httpCustomAuth"
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "6l2hwj0eyB10vHc2",
          "name": "CloudFlare headers"
        }
      },
      "typeVersion": 4.1
    }
  ],
  "pinData": {},
  "connections": {
    "2bfd5981-6511-4ce8-944e-f583e577519d": {
      "main": [
        [
          {
            "node": "8c84645c-f5a8-41a2-9bad-c93d29f803fa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8c84645c-f5a8-41a2-9bad-c93d29f803fa": {
      "main": [
        [
          {
            "node": "7489f1c5-68dc-46c9-a80c-f104f661898e",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "51811193-5d44-4314-b9d7-a5bf317fc535",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "d78642dd-e0bd-470e-9e0a-c602c80e8f5b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d1d69661-c963-46aa-9f4e-2b5912a83d21": {
      "main": [
        [
          {
            "node": "2bfd5981-6511-4ce8-944e-f583e577519d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7489f1c5-68dc-46c9-a80c-f104f661898e": {
      "main": [
        [
          {
            "node": "3645506b-0bae-4868-af6f-ffac27aa42db",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fe26fbe4-bd00-446f-b738-84484b07ade4": {
      "main": [
        [
          {
            "node": "1831596a-e9a6-4d64-a5b6-817c0a1f6c26",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3645506b-0bae-4868-af6f-ffac27aa42db": {
      "main": [
        []
      ]
    },
    "24f1a023-b3b3-4c8c-8878-a008a4a05aba": {
      "ai_tool": [
        [
          {
            "node": "fe26fbe4-bd00-446f-b738-84484b07ade4",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "d0e313c9-3df3-4fcc-8dd6-8fa0838b812b": {
      "ai_languageModel": [
        [
          {
            "node": "fe26fbe4-bd00-446f-b738-84484b07ade4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "5980e4a6-805b-4266-9039-87ae6034dc66": {
      "ai_memory": [
        [
          {
            "node": "fe26fbe4-bd00-446f-b738-84484b07ade4",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "50256a12-4a51-486e-a2be-a98e24b6f85f": {
      "main": [
        [
          {
            "node": "fe26fbe4-bd00-446f-b738-84484b07ade4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - DevOps, AIチャットボット

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

n8nノードの探索(可視化リファレンスライブラリ内)
n8nノードを可視化リファレンスライブラリで探索
If
Ftp
Set
+
If
Ftp
Set
113 ノードI versus AI
その他
ドキュメントエージェントテンプレート
ジェミニとGoogle Driveを使ってテンプレートからカスタムPDF文書を作成
If
Set
Code
+
If
Set
Code
36 ノードOzgur Karateke
文書抽出
✨🩷自動化ソーシャルメディアコンテンツ公開工厂 + 系统提示组合
基于动态系统提示とGPT-4oのAI驱动多平台ソーシャルメディアコンテンツ工厂
If
Set
Code
+
If
Set
Code
100 ノードAmit Mehta
コンテンツ作成
✨🩷ソーシャルメディアコンテンツ自動投稿工場 + システムプロンプト組み合わせ
GPT-4oを使用して6つのプラットフォーム向けにプラットフォーム最適化されたソーシャルメディアコンテンツを生成
If
Set
Code
+
If
Set
Code
100 ノードLuan Correia
ソーシャルメディア
コンテキスト・ハイブリッドRAG AIコピー
RAGアプリケーション向けのGoogle DriveからSupabaseコンテキストベクトルデータベースへの同期
If
Set
Code
+
If
Set
Code
76 ノードMichael Taleb
AI RAG検索拡張
✨🩷自動化ソーシャルメディアコンテンツ公開ファクトリー + システムプロンプトコンビネーション
✨🩷 自動化ソーシャルメディアコンテンツ公開ファクトリー + システムプロンプトの組み合わせ
If
Set
Code
+
If
Set
Code
100 ノードJoseph LePage
マーケティング
ワークフロー情報
難易度
上級
ノード数20
カテゴリー2
ノードタイプ12
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
KPendic

KPendic

@kres

With 15 years on my back, carrying clients' web apps through the storms of bad code, tight deadlines, and ever-changing tech trends, I now do stuff as an AI Automation Engineer, with focus on streamlining backend services, making systems faster, smarter, and more sustainable.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34