Exact Match vs Contains: Why Your Automation Fires on the Wrong Comments

Your keyword is ART and the automation fired on a comment that said can't wait to start. That is not a bug, and there are two ways to stop it.

By Anthony Casauria · · 7 min read

Share
Smiling woman in a pink sweater reads a printed comment sheet through a magnifying glass at a sunny desk.

Key takeaways

  • A contains keyword matches anywhere in the comment, including inside longer words, which is why a short keyword like ART fires on “can't wait to start”.
  • Exact match requires the whole comment to be the keyword alone, ignoring case and punctuation or an emoji at either end, so any extra word stops it matching.
  • HyperDM lets you add up to five exclusion words, so ART with start, artwork and heart excluded catches the people who meant it and ignores most of the rest.
  • Start with contains and a distinctive keyword such as GUIDE, add exclusion words for the few that slip through, and save exact match for short or common keywords you cannot change.
In this article
  1. How the two modes actually differ
  2. Five steps to stop the wrong comments firing
  3. When neither mode is the answer
  4. Good and bad keyword choices
  5. Choosing between keyword trigger exact match and contains

Set a keyword trigger exact match and the misfires stop that minute. Almost everyone hits the opposite setting first: a "contains" match looks for your keyword anywhere in the comment, including inside longer words, so ART fires on "can't wait to start" and LINK fires on "blinking".

That is not a bug, and it is not specific to one tool. Substring matching does what it was asked to do. Contains is the default in most builders because it catches the comments the stricter mode throws away: "GUIDE please" and "send me the guide!!" both match on contains, and neither matches on exact.

So this is a decision, not a repair. Below: how each mode behaves, which one your campaign wants, and five steps to stop the wrong comments triggering.

A "contains" keyword matches anywhere in the comment, including inside other words, which is why short keywords misfire. "Is exactly the keyword" requires the whole comment to be that word and nothing else. Use contains with a distinctive keyword, narrowed by exclusion words, or exact match when the keyword is short or common.

How the two modes actually differ

CommentKeyword ART, containsKeyword ART, exactly
ARTFiresFires
artFiresFires
ART pleaseFiresNo
Can't wait to startFiresNo
I love your artworkFiresNo
Send me the art guideFiresNo
ART!!FiresFires
ART pleaseFiresNo

Both modes ignore case, which is why the second row behaves the same in each column. Everything below it splits. One column catches more people, the other catches fewer mistakes, and you cannot have both at once.

Exact match is stricter than people expect. "Is exactly the keyword" means the comment must be the keyword alone. Punctuation or an emoji at either end is ignored, but any extra word stops it matching. That makes it right for a short common word and wrong for most real campaigns, where people type enthusiasm around the keyword.

To see which comments a keyword would catch under each mode before you post, try the free comment keyword generator, which runs HyperDM’s own matcher.

Five steps to stop the wrong comments firing

Step 1: Read your last twenty misfires

Look at what actually triggered before you change a setting. The activity log is the fastest route: it lists each run with the automation and the contact, so you can see whether the misfires share a shape. One word sitting inside three common English words is a keyword problem. Three unrelated comments is a scope problem, and no match mode will fix it.

Step 2: Change the keyword before changing the mode

A two-character keyword will always misfire on contains, and exact match will always miss the people who type politely around it. The cheapest fix is a keyword that cannot appear inside another word. GUIDE is safer than ART, and PRICING is safer than IN.

Keep it typeable on a phone keyboard and obvious in the caption. A word nobody mistypes beats a word nobody else uses.

Step 3: Add exclusion words

Most builders let you narrow a keyword match instead of tightening it. In HyperDM, + Exclude words adds "but doesn't contain" terms, up to five, case ignored: a comment containing one of them is skipped even when your keyword matched. So ART with start, artwork, heart excluded catches the people who meant it and ignores most of the rest.

The builder enforces two things here. Exclusions only ever narrow a keyword match, so they do nothing on their own, and a word cannot be both a keyword and an exclusion, because it would cancel itself out.

Step 4: Switch to exact only if the keyword must stay short

If the keyword is fixed, because the campaign is already printed on a reel or spoken in a video, change the mode instead. In HyperDM the choice is contains the keyword or is exactly the keyword, on both comment and DM triggers. The trigger itself is locked once an automation is saved, so a mode change is an edit rather than a rebuild.

