John Zhang1
Kilo Patron
Kilo Patron

ChatGPT is a large language model (LLM). It can understand and generate human-like text using OpenAI’s latest GPT (generative pre-trained transformer) model: GPT-4.

 

Made popular by its chat-based interface, ChatGPT uses AI and machine learning (ML) to produce responses to user prompts.

 

ChatGPT made more easy to integration with third party tool using its model and prompt parameter using 

post https://api.openai.com/v1/completions.  You can access https://platform.openai.com/docs/api-reference/completions/create to get all integration parameters. 

 

JohnZhang1_0-1687105879461.png

 

In this blog, I am going to use low code approach to build ServiceNow REST integration using Flow Design and App Engine Studio to build Catalog item to trigger REST integration to post your request to ChatGPT AI chatbot  and get your answer from ChatGPT.

 

Activates the ServiceNow IntegrationHub Starter Pack Installer plugin (com. glide. hub. integrations) on personal developer instances.

 

Configure Flow Action for REST Integration

Open Flow Designer to create new Action follow the following steps:

  • Create Input

JohnZhang1_0-1687114084262.png

JohnZhang1_7-1687114936257.png

JohnZhang1_8-1687114972221.png

JohnZhang1_9-1687115037464.png

Define Script to capture REST Response from ChatGPT

 

 

JohnZhang1_11-1687115295441.png

Test Action after Publishing

 

JohnZhang1_12-1687115469158.png

Review Test results blow:

 

JohnZhang1_13-1687115554927.png

 

Create the following Catalog Item from App Engine Studio

JohnZhang1_14-1687115722126.png

Create a Flow using  Flow Designer

JohnZhang1_15-1687115803766.png

 

JohnZhang1_16-1687115862836.pngJohnZhang1_17-1687115902419.png

JohnZhang1_18-1687115959443.png

JohnZhang1_19-1687116004270.png

 

Demo - Access ChatGPT Request from Service Portal

 

JohnZhang1_20-1687116103230.png

ChatGPT Answer in Request Item Record

 

JohnZhang1_21-1687116260495.png

 

 

If you enjoy my ServiceNow posts, please be sure to follow me on LinkedIn and my ServiceNow YouTubes Channels

 

 

11 Comments