Skip to main content

HTTP Request

Beta

This Node is in Beta and may change.

The HTTP Node sends HTTP requests to external APIs and web services, storing the response in a Variable for further processing in your Flow.

Basic Configuration

  • HTTP Method: Choose the request method (GET, POST, PUT, PATCH, DELETE) based on the API requirements.
  • URL: Enter the full API endpoint URL, including query parameters if needed (e.g., https://api.example.com/v1/items?limit=10))
    • The URL must be reachable by the Robot CU where RobFlow is running.
  • Response Variable: Select a String Variable to store the HTTP response body in.
  • Response processing: Optionally extract specific data from JSON responses using bracket notation.

Authentication

The HTTP Node supports multiple authentication methods for secure API access:

  • None: No authentication (for public APIs).
  • Basic Auth: Provide username and password for HTTP Basic Authentication.
  • Bearer Token: Enter an API token or JWT for Bearer token authentication.

Request Body (POST/PUT/PATCH)

For POST, PUT, and PATCH requests, you can specify the Content-Type and the content of the request:

  • Content-Type: Select the format of your request data (JSON, XML, plain text, or form data).
  • Content: Enter the request body, typically in JSON format (e.g., {"name": "Item1", "quantity": 5}).

Response processing

You can optionally store the HTTP response in a Variable. This allows you to process the data further in your Flow. Also you can narrow down what you actually store in the Variable by specifying a specific part of the JSON response using bracket notation.

Example: apiResponse["items"][0]["name"]

  • apiResponse: The Variable to store the HTTP response in (should match the previously selected Response Variable)
  • ["items"]: First key in the JSON response object
  • [0]: First entry in the "items" array
  • ["name"]: The name field in the array object

Advanced Settings

  • Accept Type: Specify the expected response format (JSON, XML, HTML, plain text, or any).
  • Timeout: Set the maximum time (0.1-30 seconds) to wait for a response before the request fails.
  • Retries: Configure automatic retry attempts (0-10) with exponential backoff for failed requests.

Example Usage

Fetching data from an API

  • Method: GET
  • URL: https://api.example.com/items
  • Response Variable: apiResponse
  • Response processing: apiResponse["items"][0]["name"] (Stores the name of the first item from the response in the selected Variable)

Sending data to an API

  • Method: POST
  • URL: https://api.example.com/items
  • Authentication: Bearer Token
  • Content-Type: application/json
  • Content: {"name": "NewItem", "quantity": 10}
  • Response Variable (optional): createResponse

Tips

  • Test your API endpoint in a tool like Postman before configuring the HTTP Node.
  • Use Response processing to extract only the data you need, reducing Variable size.
  • Configure retries with appropriate timeout values to handle temporary issues in the API.
  • The HTTP response status code (e.g., 200, 404) is displayed above the Node during execution.
  • If authentication fails or the API is unreachable, the Node will pause the Flow and display an error.

ERP Integration

SAP

The HTTP Node can be used to send requests to SAP (S/4HANA) systems which expose an HTTP API.

Requirements:

  • Customer must have configured SAP Gateway (Or similar) to expose an OData(HTTP) API to their SAP system.
    • This API endpoint must be reachable by the Robot CU where RobFlow is running.