Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

SN_Learn
Kilo Patron

Hi All,

 

In the article, we will explore how we can utilize GET table API via flow action.

 

Basic Setup:

 

  • Create a Service Account User

Navigate to [sys_user] table and create a new record with below details:

 

UserID: sn.integration.user

First name: ServiceNow Integration

Last name: User

Web services access Only: True

 

SN_Learn_0-1719138205840.png

 

  • Provide the access to the web service account

Once saved, go to related list named 'roles', click on edit and provide 2 roles:

1. sn_incident_read: This role will provide read access to the Incident Management Application and related functions

2. import_transformer: Can manage Import Set Transform Maps and run transforms

Click on save button.

 

 

Now, we will setup a password for this web service user account using the UI Action(Set Password). Click Generate to generate a new password and then Save Password button. Once saved successfully, we will click the copy icon to copy the password value.

Note: Store the password created in notepad as it will be required in upcoming steps.

 

 

  • Setup Basic Auth Credentials

Navigate to [basic_auth_credentials] table and create a new record with the below details:

The name and password will be same as of the userID and password created in web service account respectively.

 

Once done, Click on Submit button.

 

SN_Learn_2-1719139202425.png

 

 

  • Create Connection & Credential Aliases

Navigate to [sys_alias] table and create a new record with below details:

Name - SNTableAPI , and save the record.

In the related list named connections, click on new button
Name: SNTableAPI

Credential: sn.integration.user (This one we created in the basic auth credential step)

Connection URLhttps://<your_instance_name>.service-now.com/

 

Save the record.

SN_Learn_11-1719142512410.png

 

 

  • Final Setup in Flow Designer

In the filter navigator, search flow designer and open it.

Click on New and select the Action from the dropdown list.

 

Fill the below:

Action name: Retrieve Active Incident records

Click on Build action

SN_Learn_3-1719140237056.png

Click on (+) icon and search Rest and select it.

SN_Learn_4-1719140378198.png

Note: IntegrationHub Plugin is required for this.

 

Fill the below details:

 

SN_Learn_8-1719141653726.png

 

Connection: Use Connection Alias

Connection Alias: SNTableAPI (This is the Connection & Credential Aliases which we created earlier)

Build Request: Manually

Resource Path: /api/now/table/incident

HTTP Method: GET

Query Parameters: Click on the (+) and define as below:

SN_Learn_7-1719141182921.png

Once done, click on Save button.

 

Now we will test it by using Test > Run test button.

Click 'Your test has finished running. View the Action execution details.'

 

Scroll down and click on 'Steps'

SN_Learn_9-1719141797600.png

Scroll down and find Step Output Details, 

Status Code will be 200

and, Response Body will be as below:

SN_Learn_10-1719142358260.png

 

ServiceNow Reference: Advanced Integration Design 

 

 

Mark this article as helpful if it helped.

Version history
Last update:
‎06-23-2024 04:46 AM
Updated by:
Contributors