tencent cloud

Tool Node
Last updated:2025-08-18 17:15:48
Tool Node
Last updated: 2025-08-18 17:15:48

Node Function

The tool node belongs to Information Processing Node, supports user-configured APIs. When execution reaches this node, the system will invoke the API based on the user-configured information and output the call results.




Directions

Threshold

API URL

url for the API.

Authorization Method

API access permissions support "authorization is not required" and "ApiKey". ApiKey authorization is a lightweight authentication mechanism based on a unique identifier (API Key) to verify client access permissions for APIs, such as user applications, users, or services. An API Key is usually a randomly generated string assigned by the API provider. Clients must include it in the Header or Query during API invocation to certify legitimacy. Configuration as follows:
Configuration
Description
Key location
Support selecting "header" or "query" for configuration to fill in the ApiKey position.
Key Parameter Name
ApiKey Name.
key value
specific value of ApiKey.




Request method

Configure the request method of the API tool. It supports GET, POST, and DELETE.
Configuration
Description
GET
Used to obtain data from the server, usually used for query operations. Use cases:
● Retrieve static resources such as web pages, images, and API data.
● Search engine queries.
● Simple data transfer without sensitive information.
POST
Used to submit data to a server, usually used for creating or updating resources. Use cases:
● Submit form data, such as user registration and sign-in.
● Upload files or large data.
● Perform non-query operations.
DELETE
DELETE: Deleting the specified resource from the server, usually used for data removal or operation cancellation. Use cases:
● Delete user accounts, articles, comments, and other dynamic resources.
● Cancel submitted orders or reservations.
● Clean up temporary files or cached data.

Invocation Method

Supports both streaming and non-streaming, with non-streaming as the default. Non-streaming returns data after the call is completed. SSE-based streaming supports incremental or overwrite parsing of output variables. The incremental parsing method is suitable when each response is a standalone and complete content, such as "today," "weather," "very," "good." The overwrite parsing method is suitable when each response is incremental content based on the last result, such as "to," "today," "today wea," "today weather," "today weather is," "today weather is good."

Adding by YAML

Fill in the OpenAPI in yaml format. OpenAPI is a standardized, language-agnostic RESTful API description specification for defining API structure, request/response format, authentication method, etc. YAML is the most commonly used description format for OpenAPI.
Example of filling in OpenAPI in yaml format:
openapi: "3.0.0"
info:
title: "Test API"
version: "1.0.0"
description: "Fill in the plugin description herein"
servers:
- url: "https://example.com/api"
description: "Fill in the plugin description herein"
paths:
"/weatherInfo":
get:
summary: "API name"
description: "Fill in the API description of the plug-in herein"
operationId: "getWeatherInfo"
parameters:
- name: "city"
in: "query"
description: "parameter description"
required: true
schema:
type: "string"
responses:
"200":
description: "successful response"
content:
application/json:
schema:
type: "object"
properties:
status:
type: "integer"
description: "return status"
enum: [0, 1]
"400":
description: "incorrect request"
"401":
description: "unauthorized"
"500":
description: "internal server error"
Click "Parse" after filling in to automatically fill the corresponding parameters.

API Parameter

The header, query, and body information required for this API call. Configure the parameters refer to your API requirements.
Configuration
Description
Variable Name
The variable name can only contain letters, digits, or underscores, must start with a letter or underscore, and is mandatory.
Description
Description of this variable. Optional.
Data source
The data source of this variable supports two options: "refer" and "input". "Refer" allows selecting output variables from all preceding nodes, while "input" supports manually filling in a fixed value.
Type
The data type of this variable cannot be selected and defaults to the variable type of "refer" or the string type of "input".

Output Variable

The output variable processed by this node is empty by default. Users can manually add output variables, and the name must be identical to the API response parameter. It also contains runtime error information Error (data type is object, this field is empty during normal operation).




Handling error

Exception handling can be enabled manually, supporting exception retry and output content configuration for anomalies. The configuration content is as follows.
Configuration
Description
Max Retry Attempts
The maximum number of retries when a node runs abnormally. If retries exceed the set number of times, the node is considered a call failed and returns the "Exception Output Variable" content, defaulting to 3 times.
Retry Interval
Interval between each rerun, default is 1 second.
Exception Output Variable
The output variable returned when retries exceed the maximum number.




Application Example

Examples of GET Request

Query real-time weather for a specific city. City is a required item and placed in the request query. Example configuration as follows:



Example YAML for import:
openapi: "3.0.0"
info:
title: "weather inquiry"
version: "1.0.0"
description: "Plug-in for weather inquiry"
servers:
- url: "https://example.example/api"
description: "Query real-time weather for a specific city"
paths:
"/weatherInfo":
get:
summary: "Plug-in for querying real-time weather in a specific city"
operationId: "getWeatherInfoId"
description: "Query real-time weather for a specific city"
parameters:
- name: "city"
in: "query"
description: "City to be queried for weather"
required: true
schema:
type: "string"
responses:
"200":
description: "successful response"
content:
application/json:
schema:
type: "object"
properties:
weather:
type: "string"
description: "Weather description"
status:
type: "integer"
description: "API call status"
"400":
description: "incorrect request"
"401":
description: "unauthorized"
"500":
description: "internal server error"
Note:
The example is only used to show the API configuration process and unable to call directly. According to the example, replace with your own API.

Examples of POST Request

Query the order list for a specific customer ID. customerId is a required item, while customerName and customerEmail are optional fields, placed in the request body. Configuration as follows:



Example YAML for import:
openapi: "3.0.0"
info:
title: "Customer Order Query"
version: "1.0.0"
description: "Query ALL orders by Customer ID"
servers:
- url: "https://example.example/api"
description: "Query order information for specific customers"
paths:
/orderList:
post:
summary: "Query order list for specific customers"
operationId: "getOrderList"
description: "Query ALL orders by Customer ID"
requestBody:
required: true
description: "The request body contains the customer ID"
content:
application/json:
schema:
type: object
properties:
customerId:
type: integer
description: "Customer ID, required"
customerName:
type: string
description: "Customer name (optional)"
customerEmail:
type: string
description: "Customer mailbox (optional)"
required:
- customerId
responses:
"200":
description: "query succeeded"
content:
application/json:
schema:
type: object
properties:
orderList:
type: array
description: "Order list"
items:
type: object
properties:
orderId:
type: integer
description: "Order ID"
status:
type: string
description: "Order status"
amount:
type: number
description: "order amount"
status:
type: integer
description: "API call status"
enum: [0, 1]
"400":
description: "incorrect request"
"401":
description: "unauthorized"
"500":
description: "internal server error"
Note:
The example is only used to show the API configuration process and unable to call directly. According to the example, replace with your own API.

FAQs

Is Bearer authentication supported? How to configure?
Support Bearer authentication. Choose the authorization method "APIkey" and fill in "Bearer [your api key value]".
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback