How to use Flow Designer to automatically run Discovery schedule when request a Catalog item?

CHEN CHEN2
Tera Contributor

Hello ,

I am trying to create a flow that can automatically run discovery schedule when request a Catalog item.
Does anyone know how to use flow designer to do this and Could you please help me if you have any idea or document?

Thank you
Best Regards,
Chen

3 REPLIES 3

Pranay
ServiceNow Employee
ServiceNow Employee

You could create a custom action to call a script for running discovery using Discover. Given that you are calling it from a catalog item, I believe you already have an IP address on which to run the discovery 

https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/sn_discovery-namespace/c_DiscoveryAPIScopedAPI

If you know which schedule you want to execute you may want to use this StartDiscovery API.

https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server_legacy/c_StartDiscoveryAPI#r_SDY-startFromSchedule_GR_GR?navFilter=startdiscovery

Selva Arun
Mega Sage
Mega Sage

Hi Chen,

 

May I know if you have implemented this, if yes then could you please share the script and also other steps too as I have to implement this in our instance and new to Discovery.

Thank you in advance!

Regards,

Selv