Power Automate query incident tickets being handled within the last 24 hours using ServiceNow API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 06:10 AM
Hi Everyone,
I have a slight similar to this case, but in my case I'm using Service Now API through Power Automate (as connector) and i just want to query the incident tickets being handled within the last 24 hours.
In the Query section in Service Now connector List Record action, I used assignment_group=12345dsftyrgh3454^system_updated_on>=javascript:gs.hours(24). These two combined queries didn't return any data, but if I test them individually/separately it works. By the way, this service Id that we used in Service Now API is a read only account, not sure if that's the cause. Could someone guide me the right direction?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 06:45 AM
Hi Please try the below query and see if it works
assignment_group=sys_id_of_group^sys_updated_onRELATIVELT@hour@ago@24.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 07:07 AM
Thanks for the response, Karthick9. I just tried your suggestion above. It generate a data now,it generate tickets assigned on the correct group, but it includes tickets that are last updated a month ago (like from March 15,2023). It's so weird ServiceNow generates irrelevant to our queries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 07:09 AM
can you share the query you tried ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 07:16 AM
I'm sorry i cannot provide the exact/actual query i used due to company's policy, but I follow your suggestion above. I replaced sys_id_of_group with our assigment group unique id.
assignment_group=sys_id_of_group^sys_updated_onRELATIVELT@hour@ago@24