So while working with Service Now developers to move to an Event Based setup, I wrote a Logic App in the interim that scans Service Now for new requests every minute and calls an Azure Automation job if a new record was created. Here are the steps:
Trigger => Reoccurance set to
1 week, then
M-Fevery minute between
8am and 5pm
- HTTP Action:
- Method: GET
- URI: (You will need to tweak this in Postman but the idea is filter on the short description. Example
https://yourcompany.service-now.com/api/now/table/sc_request?sysparm_query=short_description%3DSomething&sysparm_limit=10&state=1this will get ‘Something’ with a state of ‘New’ from the request table.
- Headers: Authorization (your authorization method)
Bodyof the response in a variable named
Initialize an integer variable with
Store the length of the first variable in another variable
- Add a condition that if length is greater than
13, call an automation job. Or as I did, have it increment the first integer variable and then create another condition that says if that variable is greater than 0, create an automation job - same thing.