Skip to main content

Create Advanced X Listening Queries (Guided or Custom Rules)

This guide shows how to build advanced X listening queries in BrandBastion so you capture real conversations and route replies from the right brand handle.

When to use X listening queries

Use X listening queries when you need a filtered stream of posts (tweets), replies, quote tweets, and reposts (retweets) based on keywords, accounts, and operators, then respond directly from BrandBastion.

Use cases:

  • Spot early buzz or backlash around launches and jump in before the thread runs away.

  • Monitor high-risk keywords, brand narratives, or competitor comparisons and respond fast with the right account.

  • Capture replies, quote posts, and amplification so reporting reflects the full conversation, not just the original post.

๐Ÿ“Œ Note
X listening (queries) is not available in every workspace. If you do not see X in the Asset dropdown, contact your BrandBastion admin or CSM.


Create a listening source

  1. Go to Add listening source.

  2. Select an Asset (X handle).
    This becomes the default identity used when replying to items from this listening source.

  3. Enter a Listening source name (required).
    Keep it specific and operational (example: Product launch - US).

  4. Choose your build mode:

    • Guided query (default): form-based builder that generates a rule.

    • Write your own: free-text rule builder for power users.

  5. Review the Preview (read-only). This is the final rule string sent to X.

  6. Click Add new source to save.

๐Ÿšจ Alert
Saving is blocked if the final rule string exceeds 2,048 characters (Guided or Write your own).


Option 1: Guided query

Guided query maps your form selections into a single X Filtered Stream rule string.

Words

Use these fields to control keyword and phrase matching:

  • All of these words
    Adds all terms with AND behavior (space-separated in X syntax).
    Example: brand strategy

  • This exact phrase
    Adds a quoted phrase.
    Example: "limited edition"

  • Any of these words
    Adds OR behavior across terms.
    Example: discount OR coupon OR promo

  • None of these words
    Adds exclusions with -.
    Example: -spam -fake -scam

  • These hashtags
    Adds hashtag tokens.
    Example: #NewLaunch OR #ProductReview

Language

  • Selecting a language adds lang:<code> (BCP 47), for example: lang:en.

Accounts

Use account filters to scope who is posting, who is being replied to, and who is being mentioned:

  • From these accounts โ†’ from:<handle> with OR grouping when multiple
    Example: from:BrandOfficial OR from:BrandSupport

  • To these accounts โ†’ to:<handle> with OR grouping when multiple
    Example: to:CustomerCare OR to:Helpdesk

  • Mentioning these accounts โ†’ @<handle> with OR grouping when multiple
    Example: (@Brand OR @BrandSupport)

Profile and user metrics

These map to operators when supported:

  • Bio keywords โ†’ bio:<keyword> or bio:"exact phrase"

  • Min/Max followers โ†’ followers_count:min..max

  • Min/Max posts โ†’ tweets_count:min..max

  • Verified authors only โ†’ is:verified

Post-type and content filters

These toggles map to X operators:

  • Include replies

    • ON โ†’ adds is:reply

    • OFF โ†’ excludes replies (implemented as an exclusion in the final rule)

  • Has links โ†’ has:links

  • Has media (photos, GIFs, videos) โ†’ has:media

  • Exclude promoted posts โ†’ -is:nullcast

  • Include Quote Tweets โ†’ is:quote

  • Include Retweets โ†’ is:retweet


Option 2: Write your own

Use Write your own when you want full control over the rule string, including grouping, proximity, and complex exclusions.

Character limit

  • Maximum 2,000 characters in the editor.

Supported boolean logic and operators

Use these building blocks to create precise, testable rules.

Boolean keywords

  • OR: cat OR dog

  • AND (space): cat dog

  • Grouping: (cat OR dog) has:links

  • Negation: -grumpy (excludes tokens/expressions)

Keywords and phrases

  • Keyword token match: coffee

  • Exact phrase: "wireless earbuds"

  • Proximity match (max N=6): "climate change"~3

  • Emoji: (โ˜€๏ธ OR ๐ŸŒˆ)

Entities and account tokens

  • Hashtag: #photography

  • Mention: @official_account

  • Cashtag: $AAPL

Common filters

  • From / to / retweets-of:

    • from:verified_user

    • to:customer_support

    • retweets_of:popular_creator

  • Post type:

    • is:reply

    • is:quote

    • is:retweet

    • is:verified

    • -is:nullcast

  • Content type:

    • has:links

    • has:media

    • has:hashtags

    • has:cashtags

Language

  • lang:en (BCP 47)


Replying from BrandBastion

Each X listening item includes a Reply action:

  • Opens the composer with the default asset set to the listening sourceโ€™s selected Asset.

  • Includes thread context when available.

  • Sends a reply to X using standard reply behavior.

Did this answer your question?