Avoid duplicates when adding customer tags with Workflow

Topic summary

A user encountered issues with a Shopify workflow designed to automatically add customer tags based on a product’s “artist” metafield. The workflow was creating single concatenated tags instead of separate tags for different artists.

Problems identified:

  • Single product orders worked correctly
  • Multiple products from the same artist created duplicate values in one tag (“artist1 artist1”)
  • Multiple products from different artists combined into one tag (“artist1 artist2”) instead of separate tags

Solution:
Adding a comma separator between tags in the workflow action resolved the issue. The comma properly delimits multiple tag values, allowing Shopify to create distinct tags rather than concatenating them into a single string.

Alternative approach suggested:
If the comma solution hadn’t worked, implementing a loop action in the Flow was recommended as a backup method.

Status: Resolved

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hi!

I created a workflow to automatically add customer tags based on a product metafield, here “artist”. Everything works well, except it creates only 1 tag and I want to the flow to create as many tags as different values from the metafield.

For example, the metafield I am using to create the tag is “artist” and the following happens:

  1. If only one product is ordered, it’s okay I get the tag I wanted

  2. If two products from the same artist are ordered, I get only one tag “artist1 artist1” when I want only one tag “artist1”

  3. If two products from different artists are ordered, I get only tag “artist1 artist2” when I want two different tags “artist1” and “artist2”

What can I do to make this works?

Here are screenshots to help

Thank you for your help!

First thing to try – add a comma between tags (https://help.shopify.com/en/manual/shopify-flow/reference/actions/add-product-tags) – you do not have it and you can simply type in the input field like so:

(ignore the vendor – use your metafield, vendor used just for illustration)

If not helping, try looping as Flow action:

The first one should be more effective though.

1 Like

Hi!

The comma solved the problem :slightly_smiling_face: Thank you so much for your help!

1 Like