Conditions
Add logic to your workflows with conditional branches
Conditions let you add decision points to your workflows. Based on the trigger data, conditions evaluate to Yes (match) or No (no match), allowing you to take different actions.
Condition Types
Text Contains
Check if the text includes specific keywords.
Configuration:
- Field — What to check (comment text, author name, etc.)
- Keywords — Words or phrases to look for
- Case sensitive — Whether to match case (default: no)
Example:
Field: comment.text
Keywords: price, cost, how much
Case sensitive: NoMatches: "What's the PRICE?", "How much does it cost?", "pricing info?"
Text Matches Regex
Check text against a regular expression pattern.
Configuration:
- Field — What to check
- Pattern — Regular expression
- Flags — Regex flags (i = case insensitive)
Example patterns:
| Pattern | Matches |
|---|---|
\bspam\b | "spam" as a whole word |
(buy|sell)\s+now | "buy now", "sell now" |
@\w+ | Any @mention |
https?:// | URLs |
\d{3}-\d{4} | Phone numbers like 555-1234 |
Tip: Use regex101.com to test your patterns.
Author Filter
Filter based on the comment/message author.
Configuration:
- Author IDs — List of user IDs to match
- Author names — List of usernames to match
- Mode — Include (allow only) or Exclude (block)
Use cases:
- VIP list — Only respond to certain users
- Block list — Ignore known spam accounts
- Team filter — Different rules for team members
Text Length
Check the length of the text.
Configuration:
- Field — What to check
- Operator — Greater than, less than, equals
- Value — Number of characters
Example:
Field: comment.text
Operator: Less than
Value: 5Matches comments like "nice", "ok", "lol" (potential low-quality comments).
Expression (Advanced)
Combine multiple conditions with AND/OR logic.
Configuration:
- Combinator — AND (all must match) or OR (any must match)
- Rules — List of individual conditions
Example AND:
Combinator: AND
Rules:
- comment.text contains "price"
- comment.authorName not in ["bot_account", "spam_user"]Matches: Comments asking about price, excluding known bot accounts.
Example OR:
Combinator: OR
Rules:
- comment.text contains "spam"
- comment.text matches regex "DM me|check.*bio"Matches: Comments containing "spam" OR matching the spam regex pattern.
Condition Outputs
All conditions have two outputs:
- Yes (true) — The condition matched
- No (false) — The condition didn't match
You can connect actions to either output:
[Comment Received]
↓
[Text Contains: "spam"]
↓ Yes ↓ No
[Hide Comment] [No action]Or chain multiple conditions:
[Comment Received]
↓
[Text Contains: "spam"]
↓ Yes ↓ No
[Hide Comment] [Text Contains: "question"]
↓ Yes ↓ No
[Auto Reply] [No action]Available Fields
These fields are available for conditions, depending on the trigger type:
Comment Trigger Fields
| Field | Description | Example |
|---|---|---|
comment.text | The comment content | "Love this post!" |
comment.authorId | Author's platform user ID | "12345678" |
comment.authorName | Author's display name | "john_doe" |
comment.postId | ID of the post | "17891234567890" |
comment.parentId | Parent comment ID (if reply) | null or ID |
Mention Trigger Fields
| Field | Description | Example |
|---|---|---|
mention.authorId | Who mentioned you | "12345678" |
mention.authorName | Their display name | "jane_smith" |
mention.sourceType | Where mentioned | "post", "story", "comment" |
DM Trigger Fields
| Field | Description | Example |
|---|---|---|
message.text | Message content | "Hi there!" |
message.senderId | Sender's user ID | "12345678" |
message.senderName | Sender's name (if available) | "john_doe" |
message.conversationId | Conversation thread ID | "conv_abc123" |
Common Fields (All Triggers)
| Field | Description | Example |
|---|---|---|
platform | Social platform | "instagram", "x", etc. |
channelId | Your Fanbeam channel ID | "ch_abc123" |
timestamp | When the event occurred | "2025-01-15T10:30:00Z" |
Building Complex Conditions
Nested Expressions
You can nest expression conditions for complex logic:
(A AND B) OR (C AND D)Create this by:
- Add Expression condition with OR combinator
- Inside, add two Expression conditions with AND combinators
- Add your specific conditions inside each
Negation
To match when something is NOT true:
Option 1: Use the "No" output
[Contains "spam"]
↓ No
[Your action for non-spam]Option 2: Use "does not contain" operator (in Expression)
Expression:
- comment.text does not contain "spam"Combining Keywords Smartly
Instead of many separate conditions:
[Contains "price"] → [Reply]
[Contains "cost"] → [Reply]
[Contains "how much"] → [Reply]Use a single condition with multiple keywords:
[Contains "price, cost, how much"] → [Reply]Best Practices
Start Broad, Then Narrow
Begin with simple conditions. Add complexity only when needed to avoid false positives/negatives.
Test Your Regex
Regular expressions can be tricky. Always test with real examples before deploying.
Handle Empty Values
Some fields might be empty or missing. Consider this in your conditions:
- Mention text is often empty (just an @)
- Sender name isn't always available for DMs
Avoid Overlapping Conditions
If you have multiple workflows, ensure they don't conflict:
Workflow 1: "spam" → Hide
Workflow 2: "spam filter" → Reply
Issue: "spam filter question" triggers both!Document Complex Logic
For complex expression conditions, add a note explaining the logic in plain English.
Troubleshooting
Condition Never Matches
- Check for typos in keywords
- Verify the field name is correct
- Test with the exact text you expect to match
- Check if case sensitivity is an issue
Condition Always Matches
- Check if keywords are too broad
- Verify AND vs OR logic is correct
- Review regex patterns for unintended matches
Inconsistent Matching
- Check for whitespace in keywords
- Verify character encoding (special characters)
- Review platform-specific text formatting