Repost: Edit tags of existing customers in form

Topic summary

A developer created a form that triggers an email to customers via Shopify Flow and Klaviyo when they submit it to download an ebook. The system works by adding an ‘ebook_download’ tag to the customer profile.

Current Issue:

  • The automation only functions for new customers not already in the system
  • Existing customers (previous purchasers or newsletter subscribers) don’t trigger the flow when submitting the form
  • Tags must be added manually for existing customers, which is inefficient

Technical Context:

  • Uses Shopify Flow listening for ‘customer tags added’ event
  • Checks for specific ‘ebook_download’ tag before triggering Klaviyo
  • The form code appears to be provided (though partially corrupted/reversed in the post)

The developer is seeking help to modify their code so the tag addition and subsequent email trigger works for both new and existing customers automatically. The discussion remains open with no solutions provided yet.

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

Hey, I created a form that sends an email to a customer when filled in en submited. It works by adding a tag called ‘ebook_download’ to the customer. Then I have a shopify flow setup that listens to the event ‘customer tags added’ then checks for the specific tag ‘ebook_download’ and sends a trigger to klaviyo. The problem is that it only works for customers who’s email isn’t already in the customer files. So let’s say someone who already made an order or someone who is subscribed to the newsletter wants to fill in the form to get the ebook, we have to manualy add the tag in the customer files. This is ofcourse not ideal. Can anyone help me complete my code? Thanks in advance. P.S: I can send the styling for the code if there is a need for it.

{% layout 'page' %}
<div class="ebook-page">
  <div class="ebook-form-container" style="background-image: url({{'marmer_bg.jpg' | asset_url}}); background-size: cover; background-position: top;">
    <div class="ebook-image">
      <img src="{{ 'pinepower-ebook.png' | asset_url }}" width="700" height="700" style="object-fit: cover;" alt="pinepower_ebook" />
    </div>
    
    {% form 'customer', id: 'ebook-form' %}
      <div class="form-inner-wrapper">
        <h1>Download hier je gratis E-Book</h1>
        <div class="input-wrapper">
          <div class="field">
            <label for="ebook_first_name">Voornaam:</label>
            <input class="text-input" type="text" id="first-name" name="contact[first_name]" placeholder="Voornaam" required>
          </div>
          <div class="field">
            <label for="ebook_email">Email:</label>
            <input class="text-input" type="email" id="email" name="contact[email]" placeholder="Email" required>
          </div>
        </div>
        <input type="hidden" name="contact[tags]" value="ebook_download">
        <button type="submit">Verstuur gratis E-Book</button>
      </div>
    {% endform %}
  </div>