---
title: "Match comments with keyword lists"
description: "Create a reusable keyword list, attach it to a condition node, and know what happens when you edit or delete a list that live campaigns depend on."
canonical: https://docs.afp.monster/guides/keyword-lists
updated: 2026-08-19
pageType: guide
---

A keyword list is a named set of words you save once and point many campaigns at. Attach one to a condition node by setting the node's match type to **Keyword list**, and every message that reaches the condition is checked against the list: messages that match leave the **Match** output, everything else leaves **No Match**. Editing the list changes every condition node that points at it.

![The keyword list dialog with a named list and several keywords in it, and the controls to add and remove a keyword](../../../assets/screenshots/guides/keyword-lists/keyword-list-dialog.webp)

## What you need first

- A campaign open on the canvas with a trigger node connected to a condition node. See [Build a campaign on the canvas](/guides/build-a-campaign).
- A short set of words you expect people to comment or send. You can add and remove keywords later without touching the campaigns that use the list.

## What is in a keyword list?

Two things: a name you pick it by, and the keywords themselves. AFP cleans up the keywords when the list is saved.

| Part of a list | What it holds | What AFP does with it |
|---|---|---|
| Name | The label the list appears under in every keyword-list picker | Must be unique among the lists your account can see. A duplicate name is rejected when you save. |
| Keywords | The words and phrases matched against the text of a comment or DM | Leading and trailing spaces are trimmed, blank entries are dropped, and repeated entries are collapsed to one. A list with no keywords is rejected. |

Lists are sorted by name everywhere they appear, the manager loads them a page at a time, and its search box filters on the name — not on the keywords inside a list.

Whether a keyword has to appear as a whole word, and how the two strings are compared, are matching rules rather than list settings. [Keyword matching rules](/reference/keyword-matching) covers them alongside the other match types a condition node offers.

## How do I create a keyword list?

Lists are created in the keyword list manager, which opens as a dialog over the app and also exists as its own settings page. A list created in either place is available to every campaign your account can reach.

1. Open the keyword list manager. 
2. Click **New keyword list**.
3. Type a name for the list.
4. Enter the keywords, one entry per word or phrase.
5. Save the list.

The saved list appears immediately in every keyword-list picker, including the one on the condition node you are about to configure.

Two saves are refused, each with an explanation rather than a silent failure: a name that another visible list already uses, and a list with no keywords in it.

## How do I attach a list to a condition node?

1. Click the condition node on the canvas to open its settings.
2. Set the match type to **Keyword list**.
3. Choose the list from the dropdown. It is populated with every list your account can see, sorted by name.
4. To invert the test, turn on reverse matching. The **Match** output then takes the messages that contain *none* of the keywords.
5. Click **Save** to write the campaign's graph.

:::note
Choosing a list in the node settings changes the campaign in your browser only. The reference reaches AFP when you save the campaign, and each save writes a new version of the graph. New executions run the newest saved version.
:::

### Can I attach a keyword list to a trigger node?

No — keyword matching belongs to the condition node. A trigger node decides which events start the campaign: which post to watch, and whether one person may start the campaign more than once. It has no keyword setting. A trigger connects only to a condition, so the condition is where the text of a message is examined.

```d2 title="Where a keyword list sits: the condition node's match type, deciding which branch runs"
direction: down
arrives: Comment or DM arrives
trigger: "Trigger node\nwhich events start the campaign"
cond: "Condition node\nmatch type: Keyword list" {shape: diamond}
actions: Actions you configured
other: Other branch, or nothing
arrives -> trigger -> cond
cond -> actions: Match
cond -> other: No Match
```

## Can one list serve several campaigns?

Yes, and that is the reason to use a list instead of typing words into each condition node. Every keyword-list picker in the product reads the same set of lists, so a single list can back any number of condition nodes across any number of campaigns and pages.

Reuse cuts both ways: one edit changes every condition node that points at the list. When two campaigns need to diverge, create a second list rather than editing the shared one.

Lists belong to an account. If your account sits under a master account, the picker shows the lists that master account owns alongside your own personal lists, and the unique-name check covers both sets. See [Manage profiles under one account](/guides/profiles-and-master-accounts).

## What happens when I edit a list a live campaign uses?

Editing a list — renaming it, adding keywords, removing keywords — applies to every campaign that references it, with no need to re-save those campaigns. The same unique-name check runs as when you created the list, and editing never moves a list between owners.

New executions use the edited keywords straight away: the next comment or DM that reaches a condition node pointing at the list is judged against the new words.

An execution that is already parked at a condition waiting for a reply keeps the keyword set it started with for the rest of its life. A reply that arrives after your edit is matched against the old words, and that ends when the execution ends. [Test and debug a campaign](/guides/test-and-debug-campaigns) shows how to see which executions are parked.

## What happens if I delete a list a campaign still references?

Deletion is refused while a campaign references the list directly: AFP answers with `Can't remove this keyword list, because it's used for campaigns` and the list stays. Deleting a list does nothing to your account or profiles — only the list is removed.

:::caution
A condition node's reference to a list lives inside the campaign's saved graph, and deleting a list that only a condition node references is **not** refused. That condition then finds no list and sends every message down its **Match** output, so a campaign that used to filter starts replying to everything. Before deleting a list, point every condition node that uses it at another list or another match type, and save each of those campaigns.
:::

## Why is my keyword list not matching?

| Symptom | Cause | Fix |
|---|---|---|
| Every message takes the **Match** branch | The condition node points at a list that has been deleted, or at one with no keywords in it — both fall through to a match | Attach a list that exists and has keywords, or change the match type, then save the campaign |
| The **No Match** branch runs for a message that clearly contains a keyword | Reverse matching is on, which inverts the test | Turn reverse matching off and save |
| Saving the list is refused for the name | Another list your account can see already uses that name | Rename the list |
| Saving the list is refused for the keywords | The list was submitted with no keyword entries | Add at least one keyword, then save |
| A keyword you typed is missing from the saved list | Blank entries are dropped and repeats are collapsed when the list is saved | Re-open the list and check the keywords it kept |
| Edits do not affect a conversation already under way | The execution is parked at a condition and keeps the keyword set it started with | Wait for that execution to end; the next one uses the new keywords |
| Searching the list manager for a keyword finds nothing | Search filters list names only | Search by the name of the list |
| The condition never runs at all | The campaign is saved but not active, or the trigger did not fire | Switch the campaign to active, then read its execution history |

## Related

- [Keyword matching rules](/reference/keyword-matching) — the match types and how message text is compared.
- [Test and debug a campaign](/guides/test-and-debug-campaigns) — confirm which branch a condition took.
- [Node types](/reference/node-types) — every node you can add from the palette.
- [Get started](/start) — the path from signup to a live campaign.
