Send New Products Alerts Using Klaviyo For Saved Search Terms

This set of workflows and theme code will allow you to enable your email subscribers to subscribe to new product alerts for specific keywords that they are interested in.

Then, when a new product launches, this will go through your subscribers and see if the new product matches their search terms and, if so, fire an event over to Klaviyo that will trigger a Klaviyo Flow to send them an email.

Watch The Demo

Search Results Page With Subscribe Form

And here’s the code that you would need to drop into the Search section in your theme:

<div class="page-width">
  <h2>Get email alerts when new products match this search</h2>
  <form id="mesa-form" style="max-width: 15em;"></form><script src=""></script>

My Account Page Showing Saved Searches

And here’s the code that you would need to drop into the Customer Account section in your theme:

<div class="customer account">
  <h2>Saved Search Alerts</h2>
  <ul id="mesa-saved-searches">


<script type="text/javascript">
  fetch('[email protected]')
  .then(response => {
    if (!response.ok) {
        throw new Error('Network response was not ok');
    return response.json(); // Use this for JSON responses
  .then(data => {
    let wrapper = document.getElementById('mesa-saved-searches');
    let deleteUrl = "";
    for (let row of data.search_terms) {
      wrapper.innerHTML += `
          ${row.term} - <a href="${deleteUrl}&key=${row.key}" target="_blank">delete</a>
  .catch(error => {
    console.error('There was a problem with your fetch operation:', error);

Workflow 1: Subscribe Form

Workflow 2: When New Product Created, Fire Klaviyo Events

Workflow 3: Get Existing Saved Searches

Workflow 4: Delete Existing Saved Search Term

Klaviyo Flow

How do I use this demo file?

  1. Add MESA from the Shopify App Store. Enjoy a 7-day free trial to start.
  2. Import this download to My Workflows. Navigate to your automations then follow the prompt to import a workflow. Upload the downloaded ZIP file from this demo.
  3. That's it! Personalize any step if you want. You got this.
  4. Questions? Shoot me an email: [email protected]
We literally wrote the book on Shopify automation

Learn how to make Shopify work easier with your business processes.

Get the playbook - Free!

shopify automation playbook PDF