Expect fewer matches. People who type "ART please" stop qualifying, so tell them in the caption exactly what to comment: comment just the word ART.

Step 5: Check priority if two automations share a keyword

Overlapping keywords across automations produce misfires that look like matching errors. The first match wins in priority order, top to bottom in the list. HyperDM's Move up and Move down sit in each row's menu in the default Priority sort with no filters applied, and the order only changes an outcome when two automations could match the same message.

Two rules sit above anything you build, which is worth knowing before you spend an afternoon reordering rows. Opt-out always wins: a customer who types STOP revokes consent for automated replies, and no setting outranks that. Opt-in, with START, re-grants it. Underneath all of your automations sits the AI agent, if you have switched it on, catching the messages nothing else did. So the real order is opt-out, then opt-in, then your keyword automations in the order you set, then flows, then intent matching on the DM trigger, then the agent. A misfire that survives every keyword change is often one of those layers answering instead of the automation you were watching.

When neither mode is the answer

Some questions arrive worded a dozen ways with no keyword in them at all: "how much is the course", "whats the price", "cost?". No match mode solves that, because there is nothing literal to match. Keyword matching happens inside your tool, not in Meta's API, which only delivers the comment and message events described in the Instagram Platform documentation.

Two options exist. Intent recognition compares a DM against a description you write and sends your DM when the wording is close. Its limits are worth stating plainly: in HyperDM's own testing of the older matcher, how much does the course cost? matched how much is the course?, while whats the price of the course and how much is it? did not. Short questions and shorthand usually miss, and it runs only on the DM trigger.

The other option is an AI agent as the fallback for anything your automations do not catch, answering from your own knowledge rather than from a template. Our comparison of AI agents and keyword bots covers where each belongs. For a question that has to get a reply every time, keywords stay the reliable choice, because a keyword anywhere in the message still matches.

Good and bad keyword choices

KeywordMode to useWhy
GUIDEContainsRare inside other words, easy to type
ARTExact, or contains with exclusionsAppears in start, artwork, heart, party
LINKContains with exclusionsAppears in blinking, unlinked
PRICEContainsDistinctive, matches "price?" and "price please"
INExact onlyAppears in hundreds of words
SEND ME THE PLANContainsLong phrases are safe but people mistype them

The last row is the trap on the other side. A long keyword is immune to substring misfires and exposed to everything else: typos, word order, autocorrect. One distinctive word is still the sweet spot, which our comment-to-DM setup guide goes into further.

Choosing between keyword trigger exact match and contains

The choice between keyword trigger exact match and contains is a trade between missing people and messaging the wrong ones, and for most campaigns missing people costs more. Start with contains and a keyword distinctive enough that substring matches are rare, then add exclusion words for the few that slip through. Save exact match for short or common keywords you cannot change.

Whichever you pick, test it from a second account with three real comments: the keyword alone, the keyword in a sentence, and the keyword inside a longer word. Thirty seconds of testing saves a week of odd reports. HyperDM's keyword triggers docs walk the same test, including what the builder does when a keyword and an exclusion collide.

Frequently asked questions

Because the match mode is set to "contains", which looks for your keyword anywhere in the comment including inside longer words. A keyword like ART matches "start" and "artwork". Either switch to exact match, add exclusion words that skip those comments, or choose a keyword that cannot appear inside another word.
Yes. Matching ignores case in both modes, so ART, Art and art are all the same. What exact match does not ignore is everything else: an extra word alongside the keyword stops it matching (punctuation or an emoji at either end is ignored), because the whole comment has to equal the keyword.
Usually, up to a limit. HyperDM allows five keywords per automation, comma-separated, with one match mode and one exclusion list covering all of them. If two offers need different DMs, build two automations instead and set their priority order, because the first match wins.
The higher one in priority order wins and the other never runs. Reordering is done from each row's menu in the default priority view. This only changes an outcome when there is a genuine keyword overlap, so most workspaces never need to touch it.
Usually not. Giveaway comments arrive with tags, emoji and enthusiasm around the keyword, and exact match rejects all of them. Contains with a distinctive keyword catches far more genuine entries, and exclusion words handle the handful of false positives better than a stricter mode handles the misses.
HyperDM

Run the automations. Add AI when you’re ready.

Comment-to-DM, keyword replies and follow gates — set them up, test them, then add optional AI answers from your real catalog. Free on one DM channel, 50 conversations a month, no card.