8
n8n 中文网amn8n.com

将Cloudflare域名与DNS记录和设置导出到Google Sheets

高级

这是一个DevOps领域的自动化工作流,包含 22 个节点。主要使用 If, Set, Code, Wait, Merge 等节点。 将Cloudflare域名与DNS记录和设置导出到Google Sheets

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "fe41feb5409a7d5eb53f7743740840b086b13d9f15b9a1b3a5f34f2bb43129c3",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "9fd3e8a6-291f-4aba-bdc2-9055bd0e6d6b",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        380
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 240,
        "content": "# 要求"
      },
      "typeVersion": 1
    },
    {
      "id": "f4b9ee64-9c52-43bb-a91e-ad03a6286e3c",
      "name": "便利贴5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        640
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 600,
        "content": "# 作者"
      },
      "typeVersion": 1
    },
    {
      "id": "b47eb629-9241-420c-8490-669d3ee1b037",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        1260
      ],
      "parameters": {
        "width": 500,
        "height": 140,
        "content": "# 需要帮助?"
      },
      "typeVersion": 1
    },
    {
      "id": "00f46c50-55a1-48f8-a519-621973f2a886",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        220
      ],
      "parameters": {
        "color": 4,
        "width": 2000,
        "height": 140,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b5f368ea-72ae-4cb0-b09b-e80b9818f779",
      "name": "便签 9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        260
      ],
      "parameters": {
        "color": 4,
        "width": 740,
        "height": 80,
        "content": "# CloudFlare 数据导出 => Google Sheets"
      },
      "typeVersion": 1
    },
    {
      "id": "2536518c-90b5-49be-8a22-0b3e542831f1",
      "name": "当点击“测试工作流”时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        1280,
        600
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e206aea7-d544-43c2-89cd-9808ec164b03",
      "name": "注释4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        380
      ],
      "parameters": {
        "color": 5,
        "width": 1480,
        "height": 920,
        "content": "## 获取 TLD、每个 DNS 和设置并转换数据"
      },
      "typeVersion": 1
    },
    {
      "id": "fa2397fa-baee-4aca-8ca3-8c0d1d2fada4",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        1380,
        1020
      ],
      "webhookId": "34f21572-31a2-4c5b-a08a-d4be2e33651d",
      "parameters": {
        "amount": 0.3
      },
      "typeVersion": 1.1
    },
    {
      "id": "da801aa4-e3f1-4e56-93e4-928eda0962d5",
      "name": "设置页码",
      "type": "n8n-nodes-base.set",
      "position": [
        1520,
        600
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "page",
              "value": "={{$json[\"next_page\"] || 1}}"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "5ae6a35b-5090-449f-a689-b82a13ced8b3",
      "name": "增加页码",
      "type": "n8n-nodes-base.set",
      "position": [
        1280,
        820
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "next_page",
              "value": "={{ $('Set Page').first().json.page+1 }}"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "deb40a37-4e32-4dc6-8620-8322ef8014ea",
      "name": "还有更多页吗?",
      "type": "n8n-nodes-base.if",
      "position": [
        1840,
        1080
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $('Set Page').first().json.page }}",
              "value2": "={{ $('Get TLDs').first().json.result_info.total_pages }}"
            }
          ]
        }
      },
      "executeOnce": false,
      "typeVersion": 1
    },
    {
      "id": "fcd860d3-021e-4cb1-a347-ffbe1d61a184",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        1620,
        820
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition",
        "numberInputs": 3
      },
      "executeOnce": false,
      "typeVersion": 3.1
    },
    {
      "id": "2348687c-8ce7-440a-9209-7ddc39c046ca",
      "name": "获取 TLD",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1720,
        600
      ],
      "parameters": {
        "url": "https://api.cloudflare.com/client/v4/zones",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "page",
              "value": "={{ $json.page }}"
            }
          ]
        }
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "6l2hwj0eyB10vHc2",
          "name": "CloudFlare headers"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.1
    },
    {
      "id": "542fad7f-13d5-4ddd-8558-23858b62764e",
      "name": "每个主机",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1900,
        600
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "result"
      },
      "executeOnce": false,
      "typeVersion": 1
    },
    {
      "id": "0e2582e1-c058-4b18-a062-7f199beb56ef",
      "name": "获取 DNS",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2160,
        760
      ],
      "parameters": {
        "url": "=https://api.cloudflare.com/client/v4/zones/{{ $json.id }}/dns_records",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth"
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "6l2hwj0eyB10vHc2",
          "name": "CloudFlare headers"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "09d1c96b-dc94-43bd-8847-5ba40747747a",
      "name": "获取设置",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2180,
        540
      ],
      "parameters": {
        "url": "=https://api.cloudflare.com/client/v4/zones/{{ $json.id }}/settings",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth"
      },
      "credentials": {
        "httpCustomAuth": {
          "id": "6l2hwj0eyB10vHc2",
          "name": "CloudFlare headers"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "12cf6091-df4b-4f8a-be93-79933778f667",
      "name": "便签 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2120,
        1000
      ],
      "parameters": {
        "color": 3,
        "width": 540,
        "height": 280,
        "content": "## 2. 添加 Google Sheets 凭证并保存"
      },
      "typeVersion": 1
    },
    {
      "id": "57f125f5-319c-4607-b3ed-522ee9d086c2",
      "name": "扁平化",
      "type": "n8n-nodes-base.code",
      "position": [
        2240,
        1080
      ],
      "parameters": {
        "jsCode": "\nfunction flatten(obj, prefix = '', res = {}) {\n  for (const key in obj) {\n    const value = obj[key];\n    const prefixedKey = prefix ? `${prefix}_${key}` : key;\n    \n    if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n      flatten(value, prefixedKey, res);\n    } else {\n      if (prefixedKey === \"json_records\") {\n        // Format DNS records: type + name + content\n        const formattedRecords = value\n          .map(record => `${record.type} ${record.name} ${record.content}`)\n          .join('\\n');\n        res[prefixedKey] = formattedRecords;\n        continue;\n      }\n      \n      if (prefixedKey === \"json_resultSETT\") {\n        // For each setting in the array, create a new column with setting.id as key\n        value.forEach(setting => {\n          res[setting.id] = setting.value;\n        });\n        continue;\n      }\n      \n      res[prefixedKey] = value;\n    }\n  }\n  return res;\n}\n\nreturn $input.all().map(item => ({\n  json: flatten(item)\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "3c84495b-1c2d-4252-bb9e-6f77d009a660",
      "name": "过滤 TLD",
      "type": "n8n-nodes-base.code",
      "position": [
        1840,
        820
      ],
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  let validKeys = [ 'id', 'name', 'paused', 'name_servers' ];\n  Object.keys(item.json).forEach((key) => validKeys.includes(key) || delete item.json[key]);\n}\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "d57e934d-d000-401f-938a-f9eeed756ff2",
      "name": "过滤 DNS",
      "type": "n8n-nodes-base.code",
      "position": [
        2400,
        800
      ],
      "parameters": {
        "jsCode": "for (const item of $input.all()) {\n  // Extract the result array and clean up the DNS records\n  const dnsRecords = item.json.result;\n  \n  // Clean up each DNS record\n  for (let dnn of dnsRecords) {\n    let validKeys = ['type', 'content', 'name'];\n    Object.keys(dnn).forEach((key) => validKeys.includes(key) || delete dnn[key]);\n  }\n  \n  // Replace the item's json with a new object containing the array\n  item.json = {\n    records: dnsRecords\n  };\n}\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "820d2a47-77c6-47bb-a236-9f91351ad343",
      "name": "过滤设置",
      "type": "n8n-nodes-base.code",
      "position": [
        2440,
        560
      ],
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n  item.json.resultSETT = item.json.result;\n  delete item.json.result;\n  delete item.json.success;\n  delete item.json.errors;\n  delete item.json.messages;\n}\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "c5cb1263-7b24-48be-9af4-25eba131db17",
      "name": "导出",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2460,
        1080
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "json_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "json_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "json_domain",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "json_domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "json_paused",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "json_paused",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "json_name_servers",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "json_name_servers",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "0rtt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "0rtt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "advanced_ddos",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "advanced_ddos",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "always_online",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "always_online",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "always_use_https",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "always_use_https",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "automatic_https_rewrites",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "automatic_https_rewrites",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "brotli",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "brotli",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "browser_cache_ttl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "browser_cache_ttl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "browser_check",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "browser_check",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cache_level",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "cache_level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "challenge_ttl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "challenge_ttl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ciphers",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ciphers",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cname_flattening",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "cname_flattening",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "development_mode",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "development_mode",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "early_hints",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "early_hints",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "edge_cache_ttl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "edge_cache_ttl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email_obfuscation",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email_obfuscation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "filter_logs_to_cloudflare",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "filter_logs_to_cloudflare",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hotlink_protection",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "hotlink_protection",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "http2",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "http2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "http3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "http3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ip_geolocation",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ip_geolocation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ipv6",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ipv6",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "log_to_cloudflare",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "log_to_cloudflare",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "max_upload",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "max_upload",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "min_tls_version",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "min_tls_version",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "minify",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "minify",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "mirage",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "mirage",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "mobile_redirect",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "mobile_redirect",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "opportunistic_encryption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "opportunistic_encryption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "opportunistic_onion",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "opportunistic_onion",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "orange_to_orange",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "orange_to_orange",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "origin_error_page_pass_thru",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "origin_error_page_pass_thru",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "polish",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "polish",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "prefetch_preload",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "prefetch_preload",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "privacy_pass",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "privacy_pass",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "proxy_read_timeout",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "proxy_read_timeout",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "pseudo_ipv4",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "pseudo_ipv4",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "response_buffering",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "response_buffering",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rocket_loader",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "rocket_loader",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "security_header",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "security_header",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "security_level",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "security_level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "server_side_exclude",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "server_side_exclude",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sort_query_string_for_cache",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "sort_query_string_for_cache",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ssl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ssl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tls_1_2_only",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tls_1_2_only",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tls_1_3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tls_1_3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tls_client_auth",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tls_client_auth",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "true_client_ip_header",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "true_client_ip_header",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "visitor_ip",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "visitor_ip",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "waf",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "waf",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "webp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "webp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "websockets",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "websockets",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ech",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ech",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "long_lived_grpc",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "long_lived_grpc",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "pq_keyex",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "pq_keyex",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "replace_insecure_js",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "replace_insecure_js",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "json_records",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "json_records",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "pairedItem_item",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "pairedItem_item",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 974904725,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jt6od8FMt-Yo7A_CPGuyfqWzL7HJk6SZmQQFO6kkWBo/edit#gid=974904725",
          "cachedResultName": "data"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "=1jt6od8FMt-Yo7A_CPGuyfqWzL7HJk6SZmQQFO6kkWBo"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "1G0QLMadkHt22pU8",
          "name": "Google Sheets account"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.5
    }
  ],
  "pinData": {},
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Increment Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "More Pages?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flatten": {
      "main": [
        [
          {
            "node": "Export",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get DNS": {
      "main": [
        [
          {
            "node": "Filter DNS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get TLDs": {
      "main": [
        [
          {
            "node": "Each Host",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Page": {
      "main": [
        [
          {
            "node": "Get TLDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Each Host": {
      "main": [
        [
          {
            "node": "Get Settings",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get DNS",
            "type": "main",
            "index": 0
          },
          {
            "node": "Filter TLD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter DNS": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Filter TLD": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "More Pages?": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          },
          {
            "node": "Flatten",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Flatten",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Settings": {
      "main": [
        [
          {
            "node": "Filter Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Increment Page": {
      "main": [
        [
          {
            "node": "Set Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Settings": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Set Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 开发运维

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量22
分类1
节点类型10
难度说明

适合高级用户,包含 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 查看

分享此工作流