n8n

How to Automate Email Price Alerts?

Keep an eye on product prices without manual checks. This setup watches web pages on a schedule and emails you when a price changes or when the page selector stops working. It suits ecommerce teams, affiliate partners, and small retailers who need fast price updates.

A timer runs every 15 minutes. The flow loads a list of items to watch, fetches each product page, and pulls the price using a CSS selector. The price is cleaned and turned into a number. If a price is missing, an alert email is sent so you can fix the selector. If a price is found, the system checks for a local JSON file, creates it on the first run, or updates it on later runs. The new price is compared to the last saved price. When the new price is lower, an email is sent with both values and the currency.

Setup needs a valid CSS selector for each product, a place to write the JSON file on your n8n host, and SMTP access for sending emails. Expect quick alerts within 15 minutes of a change and less time spent on daily checks. This is useful for promo planning, price matching, and tracking competitor changes.

What are the key features?

  • Scheduled checks using a Cron node that runs every 15 minutes
  • Web page fetch with HTTP Request that pulls the full page as text
  • HTML Extract reads prices using a CSS selector for each product
  • Price parsing converts text to a number and flags missing values
  • File handling creates and updates a JSON store on the n8n host
  • Logic branches compare current and previous price to detect drops
  • Email alerts send notices for lower prices and for selector errors
  • Command check verifies if the storage file exists before writing
  • Binary and JSON converters keep data in the right format for files

What are the benefits?

  • Reduce manual price checks from 2 hours a day to 5 minutes
  • Get alert emails within 15 minutes of a price change
  • Monitor many products with one schedule and shared storage
  • Improve price data accuracy by removing copy paste errors
  • Keep a simple JSON history that supports ongoing tracking

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with SMTP. See the Tools Required section above for links to create accounts with these services.
  3. Open the Cron node and keep the schedule at every 15 minutes or set a new interval that matches your needs.
  4. Open the node that defines your watch list and add each product with its page URL, CSS selector for the price, currency, and a unique slug. Make sure each selector points to the price element on the page.
  5. Double click the HTTP Request node and confirm it uses the product link field and returns the response as a string.
  6. Open the HTML Extract node and confirm the selector is read from your item data. Test one URL and adjust the selector until a price value appears.
  7. Set up email credentials: open the Email Send nodes, choose Credential to connect with, click Create new credential, pick SMTP, and enter host, port, username, password, and secure settings from your mail provider. Name the credential clearly such as SMTP Price Alerts.
  8. Check file storage: the workflow writes to a JSON file in the /data directory on the n8n host. Make sure your environment allows writing to this path.
  9. Run a test by pointing one product to a known page and confirm the JSON file is created or updated and an email is sent when the price is lower than the stored one.
  10. If no price is found, you will get an error email. In that case, adjust the CSS selector to match the page structure and test again.
  11. If emails do not arrive, verify SMTP credentials, sender address, and spam filters. Send a test email from the Email Send node to confirm delivery.
  12. After testing, enable the workflow so the Cron schedule runs in the background and keeps your price alerts active.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.