Automate

Dear experts.

I am in the process of learning with n8n. And I would like to validate the possibility of creating a workflow that allows me to automate the purchase of products at a supermarket.
I’m imagining the following:

  1. A Google Sheet that contains [“Product Name”, “Quantity”, “Product Brand”]
  2. A URL to the supermarket’s website.
  3. Add the products that are in the Google Sheet and add them to the shopping cart.

I would like to have an idea of how I could do that and what nodes I should use.

Thank you in advance!

1 Like

Hey @aprendiendon8n_wsant, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@Zelite, @mohamed3nan, @zynate - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Google Sheets node → Resource: Document, Operation: “From Sheet” → Get Row(s). Row 1 is read as the header row, so every row comes back with fields you reference as {{ $json[“Product Name”] }} and {{ $json.Quantity }}. Put a Loop Over Items node in front so one product is handled per iteration.

Then a Browser Tool node: navigate to the product page, set the quantity, click Add to cart.

Plain typing often fails to register on a React/Vue quantity field, so drive it from the node’s JavaScript action instead:

const el = document.querySelector('input[name="quantity"]');
el.value = '2';
el.dispatchEvent(new Event('input', { bubbles: true }));

Two things to check before you sink time into it: a headless run starts with no login and no cookies, and most supermarket sites block headless Chrome or throw a CAPTCHA once requests repeat. If the chain has a partner/commerce API, an HTTP Request node with a Header Auth credential will outlive every CSS selector you write.

Hi

Is the Browser Tool node the one I’m pointing to?

Hi, the screenshot is too small for me to tell which node you are pointing to. The node panel shows the exact name at the top, and whether it is a core node or a community package. If you paste that name here, people can tell you if it is the right one.

Before building the whole chain, I would plan it in this order. First, check if the supermarket has an official API, an order-upload feature, or a partner feed. That is far more reliable than driving a browser, so look there first.

Second, if it is browser-only, make the first version stop before checkout, so a wrong match never turns into a real order.

Third, write a result back to the Sheet for every row (added, not found, out of stock, quantity changed). Otherwise a failure on row 7 hides behind a green execution.

Fourth, brand matching is the weak point. I would search with name plus brand, add the item only when the result is a clear match, and mark anything else for manual review.

I have not tried this on your specific supermarket site, so the selectors and login handling are the part I cannot speak to. If you share which site it is and whether it has an app or API, I can sketch the node layout with you.