FireFly III icon

FireFly III

Read, update, write and delete data using the powerful FireFly III API

Overview

The "Test Rule Group" operation in the Rules & Groups API node allows users to test a specific rule group against transaction data within a specified date range and optional account filters. This operation simulates how the rule group would behave by searching for transactions that match the rules, up to configurable limits on the number of transactions searched and triggered.

This node is beneficial when you want to validate or debug your financial automation rules before applying them live. For example, if you have a set of rules grouped to categorize or flag transactions automatically, you can run this test to see which transactions would be affected, ensuring accuracy and avoiding unintended triggers.

Practical examples:

  • Testing a rule group that categorizes expenses into budgets over the last month.
  • Validating that a new rule group correctly identifies fraudulent transactions without triggering too many false positives.
  • Debugging complex rule groups by limiting the number of transactions tested and triggered.

Properties

Name Meaning
X-Trace-ID A unique UUID identifier for the request, used for debugging and tracing. Example: 123e4567-e89b-12d3-a456-426614174000.
Rule/Group ID The ID of the rule group to test. This is required to specify which rule group the test will run against.
Date Range Filters Collection containing:
- Start Date: Start date for testing transactions (format YYYY-MM-DD). Defaults to 30 days ago.
- End Date: End date for testing transactions (format YYYY-MM-DD). Both are required.
Account IDs Comma-separated list of account IDs to filter transactions by specific accounts during the test. Optional.
Test Limits Collection containing:
- Search Limit: Maximum number of transactions to search for during the test. Default is 200.
- Triggered Limit: Maximum number of transactions the rule group can trigger on before stopping. Default is 15.

Output

The output JSON contains the results of the test run on the specified rule group. It includes details about the transactions found and which ones were triggered by the rules in the group, respecting the provided limits.

The exact structure depends on the Firefly III API response but typically includes:

  • Metadata about the test execution.
  • Lists or counts of transactions matched and triggered.
  • Possibly detailed information about each triggered transaction.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Firefly III API with appropriate authentication credentials (e.g., OAuth2 token).
  • The node expects the Firefly III instance to support the /rule-groups/{id}/test endpoint.
  • Proper configuration of API credentials and network access to the Firefly III server is necessary.

Troubleshooting

  • Invalid Rule/Group ID: If the provided rule group ID does not exist or is incorrect, the API will return an error. Verify the ID is correct.
  • Date Format Errors: Ensure dates are in YYYY-MM-DD format. Invalid formats may cause request failures.
  • Limits Too High: Setting very high search or triggered limits can cause long processing times or timeouts. Use reasonable values (e.g., search limit ~200, triggered limit ~15).
  • Empty Results: If no transactions are returned, check that the date range and account filters actually include transactions.
  • API Authentication Errors: Ensure the API key or OAuth token is valid and has permissions to access rule groups and perform tests.

Links and References

Discussion