How can you query for Service Now tickets created in the last 7 days?

The query I grabbed from SNOW itself is not helping.

Currently this will not find the ticket I created today and it fails.

sys_created_onONThis week^ANDshort_description=My New Test

This works for me:

sys_created_onRELATIVEGT@dayofweek@ago@7

You can create your filter in the GUI of ServiceNow and then hit run. Once you have the filter working as expected you can copy in the URL from sysparm_query to the end.

sysparm_query%3Dsys_created_onRELATIVEGT%40dayofweek%40ago%407%26sysparm_first_row%3D1%26sysparm_view%3D

If you take this to a tool like CyberChef you can then use the URL Decode option. It will give you this result:

sysparm_query=sys_created_onRELATIVEGT@dayofweek@ago@7&sysparm_first_row=1&sysparm_view=

you can exclude &sysparm_first_row and beyond. That is just visual requirements for the UI.

This will give you the query needed for InsightConnect.

very nice thanks