8
n8n 中文网amn8n.com

分页抓取 Airbnb 房源并存储到 Google Sheets

高级

这是一个Market Research领域的自动化工作流,包含 18 个节点。主要使用 If, Set, Code, Merge, McpClient 等节点。 分页抓取 Airbnb 房源并存储到 Google Sheets

前置要求
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "7888501fe66f93847229a4fe1e4efd9754bf14b1b98634200b2ff2090b5002a3"
  },
  "nodes": [
    {
      "id": "d20ec65c-efb5-46fc-b6b9-82450f3818c8",
      "name": "格式化数据",
      "type": "n8n-nodes-base.code",
      "position": [
        1820,
        80
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const raw = item.json?.result?.content?.[0]?.text;\n\n  if (!raw) {\n    return { json: { error: \"No raw content\", original: item.json } };\n  }\n\n  let data;\n  try {\n    data = typeof raw === \"string\" ? JSON.parse(raw) : raw;\n  } catch (e) {\n    return { json: { error: \"Invalid JSON\", original: raw } };\n  }\n\n  if (!data || typeof data !== 'object') {\n    return { json: { error: \"Parsed data invalid\", original: raw } };\n  }\n\n  const listingUrl = data.listingUrl || \"\";\n  const idMatch = listingUrl.match(/\\/rooms\\/(\\d+)/);\n  const id = idMatch ? idMatch[1] : null;\n\n  const sections = Array.isArray(data.details) ? data.details : [];\n\n  let lat = null;\n  let lng = null;\n  let houseRules = null;\n  let highlights = null;\n  let description = null;\n  let amenities = null;\n\n  sections.forEach(section => {\n    switch (section.id) {\n      case \"LOCATION_DEFAULT\":\n        lat = section.lat || null;\n        lng = section.lng || null;\n        break;\n      case \"POLICIES_DEFAULT\":\n        houseRules = section.houseRulesSections || null;\n        break;\n      case \"HIGHLIGHTS_DEFAULT\":\n        highlights = section.highlights || null;\n        break;\n      case \"DESCRIPTION_DEFAULT\":\n        description = section.htmlDescription?.htmlText || null;\n        break;\n      case \"AMENITIES_DEFAULT\":\n        amenities = section.seeAllAmenitiesGroups || null;\n        break;\n    }\n  });\n\n  return {\n    json: {\n      id: id || \"\",\n      listingUrl,\n      location: {\n        lat,\n        lng\n      },\n      houseRules,\n      highlights,\n      description,\n      amenities\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "93bffd11-f607-4cc6-90e7-e3ea29caf00b",
      "name": "清空 Google 表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2020,
        80
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $json.id }}",
            "amenities": "={{ $json.amenities }}",
            "highlights": "={{ $json.highlights }}",
            "houseRules": "={{ $json.houseRules }}",
            "description": "={{ $json.description }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "price_per_night",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "price_per_night",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "total_price",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "total_price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "price_details",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "price_details",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "beds_rooms",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "beds_rooms",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rating",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "reviews",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "badge",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "badge",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "location",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "houseRules",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "houseRules",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "highlights",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "highlights",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "amenities",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "amenities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15IOJquaQ8CBtFilmFTuW8UFijux10NwSVzStyNJ1MsA/edit#gid=0",
          "cachedResultName": "1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "15IOJquaQ8CBtFilmFTuW8UFijux10NwSVzStyNJ1MsA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15IOJquaQ8CBtFilmFTuW8UFijux10NwSVzStyNJ1MsA/edit?usp=drivesdk",
          "cachedResultName": "airbnb"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "6YhBlgb8cXMN3Ra2",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "a28bf4de-f7e9-446d-9c9e-2abcff994f64",
      "name": "更新 Google 表格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1360,
        20
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $json.id }}",
            "url": "={{ $json.url }}",
            "name": "={{ $json.name }}",
            "badge": "={{ $json.badge }}",
            "rating": "={{ $json.rating }}",
            "reviews": "={{ $json.reviews }}",
            "location": "={{ $json.location }}",
            "beds_rooms": "={{ $json.beds_rooms }}",
            "total_price": "={{ $json.total_price }}",
            "price_details": "={{ $json.price_details }}",
            "price_per_night": "={{ $json.price_per_night }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "price_per_night",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "price_per_night",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "total_price",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "total_price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "price_details",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "price_details",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "beds_rooms",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "beds_rooms",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rating",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "reviews",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "reviews",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "badge",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "badge",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "location",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "houseRules",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "houseRules",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "highlights",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "highlights",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "amenities",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "amenities",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15IOJquaQ8CBtFilmFTuW8UFijux10NwSVzStyNJ1MsA/edit#gid=0",
          "cachedResultName": "1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "15IOJquaQ8CBtFilmFTuW8UFijux10NwSVzStyNJ1MsA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15IOJquaQ8CBtFilmFTuW8UFijux10NwSVzStyNJ1MsA/edit?usp=drivesdk",
          "cachedResultName": "airbnb"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "6YhBlgb8cXMN3Ra2",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "754e76da-7f01-4340-a0f1-a37ee76fa99c",
      "name": "获取 Airbnb 房源详情",
      "type": "n8n-nodes-mcp.mcpClient",
      "position": [
        1780,
        280
      ],
      "parameters": {
        "toolName": "airbnb_listing_details",
        "operation": "executeTool",
        "toolParameters": "={\n  \"id\": \"{{$json.id}}\"\n}"
      },
      "credentials": {
        "mcpClientApi": {
          "id": "iom05T49p5W1Mvkz",
          "name": "Airbnb List"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "53ade6ca-9334-4aff-8d31-9585d7f033f8",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        1360,
        220
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "91c16694-0fae-470d-84e2-26f778a81b47",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f91c2319-b797-4477-826f-e2c50e3f4eaf",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1580,
        220
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "c43b9dd6-cccd-42d5-af16-a3a8af5ccedf",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -100,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9ff06c0b-7e64-41bf-91ff-33ea611ceed8",
      "name": "最终结果",
      "type": "n8n-nodes-base.code",
      "position": [
        980,
        220
      ],
      "parameters": {
        "jsCode": "// 👉 Final Results - chỉ trả về kết quả tổng hợp\nconst finalData = $input.first().json;\n\nreturn [{\n  json: {\n    total_listings: finalData.all_listings.length,\n    pages_processed: finalData.loopCount,\n    listings: finalData.all_listings,\n    summary: {\n      total_properties: finalData.all_listings.length,\n      pages_fetched: finalData.loopCount,\n      search_completed: true,\n      location: \"Da Nang\",\n      checkin: \"2025-07-14\",\n      checkout: \"2025-08-17\",\n      adults: 2,\n      children: 1\n    }\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f376519c-53e2-49f7-ae36-a36a5362da76",
      "name": "解析房源数据2",
      "type": "n8n-nodes-base.code",
      "position": [
        540,
        80
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// 👉 Tìm item chứa kết quả tìm kiếm\nconst searchItem = items.find(i => i.json?.result?.content?.[0]?.text || i.json?.content?.[0]?.text);\nconst rawText = searchItem?.json?.result?.content?.[0]?.text || searchItem?.json?.content?.[0]?.text;\nconst parsed = JSON.parse(rawText || \"{}\");\n\nconst listings = parsed.searchResults || [];\nconst nextCursor = parsed.paginationInfo?.nextPageCursor || null;\n\n// 👉 Lấy loopCount hiện tại và all_listings từ context\nconst loopItem = items.find(i => typeof i.json?.loopCount !== \"undefined\");\nconst currentLoop = loopItem?.json?.loopCount || 0;\nconst nextLoop = currentLoop + 1;\nconst allListings = loopItem?.json?.all_listings || [];\n\nconst processedListings = listings.map((item) => {\n  const name = item.demandStayListing?.description?.name?.localizedStringWithTranslationPreference || null;\n  const primaryLine = item.structuredContent?.primaryLine || \"\";\n  const totalPrice = item.structuredDisplayPrice?.secondaryLine?.accessibilityLabel || null;\n  const pricePerNight = item.structuredDisplayPrice?.primaryLine?.accessibilityLabel || null;\n  const priceDetails = item.structuredDisplayPrice?.explanationData?.priceDetails || null;\n  const ratingText = item.avgRatingA11yLabel || \"\";\n\n  const ratingMatch = ratingText.match(/([\\d.]+)\\s+out\\s+of\\s+5/);\n  const reviewsMatch = ratingText.match(/(\\d+)\\s*reviews?/);\n\n  const badge = item.badges || null;\n  const coordinate = item.demandStayListing?.location?.coordinate || {};\n  const checkin = item.listingParamOverrides?.checkin || null;\n  const checkout = item.listingParamOverrides?.checkout || null;\n  const url = item.url || \"\";\n\n  const extractBedsRooms = () => {\n    if (primaryLine.toLowerCase().includes(\"bed\")) return primaryLine;\n    const nameMatchBR = name?.match(/(\\d+)\\s*BR/i);\n    if (nameMatchBR) return `${nameMatchBR[1]} bedroom`;\n    if (name && /studio/i.test(name)) return \"Studio\";\n    if (primaryLine && /studio/i.test(primaryLine)) return \"Studio\";\n    return null;\n  };\n\n  const idMatch = url.match(/\\/rooms\\/(\\d+)/);\n  const id = idMatch ? idMatch[1] : null;\n\n  return {\n    id,\n    name,\n    beds_rooms: extractBedsRooms(),\n    price_per_night: pricePerNight,\n    total_price: totalPrice,\n    price_details: priceDetails,\n    rating: ratingMatch ? parseFloat(ratingMatch[1]) : null,\n    reviews: reviewsMatch ? parseInt(reviewsMatch[1]) : null,\n    location: {\n      lat: coordinate.latitude || null,\n      lng: coordinate.longitude || null\n    },\n    badge,\n    checkin,\n    checkout,\n    url,\n    page: nextLoop,\n    isMeta: false\n  };\n});\n\n// 👉 Gộp listings mới vào mảng tổng\nconst updatedAllListings = [...allListings, ...processedListings];\n\n// 👉 Tạo 1 item metadata duy nhất với all_listings\nconst meta = {\n  loopCount: nextLoop,\n  cursor: nextCursor,\n  all_listings: updatedAllListings,\n  current_page_count: processedListings.length,\n  total_count: updatedAllListings.length,\n  isMeta: true\n};\n\n// 👉 Chỉ trả về metadata\nreturn [{ json: meta }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "ea1afd06-a60b-4fde-a0c2-c51ba0a37541",
      "name": "条件判断1",
      "type": "n8n-nodes-base.if",
      "position": [
        760,
        160
      ],
      "parameters": {
        "options": {
          "ignoreCase": false
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "eb75b423-43fb-422e-8fa4-1a3936e85e01",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{$json.loopCount}}",
              "rightValue": 2
            },
            {
              "id": "2c50f2f8-b604-4c0d-bc19-aedf57ce4f7e",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.cursor }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "37240da6-ff3b-4c5e-8a7c-883b757db638",
      "name": "初始设置1",
      "type": "n8n-nodes-base.set",
      "position": [
        120,
        180
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d500ae4c-eeb1-49e6-84d3-90d854a7c5a2",
              "name": "loopCount",
              "type": "number",
              "value": "={{$json.loopCount || 0}}"
            },
            {
              "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
              "name": "cursor",
              "type": "string",
              "value": "={{$json.cursor || ''}}"
            },
            {
              "id": "b2c3d4e5-f6g7-8901-bcde-f23456789012",
              "name": "all_listings",
              "type": "array",
              "value": "={{$json.all_listings || []}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ec20bda7-eaa1-4a34-bde5-dd46f0f21a41",
      "name": "合并5",
      "type": "n8n-nodes-base.merge",
      "position": [
        320,
        80
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "c169b045-d48f-4ef1-a755-cd2a7b984143",
      "name": "代码2",
      "type": "n8n-nodes-base.code",
      "position": [
        1160,
        220
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst allData = items[0]?.json || {};\n\n// Trường hợp data là mảng nằm trong 1 key nào đó, ví dụ \"results\"\nconst listings = allData.results || allData.listings || []; // tùy thuộc vào cấu trúc cụ thể\n\nreturn listings.map(item => {\n  const {\n    id,\n    name,\n    beds_rooms,\n    price_per_night,\n    total_price,\n    price_details,\n    rating,\n    reviews,\n    location,\n    badge,\n    checkin,\n    checkout,\n    url\n  } = item;\n\n  return {\n    json: {\n      id,\n      name,\n      beds_rooms,\n      price_per_night,\n      total_price,\n      price_details,\n      rating,\n      reviews,\n      location,\n      badge,\n      checkin,\n      checkout,\n      url\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "46f64ae5-980c-4905-98e8-79c3cfcce9d2",
      "name": "Airbnb 搜索",
      "type": "n8n-nodes-mcp.mcpClient",
      "position": [
        120,
        -20
      ],
      "parameters": {
        "toolName": "airbnb_search",
        "operation": "executeTool",
        "toolParameters": "={\n  \"location\": \"London\",\n  \"adults\": 7,\n  \"children\": 1,\n  \"checkin\": \"2025-08-14\",\n  \"checkout\": \"2025-08-17\",\n  \"cursor\": \"{{ $json.cursor || '' }}\"\n}"
      },
      "credentials": {
        "mcpClientApi": {
          "id": "iom05T49p5W1Mvkz",
          "name": "Airbnb List"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "69be2f2d-0af2-477e-a8d5-3d22bd8eade2",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -220
      ],
      "parameters": {
        "color": 5,
        "width": 1080,
        "height": 740,
        "content": "## Airbnb 搜索流程 - 描述与说明"
      },
      "typeVersion": 1
    },
    {
      "id": "a9ff2075-c4f4-43af-92b8-bd92f055a4dd",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        -220
      ],
      "parameters": {
        "width": 1080,
        "height": 740,
        "content": "此 n8n 工作流以循环结构处理 Airbnb 房源数据。流程如下:"
      },
      "typeVersion": 1
    },
    {
      "id": "79825fe8-9af2-4fba-8fb4-8ba761140fbd",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -220
      ],
      "parameters": {
        "color": 4,
        "width": 680,
        "height": 740,
        "content": "# 设置步骤"
      },
      "typeVersion": 1
    },
    {
      "id": "9e6487df-aeb5-47ca-beca-f2c8d0be6255",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -600
      ],
      "parameters": {
        "color": 3,
        "width": 3020,
        "height": 360,
        "content": "# 描述"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "If1": {
      "main": [
        [
          {
            "node": "Initial Set1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Airbnb Search",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Final Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge5": {
      "main": [
        [
          {
            "node": "Parse Listing Data2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Data": {
      "main": [
        [
          {
            "node": "Clear Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initial Set1": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Airbnb Search": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final Results": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Format Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Airbnb Listing Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Listing Data2": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Airbnb Listing Details": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Airbnb Search",
            "type": "main",
            "index": 0
          },
          {
            "node": "Initial Set1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 市场调研

需要付费吗?

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

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

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流