Add Booking.json

This commit is contained in:
2001-01-01 00:00:00 +00:00
parent 0ad3fbbc9e
commit d0bffce277

309
Booking.json Normal file
View File

@@ -0,0 +1,309 @@
{
"updatedAt": "2025-11-11T20:49:13.000Z",
"createdAt": "2025-11-11T20:49:09.442Z",
"id": "ijoED1Gduh7H8n5w",
"name": "Booking",
"active": false,
"isArchived": false,
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-656,
16
],
"id": "906345ee-caab-4bb3-814e-31f949617a04",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"url": "https://www.booking.com/searchresults.de.html?ss=%C3%84gypten&efdco=1&aid=304142&lang=de&sb=1&src_elem=sb&src=index&dest_id=63&dest_type=country&ac_position=0&ac_click_type=b&ac_langcode=de&ac_suggestion_list_length=5&search_selected=true&checkin=2025-12-15&checkout=2025-12-18&group_adults=2&no_rooms=1&group_children=0",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.3,
"position": [
-448,
-160
],
"id": "4491792a-d553-40b2-9242-6ea15a645e5f",
"name": "HTTP Request: Booking",
"alwaysOutputData": false,
"executeOnce": false
},
{
"parameters": {
"operation": "extractHtmlContent",
"extractionValues": {
"values": [
{
"cssSelector": "[data-testid=\"property-card-container\"]",
"returnValue": "html",
"returnArray": true
}
]
},
"options": {}
},
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
-240,
16
],
"id": "26e34f96-c102-434c-bd18-6279b6ca2569",
"name": "HTML: Extract Property Card",
"alwaysOutputData": false
},
{
"parameters": {
"fieldToSplitOut": "['']",
"options": {
"destinationFieldName": "property"
}
},
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
0,
16
],
"id": "ea471095-87d3-4a43-b956-792bec95ef7e",
"name": "Split Out: Properties into Items"
},
{
"parameters": {
"operation": "extractHtmlContent",
"dataPropertyName": "property",
"extractionValues": {
"values": [
{
"key": "title",
"cssSelector": "[data-testid=\"title\"]"
},
{
"key": "url",
"cssSelector": "[ data-testid=\"title-link\"]",
"returnValue": "attribute",
"attribute": "href"
},
{
"key": "review_score",
"cssSelector": "[data-testid=\"review-score\"] div:nth-child(2)"
},
{
"key": "reviewer_count",
"cssSelector": "[data-testid=\"review-score\"] div:nth-child(3) div:nth-child(2)"
},
{
"key": "price",
"cssSelector": "[data-testid=\"price-and-discounted-price\"]"
}
]
},
"options": {
"trimValues": true,
"cleanUpText": true
}
},
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
240,
16
],
"id": "f655922f-e197-42e3-a62c-a7bf32f892f2",
"name": "HTML: Extract Properties of Property"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "6e061f3d-0786-47c3-adb2-26ae5cc7bc39",
"name": "=price",
"value": "={{ $input.item.json[\"price\"].match(/\\d+/).toString().trim()}}",
"type": "string"
},
{
"id": "eafba105-4629-4855-9da1-e8d118cc5e9f",
"name": "reviewer_count",
"value": "={{ $json.reviewer_count.match(/\\d+/).toString().trim() }}",
"type": "string"
}
]
},
"includeOtherFields": true,
"include": "=all",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
448,
16
],
"id": "ca02afb7-c3c7-4858-89f4-a0620d3aadd9",
"name": "Edit: Clean-Up"
},
{
"parameters": {
"content": "Collect Booking data",
"height": 736,
"width": 1536
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-736,
-320
],
"typeVersion": 1,
"id": "cd631117-8a36-451f-8dd4-3101a9f83b76",
"name": "Sticky Note"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose",
"version": 2
},
"conditions": [
{
"id": "fdee6bc1-8dbc-42b4-a8dc-d2a1cb9962e8",
"leftValue": "={{ $json.reviewer_count.toNumber() }}",
"rightValue": 100,
"operator": {
"type": "number",
"operation": "gt"
}
},
{
"id": "28458b75-1d85-4820-bbd6-50d1fd940a26",
"leftValue": "",
"rightValue": "",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"looseTypeValidation": true,
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
656,
16
],
"id": "f6e3fb7c-d7a9-4c94-9018-cc515823fccf",
"name": "Filter"
},
{
"parameters": {},
"type": "n8n-nodes-puppeteer.puppeteer",
"typeVersion": 1,
"position": [
-448,
16
],
"id": "11b3791e-be22-4716-bcc1-4a1b14948a84",
"name": "Puppeteer",
"executeOnce": true
}
],
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Puppeteer",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request: Booking": {
"main": [
[
{
"node": "HTML: Extract Property Card",
"type": "main",
"index": 0
}
]
]
},
"HTML: Extract Property Card": {
"main": [
[
{
"node": "Split Out: Properties into Items",
"type": "main",
"index": 0
}
]
]
},
"Split Out: Properties into Items": {
"main": [
[
{
"node": "HTML: Extract Properties of Property",
"type": "main",
"index": 0
}
]
]
},
"HTML: Extract Properties of Property": {
"main": [
[
{
"node": "Edit: Clean-Up",
"type": "main",
"index": 0
}
]
]
},
"Edit: Clean-Up": {
"main": [
[
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": null,
"pinData": {},
"versionId": "d4e6353d-a9ad-4d8d-9550-763fdde208d5",
"triggerCount": 0,
"shared": [
{
"updatedAt": "2025-11-11T20:49:09.445Z",
"createdAt": "2025-11-11T20:49:09.445Z",
"role": "workflow:owner",
"workflowId": "ijoED1Gduh7H8n5w",
"projectId": "S4tmpzSj6JlGFOze"
}
],
"tags": []
}