ServiceNow get multiple records action

Use the Get Multiple Records action to retrieve multiple records from a ServiceNow table.

Prerequisites

Ensure that you are authenticated before initiating any ServiceNow action. For more details, see ServiceNow authentication action.

Procedure

  1. From the Actions pane, select ServiceNow > Records > Get Multiple Records and place it in the canvas.
  2. Specify details in the following fields:
    1. Table name: Enter the ServiceNow table name.
    2. Select List in the List of fields to return in the response (Optional) field. Enter the Type and Value for the fields you want to view in the response.
    3. You can optionally filter the records by using name-value pair or query. For example, select Query and specify a query parameter to retrieve records for only the queried fields. For example, you can map the sys_id to a variable and add it as a query.
    4. Specify a limit of records to view. If the Limit field is blank or set to 0, all records are returned. Response time might vary depending on the volume of the specified Table.
    5. The session name displays as Default.
    6. Save the outcome to a variable. For example, the object ID is saved to list_GetMultipleRecordsResult.

    Get multiple record action for service now
  3. Click Run to save and run your bot. When the bot is run successfully, you will retrieve all the records from ServiceNow.
    Note: The output is retrieved as a list of type Dictionary. To read an individual record (row) in this list, you need to loop through all the dictionary items using the Loop action and read or extract the records (rows) individually. For example, the output of get multiple records is saved in the variable list_of_records_any. If the variable contains five records, then each record is passed to the Loop action to be processed one at a time.Loop action for get multiple records