integration through flow designer

shivanitana
Giga Contributor

get the user department,location,manager deatils from one servicenow instance and store is in annother servicenow instance

2 REPLIES 2

Rabah2
ServiceNow Employee

Hi Shiva,

 

Not sure if I understand your question clearly, you might be able to achieve this through Remote instance spoke, you can create a connection and child connection for each remote instance and update sys_user fields like department, location, manager.

 

Tanushree Maiti
Mega Patron

Hi @shivanitana 

 

 

(High level architecture)

 

Option1: Using Flow Rest PI

 

Step 1: Create a Credential and Connection

Before building the flow, establish a secure connection to your Target instance.

  • In the Source instance, navigate to Connections & Credentials > Credentials.
  • Click New and select Basic Auth Credentials.
  • Provide the username and password of a system integration user in the Target instance.
  • Navigate to Connections & Credentials > Connection and create a new HTTP Connection pointing to your Target instance (e.g., https://<your_target_instance>.service-now.com).

 

Step 2: Build a Custom Flow Action

  • Open Flow Designer on the Source instance, click New, and select Action.
  • Define the Action Inputs:
    • User_Sys_ID (String) - The unique identifier of the user to search.
  • Add a REST Step:
    • Connection: Define Connection Inline. Select the HTTP connection created in Step 1.
    • Resource Path: /api/now/table/sys_user/{User_Sys_ID}
    • HTTP Method: GET
    • Headers: Accept : application/json
  • Parse the Response: Add a JSON Parser or directly map the response output fields (department, location, manager) to the Action Outputs.
  • Define the Action Outputs: Department, Location, Manager.
  • Click Save and Publish the Action

 

Step 3: Create the Flow

  • In Flow Designer, create a new Flow.
  • Define your Trigger (e.g., when a user record is created, or a catalog item is requested).
  • Add an Action:
    • Select your Custom Action created in Step 2.
    • Drag and drop the User_Sys_ID Data Pill into the action input.
  • Add a second action: Update Record.
    • Set the Record to the Target record on the Source instance.
    • Update the Department, Location, and Manager fields using the Data Pills outputted by the REST action.
  • Click Activate

 

 

 

Option2 : Using the ServiceNow Remote Instance Spoke:

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: