REST API Node

The Rest API node in Nected Workflow allows you to make HTTP requests to external APIs, enabling you to integrate data and functionality from various web services into your workflow. This node supports GET, POST, PUT, PATCH, and DELETE methods, allowing you to perform a wide range of operations on external APIs.

By configuring the Rest API node, you can specify the API endpoint URL, request method, headers, and parameters. You can also set the request body for POST, PUT, and PATCH methods. The node supports both JSON and XML request and response formats.

Once the API request is made, the response data is stored in the node's output, which can be accessed by subsequent nodes in the workflow. This allows you to process and manipulate the data retrieved from the external API as needed.

wa_restAPI.png

How to Add a REST API Node to a Workflow?

  1. In the Workflow Editor, click + Add Node.

  2. From the node type dropdown, select REST API.

  3. In the REST API configuration popup:

    • Choose an existing API connector from the dropdown list, or,

    • Click + RESTAPI to create a new one.

If you’re creating a new connector:

  • You’ll be redirected to the Connectors page with the REST API modal opened.

  • Provide the required connection details (name, base URL, authentication, etc.).

  • Click Test Connection.

  • Then publish the connector in Staging, followed by Production.

  • Return to the workflow editor, click Refresh ↻, and your new connector will now appear in the list.

Now inside the REST API Node, you'll be able to see three tabs. Here’s what you can configure in each:

Input Params Tab

This tab lets you configure how the node makes the actual HTTP request.

Field
Description

Integration Dropdown

Select from existing REST API connectors. Click the ✎ icon to edit, or +Create Connector to add a new one (redirects to the Connectors page).

Method

Choose from GET, POST, PUT, PATCH, or DELETE. Method selection determines if body/content configuration is needed.

Base URL

Inherited from the connector. It’s the root address of the API (e.g., https://api.airtable.com/v0/).

Authentication

Configured during connector creation. Shown here but not editable from this tab.

URL Path

Path appended to the base URL for targeting specific resources. You can use dynamic tokens like {{workflow.input.customer_id}} for runtime values.

Headers

Predefined headers from the connector are auto-populated and locked. You can add more custom headers as key-value pairs. Examples: Content-Type: application/json, x-api-key: abc123.

Query Parameters

Similar to headers—preset values from the connector are pre-filled and immutable. You can add extra query params dynamically as needed.

Content Type

Only appears for POST, PUT, or PATCH methods. Select the payload format from options like JSON, XML, FORM, FORM URL Encoded, TEXT, HTML, or JavaScript.

Request Body

Appears for payload-based methods. Use the editor to write the request body in the selected content type. You can use workflow tokens to dynamically inject values. While the API will receive the body as intended (e.g., XML), the UI will display the response in JSON for ease of review.

Allow-list IPs

Expand this section to view and copy Nected’s IP address (43.205.43.45) for API server allow-listing. This is required in cloud deployments where APIs have IP whitelisting enabled.

Content Types and Request Body Configuration

The Content Type determines how your request body data is formatted and interpreted by the receiving API. Choose the content type that matches what your target API expects.

Most modern REST APIs expect JSON format. This is the most common choice for structured data.

Request Body Example:

{
  "customer_id": "{{.customInput.customer_id}}",
  "email": "{{.customInput.customer_email}}",
  "order_details": {
    "product_id": "{{.customInput.product_id}}",
    "quantity": {{.customInput.quantity}},
    "total_amount": {{.customInput.total_amount}},
    "currency": "USD"
  },
  "metadata": {
    "source": "nected_rule",
    "timestamp": "{{.customInput.current_timestamp}}"
  }
}

Tip: You can use tokens inside the URL path along with the value fields of both Headers and Query Parameters to make your HTTP requests dynamic. Just start typing with {} and a list of available tokens will appear—these can include workflow inputs, outputs from previous nodes, or other dynamic values. This allows your API calls to adapt at runtime based on real-time data.

Test Results Tab

This tab lets you test the API configuration:

  • Click Test API to execute the configured request using test inputs.

  • The API response (or any error) will be displayed in JSON format.

  • You can inspect the structure of the response to ensure correct integration before saving the node.

Settings Tab:

In the settings tab, you can adjust the timeout time for the Rest API.

Timeout after:

The "Timeout after" option allows you to set a time limit for the node's operation. If the node takes longer than the specified time, it will automatically stop running.

Continue on error:

If you turn this setting on, then even if the workflow node gets any error, the workflow will continue to execute the next node with the error.

Let's take an example:

Let's say we have these 3 nodes in our workflow:

The first one is a Formula node, the second one is a Rule node and the third one is a database node.

Continue on error can be toggled on or off for each node in the workflow. When this setting is activated, it allows the workflow to proceed to the next node even if an error occurs in the current node. Specifically, if the first node, like "modified_cart," encounters an error while this setting is enabled, the workflow will not be halted. Instead, it will advance to the subsequent node, such as the rule node, with the error details passed along from the previous node. This functionality facilitates the continuation of the workflow despite errors, promoting greater flexibility and resilience in managing workflows by allowing for potential error handling at later stages of the process.

Response Caching

For workflows that involve API calls through an API Node, Response Caching can be turned on to optimize API interactions by using cached responses based on defined inputs.

  1. Open the API Node: Select the API Node within the workflow editor.

  2. Access the Settings Tab: Go to the Settings tab of the API node.

  3. Enable Response Caching: Toggle the Response Caching option to activate it.

  4. Configure Caching Parameters:

    • Key Parameters: Select input parameters that will use cached responses during workflow execution.

    • Cache Expiry Time: Set the duration (Days, Hours, or Minutes) for cached data to remain valid.

    • Clear Cache: Specify which environment (Staging or Production) cache data to clear, if needed.

The 'Test' and 'Save' buttons at the bottom of the tab are used to test the API call with the configured parameters and to save the node configuration if the tests are successful.

Last updated