How to have Scripted REST API in flow designer ?

Thej1
Tera Expert

Hi,

 

How to incorporate the Scripted REST API in flow designer as we do it for Outbound REST message ?
In Flow Designer, We add REST message by creating new Action of REST and importing REST message. Then adding that into the flow.

 

We have Bidirectional integration of ServiceNow with BMC. After making 3 API REST calls, a ticket is created in BMC. Then after closing it manually in BMC they will call our Scripted REST API of Scripted Web service and send an ID as a parameter. Then we need to make 4th Outbound call by having the provided id and in response we will receive Incident number.
We are doing it all in flow designer.

 

Not getting how to incorporate the Scripted REST API in flow. Could you please help me on this ?

@Dr Atul G- LNG @Ankur Bawiskar @Mohit Kaushik @Harish Bainsla 


Thanks

14 REPLIES 14

Murthy Ch
Giga Sage

@Thej1 

In flow, wait untill you receive the ID (I believe you will be storing ID anywhere in SN) then you call the 4th REST API using action. Hope this helps

Thanks,
Murthy

Hi @Murtaza Saify ,

 

Thanks you for the quick response. 
No we are not storing this ID in anywhere in SN.

 

Thanks

Murtaza Saify
Tera Contributor

Hi @Thej1 ,

 

           dropping some points that might help you 

  • The Scripted REST API endpoint is correctly configured and accessible.

  • The flow is properly set up to handle the input (id) and make the Outbound REST call.

  • Proper error handling is implemented in both the Scripted REST API and the flow.

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Thej1 

Scripted REST API is when 3rd party consumes ServiceNow endpoint.

In your flow REST STEP you can configure to consume that endpoint. It's similar to how you are consuming external API endpoints.

In your case they will have to consume ServiceNow Scripted REST API endpoint, you please share the endpoint URL, authentication details, request body format etc

Why are you worrying about the flow?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader