Testing Workflows
Test your automations before they go live
Before activating a workflow, you should test it to ensure it behaves as expected. Fanbeam provides testing tools to simulate triggers and verify your conditions and actions work correctly.
Why Test?
Testing helps you:
- Catch errors before they affect real users
- Verify conditions match what you expect
- Preview actions without actually executing them
- Debug complex logic in expressions
- Build confidence before going live
Test Mode
When testing, workflows run in "dry run" mode:
- Triggers are simulated (not real events)
- Conditions are evaluated normally
- Actions are previewed (not executed)
- Results are logged for review
Running a Test
From the Workflow Builder
- Open your workflow in the Workflow Builder
- Click Test in the toolbar
- Select a trigger type to simulate
- Fill in sample data
- Click Run Test
- Review the results
Test Data Form
When testing, you'll provide sample data that simulates a real event:
Comment Trigger:
{
"comment": {
"text": "What's the price of this item?",
"authorId": "12345678",
"authorName": "test_user",
"postId": "post_abc123"
},
"platform": "instagram",
"channelId": "ch_xyz789"
}Mention Trigger:
{
"mention": {
"authorId": "12345678",
"authorName": "test_user",
"sourceType": "post"
},
"platform": "instagram",
"channelId": "ch_xyz789"
}DM Trigger:
{
"message": {
"text": "Hi, I have a question about your product",
"senderId": "12345678",
"conversationId": "conv_abc123"
},
"platform": "instagram",
"channelId": "ch_xyz789"
}Test Results
After running a test, you'll see:
Execution Path
A visual trace showing:
- Which nodes were executed
- Path taken at each condition
- Order of execution
✓ [Comment Received] - Triggered
✓ [Text Contains: "price"] - YES
✓ [Reply: "Check our pricing..."] - Would executeCondition Results
For each condition, you'll see:
- Input values
- Evaluation result (Yes/No)
- Why it matched or didn't
Condition: Text Contains
Field: comment.text
Keywords: price, cost, how much
Input: "What's the price of this item?"
Result: YES ✓
Matched: "price"Action Preview
For each action, you'll see:
- What would be executed
- Resolved variables
- Final output
Action: Reply
Template: "Thanks {{author.name}}! Our prices start at $99."
Resolved: "Thanks test_user! Our prices start at $99."
Target: Comment on post_abc123
Status: Would execute (test mode)Testing Scenarios
Test Different Paths
Create tests for each path through your workflow:
Scenario 1: Spam detected
Input: "Check my bio for free followers!"
Expected: Comment hidden, no replyScenario 2: Pricing question
Input: "How much does this cost?"
Expected: Reply with pricing infoScenario 3: General comment
Input: "Great post! 🔥"
Expected: No action takenEdge Cases
Test edge cases that might break your conditions:
- Empty text — Does your workflow handle empty comments?
- Special characters — Do emojis or symbols break regex?
- Very long text — Does truncation work correctly?
- Missing data — What if author name is null?
Debugging Tips
Condition Not Matching
If a condition isn't matching when you expect it to:
- Check exact text — Copy the test input exactly
- Review keywords — Are there typos?
- Test case sensitivity — Is it case-sensitive when it shouldn't be?
- Verify regex — Use regex101.com to test patterns
Wrong Path Taken
If the workflow takes an unexpected path:
- Trace each condition — Review what each evaluated to
- Check AND/OR logic — Is the combinator correct?
- Review order — Conditions are evaluated in connection order
Action Errors
If an action shows an error in preview:
- Check platform support — Is this action available on the target platform?
- Verify permissions — Does your channel have required access?
- Review variables — Are all variables valid for this trigger type?
Testing Best Practices
Test Early, Test Often
Don't wait until the workflow is complete. Test after adding each node.
Use Realistic Data
Test with real examples from your actual comments/messages:
- Go to your Inbox
- Find examples of comments you want to handle
- Use those exact texts in your tests
Save Test Cases
Keep a document of your test cases:
| Scenario | Input | Expected Outcome |
|---|---|---|
| Spam link | "Check my bio!" | Hide comment |
| Pricing Q | "How much?" | Reply with pricing |
| Support Q | "Need help!" | Reply with support link |
Test After Changes
Any time you modify a workflow:
- Run all saved test cases
- Verify expected behavior
- Check for regressions
Live Testing (Careful!)
If you need to test with real data:
- Create a test channel — Use a separate account
- Limit scope — Filter to only the test channel
- Use hide not delete — Reversible actions only
- Monitor closely — Watch the first few executions
Gradual Rollout
For high-traffic accounts:
- Start with 1 channel
- Monitor for 24 hours
- Expand to more channels
- Full rollout after validation
Common Testing Mistakes
Testing Only Happy Path
Don't just test when things work. Test:
- What happens when conditions don't match
- What happens with unexpected input
- What happens when actions would fail
Ignoring Variable Resolution
Always check that variables resolve correctly:
{{author.name}}might be empty{{comment.text}}might contain special characters{{post.url}}format varies by platform
Not Testing Platform Differences
The same workflow might behave differently across platforms:
- Field availability varies
- Action support differs
- Text formatting changes
Moving to Production
When tests pass:
- Review all paths — Every branch tested
- Check edge cases — Unusual inputs handled
- Verify actions — Correct behavior confirmed
- Enable workflow — Toggle to active
- Monitor history — Watch first real executions
See Execution History for monitoring your live workflows.