HTTP Request Action
The http_request action makes an outbound HTTP call to an external service during the automation chain. It replaces the old forwarding destinations feature, with the added power of template interpolation for dynamic URLs, headers, and bodies.
Configuration
{
"type": "http_request",
"name": "Forward to billing service",
"config": {
"url": "https://api.example.com/webhooks/$variable.event_type$",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer $store.api_token$"
},
"body": "{\"order_id\": \"$variable.order_id$\", \"payload\": $request.body.json$}",
"response_variable": "billing_response"
}
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Target URL (supports interpolation) |
method | string | No | HTTP method: GET, POST, PUT, PATCH, DELETE (default: POST) |
headers | object | No | Custom headers as key-value pairs (values support interpolation) |
body | string | No | Request body (supports interpolation) |
response_variable | string | No | Chain variable name to store the response |
Response variable
When response_variable is set, the HTTP response is stored as a chain variable that subsequent actions can access via $variable.<name>$.
On success:
{
"status": 200,
"headers": {"content-type": "application/json"},
"body": {"id": "ord_123", "status": "created"}
}
On error:
{
"error": "connection timeout"
}
Access nested response data in later actions: $variable.billing_response.body.id$, $variable.billing_response.status$.
Behavior
- Timeout: 10 seconds per request
- Non-fatal: If the request fails (timeout, connection error, non-2xx status), the error is logged but the chain continues to the next action
- No retries: Failed requests are not automatically retried
- All string fields (
url,headersvalues,body) support template interpolation
Examples
Simple forward
{
"url": "https://api.example.com/webhook",
"method": "POST",
"headers": {"Content-Type": "application/json"},
"body": "$request.body.json$"
}
Forward with auth from Datastore
{
"url": "https://api.example.com/events",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer $store.default.api_token$"
},
"body": "$request.body.json$"
}
Send Slack notification
{
"url": "https://hooks.slack.com/services/T00/B00/xxx",
"method": "POST",
"headers": {"Content-Type": "application/json"},
"body": "{\"text\": \"New order from $variable.customer_email$ - Order #$variable.order_id$\"}"
}
GET request with response capture
{
"url": "https://api.example.com/customers/$variable.customer_id$",
"method": "GET",
"headers": {"Authorization": "Bearer $store.api_token$"},
"response_variable": "customer_data"
}