Flow based Application update in ServiceNow

tolsen
Tera Contributor

Hi all,


Just wanted to share a pattern I’ve been using for automating application  updates with Flows.

There are lots of ways to handle this, but this has worked well for me so far — curious to hear how others are approaching this.

 

The two most important objects are table Store Application (sys_store_app) and the Flow action "Install Application With ID".

I chose to design it this way, but since this is based on Flows, the process can be implemented in many different ways. For example, you could trigger a standard Change, or create release notes listing which applications have been updated. There are many possible approaches depending on governance, documentation, and automation requirements.

 

 

Step 1 is look up records on table Store Application where update_avaiable = true.

tolsen_0-1769418010518.png

 

Step 2

I use a flow variable to set the url.

return 'https://'+gs.getProperty("instance_name") +'.service-now.com';

tolsen_1-1769418173736.png

 

step 4 

Use the sys_id of the application, credentials and url.

tolsen_2-1769418211815.png

Credentials:

The user for this need the role  sn_cicd.sys_ci_automation to be abel to use the api.

For my PDI i use Basic auth.

 

1 REPLY 1

Mark Manders
Mega Patron

You are running this every 30 minutes? Why? They aren't updating the apps that often. 

Also: this gives you no control at all on that is happening. Updating a Workspace app (like SOW) can cause issues without checking/testing. Every app update can also create skipped changes that need to be reviewed. Running it every 30 minutes doesn't allow you to do that either. In fact: an app can be updated on PROD before it's done on DEV/TEST/ACC. 

For a PDI on which it doesn't matter if stuff stops working, it's great, but I hope you haven't implemented this on customer instances! You should have control on it.

 

I have used a fix script to do this on my PDI (running it when I want it to run) and on many of our customer instances we have installed the free SAUS application from the Store that allows you to manage this for all your instances from one single instance (even configurable to never have your PROD on a higher version than your DEV). (SAUS)


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark