create_email_script
Generate dynamic ServiceNow email scripts for notifications with custom recipients, conditional subjects, and loop prevention. Produces deploy-ready payload.
Instructions
Generate a ServiceNow Email Script (sys_script_email) for dynamic notification logic.
Email Scripts are used when a notification needs:
Dynamic recipients (e.g. add manager as CC)
Conditional subject lines
Dynamic body content based on record state
Loop-prevention logic
Returns deploy-ready payload with best-practice template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Email Script name | |
| description | No | ||
| logic | No | Core logic to embed (pseudo-code is fine) |