Assume that we have to integrate Automation Anywhere with REST API to exchange data between the applications.

Here we are calling a Rest API from Automation Anywhere with the parameters. The REST API will provide an output and we are displaying the same in Automation Anywhere.

Steps:

  1. Creating Bot
  2. Calling Rest API with Input(name and job)
  3. Receiving the output as JSON
  4. Extracting Required Text(id) from the JSON.

Technologies and Tools Used

The following technologies have been used to achieve the expected output.

  • Automation Anywhere
  • REST API (REQRES)

 Architecture

The following steps explain in detail,

Step 1: Open Automation Anywhere and create a new bot.

Step 2: Go to Actions and choose Post method under REST Web services.

  • Enter the URI of the API in the given field

  • Choose content type as JSON and Provide Parameters

Step 3:  We need a variable to store the output of the request now. Create a dictionary variable and give it in the field.

Step 4: Now the JSON output will be available OutJSON variable. We can extract the JSON using a String action. For that go to actions and choose Extract Text under String Actions.

  • Provide OutJSON variable in the source string and give key

Step 5:  We are going to extract ID from the Output. For that choose ‘Before and After’ and provide the start after text and end before text.

 

Assign the output into a new variable.

Step 6: Create a new action Message Box and Give the Output variable there in the respective field.

Step 7:  Save and Run

 

 

5.        Screen Shot

Output:

 

996’ is the output from the REST API (JSON)

Recent Posts

Start typing and press Enter to search