Send Activity
The Send activity enables the execution of HTTP requests to external web services or APIs. This activity supports various HTTP methods and allows for the customization of headers, bodies, and encoding, facilitating seamless integration between the automation workflow and external digital systems.
| Field | Description | Requirement |
|---|---|---|
| Request URL | The endpoint address of the web service or API to be called. | Required |
| Request method | The HTTP action to be performed: GET, POST, PUT, DELETE, or PATCH. | Optional |
| Request body | The data payload to be sent with the request (typically used for POST, PUT, and PATCH). | Optional |
| Request headers | A collection of key-value pairs defining the HTTP headers (e.g., Content-Type, Authorization). | Optional |
| Request body encoding | Specifies the character encoding for the request body (e.g., UTF-8). | Optional |
| Request timeout | The maximum time in milliseconds to wait for a response from the server. | Optional |
| Response variable name | The variable where the server's response content will be stored. | Optional |
| Save response as JSON | If checked, the activity attempts to parse the response body as a JSON object. | Optional |
Action Types & Examples
GET Request
Retrieving data from a server using a simple URL.
- Format:
Request method:GET - Example Result: The
Response variable namestores a list of users or data points returned by the API.
POST Request
Sending structured data to a server to create or update a resource.
- Format:
Request body:{"name": "John Doe", "email": "john@example.com"} - Example Result: The server returns a
201 Createdstatus and the saved object details.
Implementation Examples
Field Setup
- Request URL:
https://api.example.com/v1/orders - Request method:
POST - Request headers:
{"Content-Type": "application/json", "Authorization": "Bearer token123"} - Save response as JSON:
True
Execution Parameters
- Process: The activity sends the JSON payload to the specified endpoint. The resulting JSON response is parsed and stored in the designated response variable for easy access to nested data.
Technical Notes
When using
Save response as JSON, ensure the target API actually returns a valid JSON string; otherwise, the activity may throw a parsing error. For large file uploads or slow APIs, it is recommended to increase theRequest timeoutvalue from its default.