AutomationFlowsGeneral › Find Klicktipp Tags to Remove by Prefix

Find Klicktipp Tags to Remove by Prefix

ByKlickTipp @KlickTipp on n8n.io

This workflow uses KlickTipp community nodes, available for self-hosted n8n instances only.

Event trigger★★★★☆ complexity14 nodesExecute Workflow TriggerN8N Nodes Klicktipp
General Trigger: Event Nodes: 14 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #13664 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "XzkdrOkJPOhiXIZZRGdSf",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "KlickTipp tag manager: find tags to remove by prefix",
  "tags": [
    {
      "id": "15wrq9sti6wyqr6J",
      "name": "TEMPLATE",
      "createdAt": "2025-01-08T16:34:30.163Z",
      "updatedAt": "2025-01-08T16:34:30.163Z"
    }
  ],
  "nodes": [
    {
      "id": "b2eabd36-8caa-4d1d-90b9-19ba3851df80",
      "name": "Sticky Note: Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        256
      ],
      "parameters": {
        "width": 1120,
        "height": 1484,
        "content": "## Overview\n\nThis sub-workflow determines **which KlickTipp tags should be removed** from a contact by comparing:\n\n- a **tag prefix scope** (for example `Zoho |`)\n- a list of **tags that should be kept** (coming from a 3rd-party system and treated as the source of truth)\n- the **existing KlickTipp tags** that fall under the same prefix scope\n\n\nThe workflow calculates the difference between the currently assigned prefixed tags and the desired prefixed tags, and returns a single array `tagNamesToRemove[]`.\nThis result can be passed to a follow-up workflow that performs the actual tag unassignment in KlickTipp.\n\n\n---\n\n## Inputs\n\n- **prefix** *(string)*  \n  The tag prefix that defines the managed scope.  \n  Example values: `Zoho |`\n\n- **setTags[]** *(array of strings)*  \n  Base tag names that should remain assigned, coming from a 3rd-party tool.  \n  Example values: `Webinar`, `Newsletter`\n\n---\n\n## Logic\n\n1. Fetch all available tags from KlickTipp.\n2. Keep only tags whose `value` starts with the provided `prefix` (managed scope).\n3. Split the incoming `setTags[]` into individual items (the keep list).\n4. Compare the scoped KlickTipp tags against the keep list by tag name (`value`).\n5. Keep only those scoped KlickTipp tags that **do not have a match** in `setTags[]`.\n6. Aggregate the remaining tag names into a single output array `tagNamesToRemove[]`.\n---\n\n## Example\n\nInput parameters:\n- prefix: `Zoho |`\n- setTags: `Webinar`, `Newsletter`\n\n\nAssuming the contact currently has the following prefixed tags:\n- `Zoho | Webinar`\n- `Zoho | Newsletter`\n- `Zoho | Lead`\n- `Zoho | Form`\n\n\nThe workflow will return:\n- `Zoho | Lead`\n- `Zoho | Form`\n\n---\n\n## Output\n\nThe workflow returns a single item containing the array `tagNamesToRemove[]`, which can be passed directly into a downstream workflow responsible for tag unassignment.\n\n\n---\n\n\n## Notes\n- This sub-workflow calculates the removal list by comparing tag names only.\n- It returns a decision array and does not perform the unassignment itself.\n- Tag unassignment must be handled by a separate workflow that consumes `tagNamesToRemove[]`.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "303a1833-5382-4cb2-a7ad-edcbb9cc1601",
      "name": "Sticky Note: Input",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2400,
        256
      ],
      "parameters": {
        "color": 7,
        "height": 420,
        "content": "## Input"
      },
      "typeVersion": 1
    },
    {
      "id": "f2e1c517-f827-45ca-b6ea-2d66b79c0175",
      "name": "Input: Prefix + Tags to keep",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        2464,
        416
      ],
      "parameters": {
        "inputSource": "jsonExample",
        "jsonExample": "{\n  \"prefix\": \"Zoho |\",\n  \"setTags\": [\"Webinar\", \"Newsletter\", \"Lead\"]\n}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "d0c28656-36d2-43ce-a290-5412a5ff1ffb",
      "name": "Sticky Note: Input1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2656,
        256
      ],
      "parameters": {
        "color": 7,
        "width": 384,
        "height": 420,
        "content": "## Determine tags to remove"
      },
      "typeVersion": 1
    },
    {
      "id": "fbe7d730-22c9-4d00-a578-062caf0cc07f",
      "name": "Sticky Note: Input2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3056,
        256
      ],
      "parameters": {
        "color": 7,
        "height": 420,
        "content": "## Resolve tag differences"
      },
      "typeVersion": 1
    },
    {
      "id": "c72e8ae0-0d34-4281-b1a3-270e3f6b3331",
      "name": "Sticky Note: Input3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3312,
        256
      ],
      "parameters": {
        "color": 7,
        "height": 420,
        "content": "## Select tags to remove"
      },
      "typeVersion": 1
    },
    {
      "id": "fac5d805-c496-4214-b4ec-5fcb84b0f511",
      "name": "Sticky Note: Input4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3568,
        256
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 420,
        "content": "## Output: tags to remove\n\nReturns `tagNamesToRemove[]`"
      },
      "typeVersion": 1
    },
    {
      "id": "cf894d81-5fb7-405b-ae18-ca6ccb75b672",
      "name": "List all tags",
      "type": "n8n-nodes-klicktipp.klicktipp",
      "position": [
        2880,
        352
      ],
      "parameters": {},
      "credentials": {
        "klickTippApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "cf7026dc-1a8e-4b82-88eb-1f97e47b4ec2",
      "name": "Match keep vs all tags",
      "type": "n8n-nodes-base.merge",
      "position": [
        3136,
        416
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "advanced": true,
        "joinMode": "keepNonMatches",
        "mergeByFields": {
          "values": [
            {
              "field1": "value",
              "field2": "prefixedSetTags"
            }
          ]
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "9f11978f-135b-4d4a-87a7-500cf72b9e35",
      "name": "Collect tags to remove",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3632,
        416
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "renameField": true,
              "outputFieldName": "setTags",
              "fieldToAggregate": "value"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e0799526-5b17-478d-b4e6-441287e91bda",
      "name": "Keep only tags with prefix",
      "type": "n8n-nodes-base.filter",
      "position": [
        3376,
        416
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2a1e2b9b-4c45-4d9c-b1d7-0dff8a2b5c33",
              "operator": {
                "type": "string",
                "operation": "startsWith"
              },
              "leftValue": "={{ $json.value }}",
              "rightValue": "={{ $('Input: Prefix + Tags to keep').item.json.prefix }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "31f797bb-e85e-4ae0-ac26-5e135d669f63",
      "name": "Build prefixed tag names",
      "type": "n8n-nodes-base.set",
      "position": [
        2704,
        512
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "08f924fa-194d-4cb6-9861-032097eefec7",
              "name": "prefixedSetTags",
              "type": "array",
              "value": "={{ ($json.setTags || []).map(t => {\n  const p = ($json.prefix ?? '').trim();\n  return p ? `${p} ${t}` : t;\n}) }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d1c24b9e-b693-4a4b-8bbe-8432f53b5ab0",
      "name": "Split prefixed tags",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2880,
        512
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "prefixedSetTags"
      },
      "typeVersion": 1
    },
    {
      "id": "649ffcb3-d2ff-4b78-9a16-8d72390e6ef1",
      "name": "Set tagNamesToRemove",
      "type": "n8n-nodes-base.set",
      "position": [
        3840,
        416
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "10303711-022b-4619-961d-50dd0bcafaac",
              "name": "tagNamesToRemove",
              "type": "array",
              "value": "={{ $json.setTags }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "active": true,
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "timeSavedMode": "fixed",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "75a1b565-6a6b-4296-bbe1-15b8132017a9",
  "connections": {
    "List all tags": {
      "main": [
        [
          {
            "node": "Match keep vs all tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split prefixed tags": {
      "main": [
        [
          {
            "node": "Match keep vs all tags",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Collect tags to remove": {
      "main": [
        [
          {
            "node": "Set tagNamesToRemove",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Match keep vs all tags": {
      "main": [
        [
          {
            "node": "Keep only tags with prefix",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build prefixed tag names": {
      "main": [
        [
          {
            "node": "Split prefixed tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep only tags with prefix": {
      "main": [
        [
          {
            "node": "Collect tags to remove",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input: Prefix + Tags to keep": {
      "main": [
        [
          {
            "node": "List all tags",
            "type": "main",
            "index": 0
          },
          {
            "node": "Build prefixed tag names",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow uses KlickTipp community nodes, available for self-hosted n8n instances only.

Source: https://n8n.io/workflows/13664/ — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Community Node Disclaimer: This workflow uses KlickTipp community nodes.

N8N Nodes Klicktipp, Google Calendar Trigger, Google Calendar
General

Back up n8n workflows to Google Drive automatically This workflow provides a robust solution for backing up your n8n workflows to Google Drive. It is designed to handle backups for multiple n8n instan

Execute Workflow Trigger, n8n, Google Drive
General

Community Node Disclaimer: This workflow uses KlickTipp community nodes.

N8N Nodes Klicktipp, Calendly Trigger
General

This workflow is a robust and forgiving JSON parser designed to handle malformed or "dirty" JSON strings often returned by AI models or scraped from web pages. It takes a text string as input and atte

Execute Workflow Trigger
General

This automation monitors X (formerly Twitter) search pages in real time and extracts high-signal posts that match your categories of interest. It’s ideal for community engagement, lead discovery, thou

Execute Workflow Trigger, Airtop