create_approval_rule
Automatically generate approval requests when records match specific conditions in ServiceNow. Define rules based on table, approver type, and encoded queries to streamline approval workflows.
Instructions
Create an approval rule that automatically generates approval requests when a record matches given conditions (requires WRITE_ENABLED=true). Uses the sysapproval_rule table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Rule name | |
| table | Yes | Table this rule applies to (e.g. "sc_request", "change_request") | |
| approver_type | Yes | "user" | "group" — whether the approver is a user or a group | |
| approver | Yes | sys_id of the approving user or group | |
| condition | No | Encoded query that determines when the rule fires (leave blank for always) | |
| active | No | Activate the rule immediately (default: true) | |
| order | No | Execution order relative to other rules (default: 100) |