trend_query
Generate time-bucketed trend data from ServiceNow tables for monthly or weekly trend charts, enabling analysis of patterns over specified periods with optional grouping and filtering.
Instructions
Get time-bucketed trend data for a table (useful for monthly/weekly trend charts)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name (e.g., "incident") | |
| date_field | Yes | Date field to bucket by (e.g., "opened_at", "sys_created_on") | |
| group_by | Yes | Secondary grouping field (e.g., "priority", "state") | |
| query | No | Optional encoded query filter | |
| periods | No | Number of months to look back (default: 6) |