# Idealo → Google Sheets (end-to-end demo)

A client-style price tracker: run [Idealo Scraper](https://apify.com/stippled_starfish/idealo-de) (v2, latest **2.0.5**, $0.003 per product) and append the cheapest offer for each product to Google Sheets.

This folder is the proof and the reusable workflow, not a public share of the spreadsheet.

## Live demo result

| Field | Value |
| --- | --- |
| Actor | [stippled_starfish/idealo-de](https://apify.com/stippled_starfish/idealo-de) |
| Build | `latest` = **2.0.5** |
| Run ID | **vjWps4A8KCKEbfkiA** ([open in Console](https://console.apify.com/view/runs/vjWps4A8KCKEbfkiA)) |
| Status | SUCCEEDED |
| Started | 1 Dec 2026, 11:29:25 Europe/Bucharest |
| Finished | 1 Dec 2026, 11:31:10 Europe/Bucharest |
| Duration | ~1 min 45 s |
| Items | **5 products** with real prices and shop names |
| Markets | 3 products in Germany (DE), 2 of the same products in Austria (AT) |
| Proxy | none (`useApifyProxy: false`) |
| Charged events | 5 × product at $0.003 = **$0.015**, plus a few tenths of a cent of compute. No proxy traffic. |
| Endpoint tested | `POST /v2/acts/stippled_starfish~idealo-de/run-sync-get-dataset-items?build=latest` → **HTTP 201**, `X-Apify-Pagination-Count: 5` |

Products returned:

1. Apple AirPods Pro 3 — GTIN 0195950543650 — DE — cheapest / total €189,90 — smartport.de — 55 offers
2. Apple iPhone 15 128GB Blau — GTIN 0195949034572 — DE — €545,00 — smartport.de — 26 offers
3. Apple AirPods Pro 3 — GTIN 0195950543650 — AT — €189,90 — smartport.de (AT) — 33 offers
4. Apple iPhone 15 128GB Blau — GTIN 0195949034572 — AT — €545,00 — smartport.de (AT) — 15 offers
5. Apple AirPods Pro 2 — no GTIN on this listing — DE — €176,99 — bosaverna.de — 15 offers

The same input is in `input.json`. Dates in the sheet and in `data.csv` are Europe/Bucharest.

## Google Sheet (private)

The demo spreadsheet stays private and is **not linked here** (no URL, no file ID). Proof of the filled sheet is only:

- `sheet_screenshot.png`
- `exports/idealo_price_tracker_sheet.pdf`

The Products tab has a frozen header (title + subtitle + column names), filters, euro number formats, and these columns:

Product · GTIN · Brand · Cheapest price · Total price (incl. shipping) · Currency · Shop · Offer count · Country · URL · Date (Europe/Bucharest)

GTINs are stored as text so the leading zero is kept.

## Files

| File | What it is |
| --- | --- |
| `n8n_idealo_to_sheets.json` | n8n workflow: Schedule → HTTP Request (Apify run-sync-get-dataset-items) → flatten → Google Sheets append |
| `make_idealo_to_sheets.blueprint.json` | Equivalent Make.com blueprint |
| `input.json` | The exact actor input used for the demo run |
| `data.csv` | The 5 product rows written to the sheet (unformatted values) |
| `sheet_screenshot.png` | Readable landscape screenshot of the sheet |
| `exports/idealo_price_tracker_sheet.pdf` | Official Google Sheets PDF export (portrait letter; tighter than the PNG) |
| `exports/sheet_export.csv` | Official Google Sheets CSV export (formatted as displayed) |
| `exports/sheet_screenshot.png` | Same screenshot |
| `run_sync_headers.txt` | Response headers from the curl test of the sync endpoint (no token) |
| `run_summary.json` / `items_slim.json` | Run metadata and a slim copy of the 5 products |

No file in this folder contains an Apify token.

## How a client reproduces it

### 1. One-shot test with curl (same endpoint as the workflow)

Create an Apify token in [Console → Settings → API](https://console.apify.com/settings/integrations). Do not commit it.

```bash
export APIFY_TOKEN="YOUR_APIFY_TOKEN"

curl -sS --max-time 180 \
  -X POST "https://api.apify.com/v2/acts/stippled_starfish~idealo-de/run-sync-get-dataset-items?build=latest&timeout=180" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @input.json
```

A successful call returns **HTTP 201** and a JSON array of products. This demo run used that exact endpoint and returned 5 items. Cost is $0.003 per product found (this input is capped at `maxItems: 5`). Proxy is off.

To look up the run afterwards: [Apify Console → Actors → idealo-de → Runs](https://console.apify.com/actors/stippled_starfish~idealo-de/runs), newest first.

### 2. Create your own Google Sheet

1. Create a spreadsheet (any name).
2. Rename the first tab to `Products`.
3. Put this header in row 1 (or keep a title block and put the header in row 3, as in the demo):

`Product | GTIN | Brand | Cheapest price | Total price (incl. shipping) | Currency | Shop | Offer count | Country | URL | Date (Europe/Bucharest)`

4. Copy the spreadsheet ID from the URL: `https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/edit`.

Use your own spreadsheet. The demo sheet used for this proof stays private and is not shared.

### 3. n8n

1. In n8n: **Workflows → Import from File** → `n8n_idealo_to_sheets.json`.
2. Open **Run Idealo actor**. Replace `{{APIFY_TOKEN}}` by an n8n **Header Auth** credential:
   - Name: `Authorization`
   - Value: `Bearer <your Apify token>`
   Then remove the placeholder from the header, or keep the header and paste the token only in a credential. Never leave a real token in the workflow JSON.
3. Open **Append to Google Sheets**. Connect your Google Sheets account and replace `YOUR_GOOGLE_SHEET_ID` with your spreadsheet ID. The tab name must be `Products`.
4. The workflow timezone is `Europe/Bucharest`, and the trigger is every day at 08:00. Change this if you need to.
5. Run it once by hand to confirm a new row appears for each product.

### 4. Make.com

1. In Make: **Import blueprint** → `make_idealo_to_sheets.blueprint.json`.
2. In the HTTP module, replace `{{APIFY_TOKEN}}` with a Make connection or a secret. Do not save a raw token in the blueprint.
3. Connect Google Sheets. Replace `YOUR_GOOGLE_SHEET_ID` and `YOUR_GOOGLE_CONNECTION_ID`. Target tab: `Products`.
4. The schedule is `0 8 * * *` in Europe/Bucharest. Run the scenario once by hand to confirm rows are appended.

### 5. What the workflow sends

The HTTP body is `input.json`: two popular EANs (iPhone 15 and AirPods Pro 3) plus a search for “airpods pro 2” on idealo.de, and the same barcodes on idealo.at, capped at 5 products, no proxy.

You can swap in your own EANs, search words, or countries (`de`, `at`, `fr`, `it`, `es`, `uk`). Keep `maxItems` low while testing.

## Mapping from the actor output

| Sheet column | Actor field |
| --- | --- |
| Product | `title` |
| GTIN | `gtin` |
| Brand | `brand` |
| Cheapest price | `lowestPrice` |
| Total price (incl. shipping) | `lowestTotalPrice` |
| Currency | `currency` |
| Shop | `cheapestShop.shopName` |
| Offer count | `offerCount` |
| Country | `country` |
| URL | `productUrl` |
| Date (Europe/Bucharest) | `scrapedAt`, converted from UTC |

The n8n **Flatten products** node and the Make blueprint now do the same shaping:

- `country` is uppercased (`DE`, `AT`, …).
- Rows with `type = not_found` are skipped (n8n filter in the Code node; Make filter on the Google Sheets module).
- `scrapedAt` is converted from UTC to **Europe/Bucharest**. In Make this is `{{formatDate(3.scrapedAt; "YYYY-MM-DD HH:mm:ss"; "Europe/Bucharest")}}`.

## Public import links

These files are also published for one-click import (JSON + this README only; no tokens, no private sheet IDs):

- n8n workflow: `https://idealo-to-sheets.pages.dev/n8n_idealo_to_sheets.json`
- Make blueprint: `https://idealo-to-sheets.pages.dev/make_idealo_to_sheets.blueprint.json`
- This README: `https://idealo-to-sheets.pages.dev/README.md`

In n8n: **Workflows → Import from URL** (or Import from File after downloading the JSON). In Make: **Import blueprint**.
