Quick Overview
This workflow runs a charge-capped Apify actor to scrape Mercado Libre Argentina search results and logs each listing’s ARS price into Google Sheets, maintaining a current snapshot, a per-run price history, and a run ledger for recovery.
How it works
- Runs manually with a configured Mercado Libre Argentina search term, item limit, charge cap, and target Google Sheets spreadsheet ID.
- Reads the destination spreadsheet, creates the required tabs (Mercado Current, Mercado History, Mercado Runs), and adds a temporary lock sheet to prevent overlapping imports.
- Starts a new Apify run of the FalconScrape Mercado Libre Listings Scraper (or loads an existing run when a resumeRunId is provided) and records the run ID in the Mercado Runs tab.
- Polls Apify until the run succeeds, then fetches the completed dataset items.
- Filters and normalizes offers to valid MLA listings with direct Mercado Libre URLs and ARS prices, then compares each offer ID against Mercado Current to calculate baselines and price changes.
- Writes the latest prices to Mercado Current, appends observations to Mercado History, updates the Mercado Runs log, removes the lock sheet, and outputs a run summary.
Setup
- Add an Apify API token credential and a Google Sheets OAuth2 credential, and select them on the Apify and Google Sheets HTTP Request nodes.
- Create a Google Sheets spreadsheet and paste its spreadsheet ID (not the full URL) into the spreadsheetId value in the configuration step.
- Set the Mercado Libre search keyword, maxItems (1–100), and maxChargeUsd ($0.01–$1), and optionally provide a 17-character Apify resumeRunId to import an existing run instead of starting a new one.
- Ensure the spreadsheet tabs and headers managed by the workflow are not edited manually, and delete a stale _MERCADO_WORKFLOW_LOCK sheet only after confirming no execution is still running.