Sauvegarde automatique des meilleures offres Airbnb

Intermédiaire

Ceci est unAIworkflow d'automatisation du domainecontenant 11 nœuds.Utilise principalement des nœuds comme Set, Code, HttpRequest, GoogleSheets, ScheduleTrigger, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. Trouver automatiquement les meilleures offres Airbnb avec Bright Data et n8n

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "kO0kNE2AKKzesj0F",
  "meta": {
    "instanceId": "60046904b104f0f72b2629a9d88fe9f676be4035769f1f08dad1dd38a76b9480"
  },
  "name": "Store_Best_Deals_on_Airbnb",
  "tags": [],
  "nodes": [
    {
      "id": "3be17a72-1d6a-4bea-a36c-708125eef7ef",
      "name": "Exécution Quotidienne (9h)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        20,
        1020
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d47e5caa-a861-4dad-9f48-52e816fc7a71",
      "name": "Définir les Critères de Recherche",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        1020
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9426515e-7232-483f-ae94-09cf500c8dc4",
              "name": "Location",
              "type": "string",
              "value": "Los-Angeles"
            },
            {
              "id": "61bc5a40-687c-4f49-b9dc-ee0f24511b6f",
              "name": "checkin",
              "type": "string",
              "value": "2025-09-15"
            },
            {
              "id": "5bc0153f-90cc-43cc-92b0-64c87dcc4e59",
              "name": "checkout",
              "type": "string",
              "value": "2025-09-20"
            },
            {
              "id": "e6b268f2-c05a-44ed-9303-c0def3abf4fe",
              "name": "adults",
              "type": "number",
              "value": 2
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "80e8b765-0840-47d3-b591-060f82bb97c2",
      "name": "Scraper Airbnb via Bright Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        500,
        1020
      ],
      "parameters": {
        "url": "https://api.brightdata.com/request",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "zone",
              "value": "n8n_unblocker"
            },
            {
              "name": "url",
              "value": "=https://www.airbnb.com/s/{{ $json.Location }}--CA--United-States/homes?checkin={{ $json.checkin }}&checkout={{ $json.checkout }}&adults={{ $json.adults }}"
            },
            {
              "name": "country",
              "value": "us"
            },
            {
              "name": "format",
              "value": "raw"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer API KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "59da6712-9264-4622-a2ca-9791a892d336",
      "name": "Extraire Prix et Titre",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        1020
      ],
      "parameters": {
        "jsCode": "// Get the HTML content from the previous node.\n// Assuming your HTTP Request node's output is named 'data'.\nconst html = items[0].json.data;\n\n// This regex finds the specific <script> tag containing the search results.\nconst regex = /<script id=\"data-deferred-state-0\"[^>]*>([\\s\\S]*?)<\\/script>/;\nconst match = html.match(regex);\n\nif (!match || !match[1]) {\n  console.log(\"Could not find the data script tag.\");\n  return [{\n    error: \"Data script tag not found. The page structure might have changed.\"\n  }];\n}\n\ntry {\n  // Parse the JSON string found inside the script tag.\n  const jsonData = JSON.parse(match[1]);\n\n  // Navigate through the complex object to find the search results array.\n  // Using optional chaining (?.) prevents errors if a key doesn't exist.\n  const searchResults = jsonData?.niobeMinimalClientData?.[0]?.[1]?.data?.presentation?.staysSearch?.results?.searchResults;\n\n  if (!searchResults || !Array.isArray(searchResults)) {\n    console.log(\"Could not find search results in the JSON data.\");\n    return [{\n      error: \"Search results not found in the JSON data. The data structure may have changed.\"\n    }];\n  }\n\n  // Map over the results to extract the title and price for each listing.\n  const listings = searchResults.map(item => {\n    const title = item.title;\n    \n    // The price can be in 'discountedPrice' or 'price', so we check for both.\n    const primaryLine = item.structuredDisplayPrice?.primaryLine;\n    let price = \"N/A\";\n    if (primaryLine) {\n      const priceValue = primaryLine.discountedPrice || primaryLine.price;\n      const qualifier = primaryLine.qualifier || '';\n      price = `${priceValue} ${qualifier}`.trim();\n    }\n\n    return {\n      title,\n      price,\n    };\n  });\n\n  // n8n expects an array of objects to be returned.\n  // Each object will become a separate item for the next node.\n  return listings;\n\n} catch (e) {\n  console.error(\"Error parsing JSON data:\", e);\n  return [{\n    error: \"Failed to parse JSON data from the script tag.\"\n  }];\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "4710e13c-3ce5-4980-bfbf-727b4a425ae3",
      "name": "Sauvegarder dans Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1000,
        1020
      ],
      "parameters": {
        "columns": {
          "value": {
            "Price": "={{ $json.price }}",
            "Title": "={{ $json.title }}",
            "Adults": "={{ $('Set Search Criteria').item.json.adults }}",
            "CheckIn": "={{ $('Set Search Criteria').item.json.checkin }}",
            "CheckOut": "={{ $('Set Search Criteria').item.json.checkout }}",
            "Location": "={{ $('Set Search Criteria').item.json.Location }}"
          },
          "schema": [
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "CheckIn",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "CheckIn",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "CheckOut",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "CheckOut",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Adults",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Adults",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Price",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nwNkfh8n1qr6ft5mF3PhhDTTaDXb1K_4H3gd3D-nADc/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1nwNkfh8n1qr6ft5mF3PhhDTTaDXb1K_4H3gd3D-nADc",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nwNkfh8n1qr6ft5mF3PhhDTTaDXb1K_4H3gd3D-nADc/edit?usp=drivesdk",
          "cachedResultName": "Rooms on Airbnb"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "r2mDaisH6e9VkwHl",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "7e0664d1-40ce-4498-b412-6ebc60fc9a7f",
      "name": "Note Adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 6,
        "width": 380,
        "height": 1180,
        "content": "## 🟢 **Section 1: 🧭 Define & Trigger the Search**\n\n### 🧩 Nodes:\n\n1. ⏰ **Run Daily**\n2. 🛠 **Set Search Criteria**\n\n---\n\n### ✨ What's Happening Here:\n\n#### ⏰ **Run Daily**\n\n* This node is your **alarm clock** ⏰.\n* It automatically **starts the workflow** based on a schedule (e.g., daily at 8:00 AM).\n* You never need to click \"Execute Workflow\" manually again — it's 100% hands-free.\n\n> *“Imagine this as your personal assistant waking up every day to go find vacation deals for you.”*\n\n#### 🛠 **Set Search Criteria**\n\n* This is where you **set your filters**: destination, travel dates, number of guests.\n* For example:\n\n  ```json\n  {\n    \"location\": \"Los Angeles\",\n    \"checkin\": \"2025-09-15\",\n    \"checkout\": \"2025-09-20\",\n    \"adults\": 2\n  }\n  ```\n* This data will be **used in the scraping URL** sent to Airbnb through Bright Data.\n\n> *“It’s like telling your assistant: ‘Look for 2-person stays in LA from Sept 15–20.’”*\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b3904951-145f-44dd-947d-d99194798798",
      "name": "Note Adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        60
      ],
      "parameters": {
        "color": 3,
        "width": 440,
        "height": 1120,
        "content": "## 🌐 **Section 2: 🚀 Scrape & Extract Airbnb Data**\n\n### 🧩 Nodes:\n\n3. 🌐 **Scrape Airbnb via Bright Data**\n4. 🧠 **Extract Price & Title**\n\n---\n\n### ✨ What's Happening Here:\n\n#### 🌐 **Scrape Airbnb via Bright Data**\n\n* This node **sends a request** to Airbnb using **Bright Data Web Unlocker**.\n* Bright Data acts like a **stealth browser** 🕵️ that avoids blocks and loads the real webpage for you.\n* It fetches all the page data (even if Airbnb tries to hide it from bots).\n\n> *“Imagine Bright Data as your super-sneaky browser that can go where others can't.”*\n\n#### 🧠 **Extract Price & Title**\n\n* The raw response from Airbnb (HTML or JSON) is **parsed** in this Code node.\n* The code looks for:\n\n  * 🏷️ **Listing Title**\n  * 💰 **Price per night**\n* These are pulled out from the messy page code and transformed into clean data items.\n\n> *“It’s like using a fine-tooth comb to extract the useful info from a messy travel brochure.”*\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c41d599a-6211-4d0b-a392-212d2f948612",
      "name": "Note Adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        280
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 900,
        "content": "## 📄 **Section 3: 🧾 Store the Results**\n\n### 🧩 Node:\n\n5. 📄 **Save to Google Sheets**\n\n---\n\n### ✨ What's Happening Here:\n\n#### 📄 **Save to Google Sheets**\n\n* All the extracted data (titles and prices) are **stored row-by-row** in a Google Sheet.\n* Each day adds a new set of listings, creating a full **price history** over time.\n* You can use this sheet to:\n\n  * Track **price changes**\n  * Find **off-peak bargains**\n  * Compare cities or time periods\n\n> *“This is your digital notebook where every deal is neatly logged for review, comparison, or alerts.”*\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "6d833041-f1a3-40e4-a192-78aa903cb9e7",
      "name": "Note Adhésive9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1880,
        20
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "=======================================\n            WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1adeb274-de15-4f85-b198-5a235ae934a5",
      "name": "Note Adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1880,
        360
      ],
      "parameters": {
        "color": 4,
        "width": 1289,
        "height": 2738,
        "content": "# 🌟 Automation Overview: “Find Best Airbnb Deals (Daily Tracker)”\n\nThis n8n workflow automatically scrapes Airbnb listings every day and records the **title and price** of each rental into **Google Sheets**, helping you track the best travel deals over time — perfect for deal hunters, travel bloggers, or market researchers!\n\n---\n\n## 🟢 **Section 1: 🧭 Define & Trigger the Search**\n\n### 🧩 Nodes:\n\n1. ⏰ **Run Daily**\n2. 🛠 **Set Search Criteria**\n\n---\n\n### ✨ What's Happening Here:\n\n#### ⏰ **Run Daily**\n\n* This node is your **alarm clock** ⏰.\n* It automatically **starts the workflow** based on a schedule (e.g., daily at 8:00 AM).\n* You never need to click \"Execute Workflow\" manually again — it's 100% hands-free.\n\n> *“Imagine this as your personal assistant waking up every day to go find vacation deals for you.”*\n\n#### 🛠 **Set Search Criteria**\n\n* This is where you **set your filters**: destination, travel dates, number of guests.\n* For example:\n\n  ```json\n  {\n    \"location\": \"Los Angeles\",\n    \"checkin\": \"2025-09-15\",\n    \"checkout\": \"2025-09-20\",\n    \"adults\": 2\n  }\n  ```\n* This data will be **used in the scraping URL** sent to Airbnb through Bright Data.\n\n> *“It’s like telling your assistant: ‘Look for 2-person stays in LA from Sept 15–20.’”*\n\n---\n\n## 🌐 **Section 2: 🚀 Scrape & Extract Airbnb Data**\n\n### 🧩 Nodes:\n\n3. 🌐 **Scrape Airbnb via Bright Data**\n4. 🧠 **Extract Price & Title**\n\n---\n\n### ✨ What's Happening Here:\n\n#### 🌐 **Scrape Airbnb via Bright Data**\n\n* This node **sends a request** to Airbnb using **Bright Data Web Unlocker**.\n* Bright Data acts like a **stealth browser** 🕵️ that avoids blocks and loads the real webpage for you.\n* It fetches all the page data (even if Airbnb tries to hide it from bots).\n\n> *“Imagine Bright Data as your super-sneaky browser that can go where others can't.”*\n\n#### 🧠 **Extract Price & Title**\n\n* The raw response from Airbnb (HTML or JSON) is **parsed** in this Code node.\n* The code looks for:\n\n  * 🏷️ **Listing Title**\n  * 💰 **Price per night**\n* These are pulled out from the messy page code and transformed into clean data items.\n\n> *“It’s like using a fine-tooth comb to extract the useful info from a messy travel brochure.”*\n\n---\n\n## 📄 **Section 3: 🧾 Store the Results**\n\n### 🧩 Node:\n\n5. 📄 **Save to Google Sheets**\n\n---\n\n### ✨ What's Happening Here:\n\n#### 📄 **Save to Google Sheets**\n\n* All the extracted data (titles and prices) are **stored row-by-row** in a Google Sheet.\n* Each day adds a new set of listings, creating a full **price history** over time.\n* You can use this sheet to:\n\n  * Track **price changes**\n  * Find **off-peak bargains**\n  * Compare cities or time periods\n\n> *“This is your digital notebook where every deal is neatly logged for review, comparison, or alerts.”*\n\n---\n\n## 🎯 Why This Workflow is Powerful (Even for Beginners):\n\n| Benefit 💡                   | Description                                                               |\n| ---------------------------- | ------------------------------------------------------------------------- |\n| 📆 **Fully Automated**       | No manual work — set it once and let it run every day.                    |\n| 📊 **Easy Tracking**         | Automatically builds a database of deals over time.                       |\n| 💻 **Low-Code & Expandable** | You can easily add filters, alerts (e.g., Telegram, email), or analytics. |\n| 🧰 **Bright Data-Powered**   | Avoids bot detection and ensures clean, reliable data.                    |\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d309ee77-594c-40ad-b943-2ea268b0b47f",
      "name": "Note Adhésive5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        280
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## I’ll receive a tiny commission if you join Bright Data through this link—thanks for fueling more free content!\n\n### https://get.brightdata.com/1tndi4600b25"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4a456006-c946-40d6-8cd8-55db7f2518a6",
  "connections": {
    "3be17a72-1d6a-4bea-a36c-708125eef7ef": {
      "main": [
        [
          {
            "node": "d47e5caa-a861-4dad-9f48-52e816fc7a71",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d47e5caa-a861-4dad-9f48-52e816fc7a71": {
      "main": [
        [
          {
            "node": "80e8b765-0840-47d3-b591-060f82bb97c2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "59da6712-9264-4622-a2ca-9791a892d336": {
      "main": [
        [
          {
            "node": "4710e13c-3ce5-4980-bfbf-727b4a425ae3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "80e8b765-0840-47d3-b591-060f82bb97c2": {
      "main": [
        [
          {
            "node": "59da6712-9264-4622-a2ca-9791a892d336",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Intelligence Artificielle

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds11
Catégorie1
Types de nœuds6
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Yaron Been

Yaron Been

@yaron-nofluff

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34