Apply approved folder rules (beta)
apply_rulesApply an approved rules preview to move matched messages into their rule folders using its token; call only after the user explicitly approves the preview.
Instructions
Beta: Move the batch an approved preview_rules token covers to its rules' folders; only call after the user explicitly approved the preview.
The rules engine is not fully reliable yet; preview first and check the results.
Use it only with a token from preview_rules that the user approved, or the continuation_token of an earlier partial run of that approval; preview_action tokens go to move, set_read_state or label instead. Unless the operator turned it off, the user then confirms the exact change in the client's form; a continuation of an approval already confirmed needs no new form. Read-state changes use the preview's setting. A continuation refuses if a row or the rules changed, and keeps its token: preview again. limit caps the messages this call processes.
Returns log_ids (a list even for zero or one chunk), counts, run/continuation state and message IDs; verbose=true adds full rows. Pass each log_id to undo_action to move that chunk back. Any untouched remainder gets resume=true and a continuation_token, redeemed here. An expired, used or unknown token refuses: preview again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Messages to process in this call, 1 to 200. A value above the approved total refuses and keeps the token. | |
| token | Yes | Single-use token from the preview the user approved, or the continuation_token of an earlier partial run of that approval. | |
| verbose | No | true adds messages and replaces blocked_ids, missing_ids and mismatched_ids with full blocked, missing and mismatched rows. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||