Marché aux puces périphérique (exposition)

Avancé

Ceci est unOtherworkflow d'automatisation du domainecontenant 20 nœuds.Utilise principalement des nœuds comme If, Set, Html, Filter, SplitOut. 📍 Envoi de rappels quotidiens de marchés aux puces proches via Telegram

Prérequis
  • Token Bot Telegram
  • Peut nécessiter les informations d'identification d'authentification de l'API cible

Catégorie

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": "xR7g6JLAHXJScFEG",
  "meta": {
    "instanceId": "89af474e60c70a1e45bf242e266e9ca1446dd974ab86f6d185b8ccded3effed2",
    "templateCredsSetupCompleted": true
  },
  "name": "Garage Sales Around  (Showcase)",
  "tags": [
    {
      "id": "NabIyPgRf7ZggE5B",
      "name": "Showcase",
      "createdAt": "2025-06-03T15:41:30.076Z",
      "updatedAt": "2025-06-03T15:41:30.076Z"
    }
  ],
  "nodes": [
    {
      "id": "edb6065a-738e-41c8-9719-0ae928f8cace",
      "name": "En cliquant sur 'Test workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1200,
        -1005
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6ee2fbb2-3f5b-496d-97a3-74c9a33c5166",
      "name": "Obtenir Brocabrac",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -540,
        -880
      ],
      "parameters": {
        "url": "={{ $json.URL }}",
        "options": {},
        "responseFormat": "string"
      },
      "typeVersion": 1
    },
    {
      "id": "1e824e88-b943-4b58-80c2-3761a821bd64",
      "name": "Diviser",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        340,
        -880
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "ev"
      },
      "typeVersion": 1
    },
    {
      "id": "c11bbebc-cae5-4f55-a65c-3eaa943c117f",
      "name": "Boucler sur les éléments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        560,
        -880
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "42a7ed20-b88c-4ae7-8299-e753a4311982",
      "name": "Chaque jour à 7h",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1200,
        -800
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "30 7 * * *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cabda7f6-6c14-4bbc-863f-403e129c1517",
      "name": "Obtenir la localisation",
      "type": "n8n-nodes-base.homeAssistant",
      "position": [
        -980,
        -880
      ],
      "parameters": {
        "entityId": "Your_Smartphone_location_sensor",
        "resource": "state"
      },
      "credentials": {
        "homeAssistantApi": {
          "id": "VurjB0xfUjis4pXd",
          "name": "Home Assistant account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3098fb12-99a0-4bf8-9cbc-a782c1b62663",
      "name": "Définir l'URL à analyser",
      "type": "n8n-nodes-base.set",
      "position": [
        -760,
        -880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "54a5f609-4267-4367-bbbb-2c692730b536",
              "name": "URL",
              "type": "string",
              "value": "=https://brocabrac.fr/{{ $json.attributes.postal_code.slice(0,2) }}/{{ $json.attributes.locality }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "de23ed8b-d907-4bbb-ac22-08378c48e457",
      "name": "Extraire Date & Blocs",
      "type": "n8n-nodes-base.html",
      "position": [
        -320,
        -880
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "Date",
              "attribute": "data-date",
              "cssSelector": "div.block.ev-list > div:nth-child(1) > div.section-title",
              "returnValue": "attribute"
            },
            {
              "key": "HTMLBlock",
              "cssSelector": "div.block.ev-list > div",
              "returnValue": "html"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "44b70afd-e751-4817-b853-187e290db2b4",
      "name": "Obtenir Rang & Distance",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        -880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f5d111d1-3790-41c9-a395-69f1f327ef09",
              "name": "Distance",
              "type": "number",
              "value": "={{ $json.Distance.slice(0,-3) }}"
            },
            {
              "id": "6f72f72c-3a16-4a1a-87d9-13fdff32b25d",
              "name": "Rank",
              "type": "string",
              "value": "={{ $json.Rank.replaceAll('•','x') }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "e3da6c6a-0a45-4cb7-abd7-f4fc49555a06",
      "name": "Filtrer (proximité et grands événements)",
      "type": "n8n-nodes-base.filter",
      "position": [
        800,
        -1660
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "143b57f3-23e9-4675-b667-4a08e74db9c1",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.Rank }}",
              "rightValue": ""
            },
            {
              "id": "3cfb49b7-5e8b-4783-af0b-b0b9f658b14c",
              "operator": {
                "type": "number",
                "operation": "lte"
              },
              "leftValue": "={{ $json.Distance }}",
              "rightValue": 20
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "76ed047f-ddc9-4fff-b8f6-1c2b36f06be1",
      "name": "Des événements aujourd'hui ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -100,
        -880
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "03b76adc-e818-44cc-9a99-12d03a33b099",
              "operator": {
                "type": "dateTime",
                "operation": "equals"
              },
              "leftValue": "={{ $json.Date.toDateTime() }}",
              "rightValue": "={{ $today.plus({days}) }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7c9021a5-6907-4956-9b86-c8d6a960fff5",
      "name": "Extraire les événements Brocante",
      "type": "n8n-nodes-base.html",
      "position": [
        120,
        -880
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "dataPropertyName": "HTMLBlock",
        "extractionValues": {
          "values": [
            {
              "key": "ev",
              "cssSelector": "div.ev",
              "returnArray": true,
              "returnValue": "html"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ba984d37-184f-4a8d-b2aa-b06f78222292",
      "name": "Obtenir les infos de chaque Brocante",
      "type": "n8n-nodes-base.html",
      "position": [
        780,
        -880
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "dataPropertyName": "ev",
        "extractionValues": {
          "values": [
            {
              "key": "City",
              "cssSelector": "span.city"
            },
            {
              "key": "Distance",
              "cssSelector": "span.dist"
            },
            {
              "key": "Rank",
              "cssSelector": "span.dots"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a790ab8e-746b-46ba-bcb3-a611662636df",
      "name": "Envoyer une alerte",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1500,
        -1660
      ],
      "webhookId": "42c6d21a-ea60-4b37-8822-46a41ef9bdf1",
      "parameters": {
        "text": "={{ $json.message }}",
        "chatId": "Your_Chat_ID",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "ANiBkg3Tng36ZRwP",
          "name": "Telegram account (n8n)"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c05d53df-98f2-4f29-8b69-e3652e9443f6",
      "name": "Structurer la réponse",
      "type": "n8n-nodes-base.set",
      "position": [
        1020,
        -1660
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3516d92b-fda3-4441-a059-639db5bd29cf",
              "name": "Brocante",
              "type": "string",
              "value": "={{ $json.City }} ({{ $json.Rank }} à {{ $json.Distance }} km)"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ec425780-841b-451d-8160-b66890828fd4",
      "name": "Définir le message",
      "type": "n8n-nodes-base.set",
      "position": [
        1240,
        -1660
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "22ff618b-d768-46bf-83b6-64c60ed1407b",
              "name": "message",
              "type": "string",
              "value": "=📦🏡 Voici les brocantes : - {{ $json.Brocante }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ea4f3e9d-291e-4557-b242-eea7dac2dd5c",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -1320
      ],
      "parameters": {
        "width": 640,
        "height": 660,
        "content": "## 1️⃣ Fetch & Parse Garage Sale Data\n### What happens:\n- An HTTP request retrieves the HTML content of the Brocabrac page for the current location.\n- The workflow extracts two pieces of data:\n  - Date (the day events are listed for)\n  - HTMLBlock (the full block of garage sales info)\n- It checks if any events are scheduled for today.\n- If yes, it extracts all div.ev entries representing individual garage sales.\n\n### Purpose:\nConverts a static webpage into structured data, ready for processing."
      },
      "typeVersion": 1
    },
    {
      "id": "6692692d-c5f7-427f-a95b-ebe00042bb91",
      "name": "Note adhésive 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        -1320
      ],
      "parameters": {
        "width": 1400,
        "height": 660,
        "content": "## 2️⃣ Process, Filter & Extract Relevant Events\nWhat happens:\n- Splits the list of garage sale entries and loops over each.\n- From each block, it extracts:\n  - City\n  - Distance\n  - Rank (event importance indicator using dots)\n- Cleans up the data (e.g., removes \"km\" from distance, replaces \"•\" in rank).\n- Filters events based on two criteria:\n  - Distance ≤ 20 km\n  - Rank must be present (indicating notable size or popularity)\n\nPurpose:\nFilters out irrelevant or too-distant events to surface only the best nearby options."
      },
      "typeVersion": 1
    },
    {
      "id": "33aa481c-f216-4fee-aa0f-01fdd0db92ae",
      "name": "Note adhésive 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -2040
      ],
      "parameters": {
        "width": 1020,
        "height": 620,
        "content": "## 3️⃣ Format & Send Notifications via Telegram\n### What happens:\n- The remaining filtered events are formatted into a clean string like:\n  ```\n  City (Rank à Distance km)\n  ```\n- These are combined into a single message like:\n  ```\n  📦🏡 Voici les brocantes : - City1 (...) - City2 (...)\n  ```\n- The final message is sent to the user via Telegram.\n\n### Purpose:\nDelivers timely, relevant alerts about today’s garage sales in a user-friendly way."
      },
      "typeVersion": 1
    },
    {
      "id": "05b97c78-ece0-4b20-8d4a-9814aaabaf4c",
      "name": "Note adhésive 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1380,
        -1320
      ],
      "parameters": {
        "width": 520,
        "height": 660,
        "content": "## 0️⃣ Daily Trigger & Geolocation Setup\n### What happens:\n- The workflow is triggered either manually or automatically every day at 7 AM (Schedule Trigger node).\n- It fetches the current location of a mobile phone using a Home Assistant sensor.\n- It then builds a dynamic URL based on the user’s geolocation (postal code and locality) to query Brocabrac.fr for local garage sales.\n\n### Purpose:\nEnsures the data being fetched is location-aware and always relevant to the user's current position."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ab2abd4b-1f04-4e48-bd2f-79ff028962c4",
  "connections": {
    "1e824e88-b943-4b58-80c2-3761a821bd64": {
      "main": [
        [
          {
            "node": "c11bbebc-cae5-4f55-a65c-3eaa943c117f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "76ed047f-ddc9-4fff-b8f6-1c2b36f06be1": {
      "main": [
        [
          {
            "node": "7c9021a5-6907-4956-9b86-c8d6a960fff5",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "cabda7f6-6c14-4bbc-863f-403e129c1517": {
      "main": [
        [
          {
            "node": "3098fb12-99a0-4bf8-9cbc-a782c1b62663",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6ee2fbb2-3f5b-496d-97a3-74c9a33c5166": {
      "main": [
        [
          {
            "node": "de23ed8b-d907-4bbb-ac22-08378c48e457",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c11bbebc-cae5-4f55-a65c-3eaa943c117f": {
      "main": [
        [
          {
            "node": "e3da6c6a-0a45-4cb7-abd7-f4fc49555a06",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ba984d37-184f-4a8d-b2aa-b06f78222292",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec425780-841b-451d-8160-b66890828fd4": {
      "main": [
        [
          {
            "node": "a790ab8e-746b-46ba-bcb3-a611662636df",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3098fb12-99a0-4bf8-9cbc-a782c1b62663": {
      "main": [
        [
          {
            "node": "6ee2fbb2-3f5b-496d-97a3-74c9a33c5166",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "42a7ed20-b88c-4ae7-8299-e753a4311982": {
      "main": [
        [
          {
            "node": "cabda7f6-6c14-4bbc-863f-403e129c1517",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c05d53df-98f2-4f29-8b69-e3652e9443f6": {
      "main": [
        [
          {
            "node": "ec425780-841b-451d-8160-b66890828fd4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "44b70afd-e751-4817-b853-187e290db2b4": {
      "main": [
        [
          {
            "node": "c11bbebc-cae5-4f55-a65c-3eaa943c117f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "de23ed8b-d907-4bbb-ac22-08378c48e457": {
      "main": [
        [
          {
            "node": "76ed047f-ddc9-4fff-b8f6-1c2b36f06be1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ba984d37-184f-4a8d-b2aa-b06f78222292": {
      "main": [
        [
          {
            "node": "44b70afd-e751-4817-b853-187e290db2b4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7c9021a5-6907-4956-9b86-c8d6a960fff5": {
      "main": [
        [
          {
            "node": "1e824e88-b943-4b58-80c2-3761a821bd64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e3da6c6a-0a45-4cb7-abd7-f4fc49555a06": {
      "main": [
        [
          {
            "node": "c05d53df-98f2-4f29-8b69-e3652e9443f6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "edb6065a-738e-41c8-9719-0ae928f8cace": {
      "main": [
        [
          {
            "node": "cabda7f6-6c14-4bbc-863f-403e129c1517",
            "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é ?

Avancé - Autres

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é
Avancé
Nombre de nœuds20
Catégorie1
Types de nœuds12
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Thibaud

Thibaud

@tderouze

Automation consultant with over 10 years experience helping Sales & Marketing teams to streamline their processes.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34