Sync Shopify product changes to Algolia in real time
When a product is created, updated, or deleted in Shopify, we update your Algolia search index within seconds so shoppers always see the current catalog.
Keep my Algolia catalog index in lockstep with Shopify so site search always reflects the current storefront.
Trigger: webhook when Shopify emits a products/create, products/update, or products/delete event. Ignore any other event type.
On a products/create or products/update event, call Shopify Get Product using the product id from the webhook payload to pull the full current record. Then call Algolia Add or Replace Record on my catalog index, using the Shopify product id (as a string) as the objectID.
On a products/delete event, call Algolia Delete Record on the same index with the Shopify product id (as a string) as the objectID. Do not fetch anything from Shopify in this branch. The webhook payload already tells us which record to remove.
For every Algolia record I write, project only a slim, allowlisted set of Shopify fields so indexing costs stay low and the record shape stays predictable:
- title: product.title
- handle: product.handle
- vendor: product.vendor
- product_type: product.product_type
- tags: product.tags split into an array of strings
- price: the first variant's price coerced to a number, or the minimum price across variants if you prefer
- image_url: product.image.src, or null if the product has no image
- availability: true if any variant has inventory_quantity greater than 0 (or the variant does not track inventory) and the product status is active, otherwise false
This is a deterministic, node-based workflow. No LLM reasoning, no branching beyond the three webhook event types. Every step is a documented operation (Shopify Get Product, Algolia Add or Replace Record, Algolia Delete Record) or a small pure-function projection over the Shopify payload.
Additional information
What does this prompt do?
- Listens for product create, update, and delete events on your Shopify store.
- On a create or update, pulls the current product record from Shopify and writes a slim, predictable record into your Algolia index using the Shopify product id.
- On a delete, removes the matching record from your Algolia index straight away.
- Indexes only a small allowlist of fields (title, handle, vendor, price, tags, image, availability, product type) so indexing costs stay low and search behavior stays predictable.
What do I need to use this?
- A Shopify store you can add webhooks to.
- An Algolia account with an index for your products and an Admin API key.
How can I customize it?
- Choose which Algolia index the workflow writes into.
- Change which product fields land on each record. Add color, material, or SKU if your shoppers search on them.
- Adjust how availability is determined (any variant in stock vs total inventory above a threshold).
Frequently asked questions
Does this update the Algolia record when stock or price changes?
What happens if I delete a product in Shopify?
Will this work with product variants?
How fast does search reflect a Shopify change?
Can I use this on more than one Shopify store?
Related templates
Stop babysitting your product index.
Wire Shopify to Algolia once and let every product change flow through on its own.