Node - Send API Request
Function: This node enables data exchange with external systems via APIs — either retrieving data from external sources or pushing data to specified interface address.
Use Case
-
Push Data: When a purchase request is approved, send the record data to another system.
-
Pull Data: Periodically fetch order data from an order management system and add it to the worksheet.
Supported data processing modes: Push Data and Pull Data.
-
Send Custom Request: Send requests to third-party systems to push or pull data. Supports: GET, POST, PUT, DELETE, HEAD, and PATCH methods.
-
Send Specified Data Object: Push record data from the worksheet to a third-party system.
I. Send Custom Request
1.1 GET
Use Case: When collecting public feedback on courses, you can retrieve users' IP addresses and query their geographical locations from an API service, then write the results to corresponding fields.
API Documentation: https://www.juhe.cn/docs/api/id/1
API URL
Paste the address of API interface here. Supports static or dynamic parameter concatenation.
Enable "Use Network Proxy" and "Enable SSL Certificate Verification" if required.
Proxy configuration must be set by organization admins at: [Org Admin] > [Security] > [Data].
Header configuration
Some systems require authorization information or parameters, add them directly to the API URL if needed.
Some systems require parameters to be configured in Header.
As shown in the following interface example:
Configuration:
Token in Header is Authorization (i.e., authorization credentials), and enter your Token value after it.
Trusted IP Address
Some third-party platforms require whitelisted IPs for API access. This platform uses 123.59.59.220 and 106.75.14.110 (randomly selected per request).
Request Failure Settings
Define status codes and error messages for failed requests.
-
Success Code: List with English commas (e.g., 200,201).
-
Error Code/Message: Configure separately.
Error details appear in the workflow execution history.
Test API
After configuring the interface details above, you can test whether the request works properly by clicking the [Test API] button.
-
If the request URL contains dynamic parameters from the node, you will be prompted to enter test data for these parameters during the first test.
-
After filling in the test values, you can replace them with dynamic parameters to initiate the request.
-
All fields are optional and can be left blank (the request will proceed with empty values).
-
The last entered values will be retained for subsequent tests when clicking [Test API] again.
After clicking [Test API], you can generate the response body content by selecting "Example of importing a response from JSON" on the right side of the "Response Body" section.
When a request times out or fails
A request times out if it exceeds 10 seconds.
When a request times out or fails, the workflow can handle subsequent nodes in two ways:
-
Continue process
-
Subsequent nodes proceed normally.
-
If later nodes rely on data from this node, only the dependent operations are skipped (not necessarily the entire node).
Example: In an "Update Record" node updating 5 fields, if 1 field uses data from this failed node, only that field is ignored — the other 4 update normally.
-
-
Terminate process
The workflow stops at this node, and no further nodes are executed.
1.2 POST
Body: Supports four formats, form-data x-www-form-urlencoded, Raw, and binary.
- If sending attachments in binary format, output as binary data (limited to 1 attachment per request).
Other request configurations (headers, timeouts, etc.) follow the same rules as the GET method (refer to previous section).
II. Send Specified Data Object
Data Object: Select the record to be pushed, i.e., determine which node's record in the workflow will be sent.
API URL: Supports static or dynamic parameter concatenation.
III. How to use return parameters obtained from the "Send API Request" node
After retrieving data by sending a custom request, you can reference this data in subsequent operations.
3.1 If returned single data
The data can be directly used in nodes such as "Add Record" or "Update Record".
Example: Add an "Add Record" node to add this data into a worksheet. Field values in the new record can reference values obtained from the "Send API Request" node.
3.2 If returned array data
When API requests return array data, following the "Send API Request" node, add a "Get Multiple Data" node (Get array object) to convert the array data into processable multi-row data, then process the transformed data in subsequent nodes.
Notes:
Data is sent via POST to the configured notification URL. The URL must return a 200 status within 10 seconds to confirm successful receipt.
If no HTTP 200 response is received, HAP will retry pushing the data to the notification URL (max 10 attempts before aborting).
Check out the API Documentation for more API use cases.