http
Outbound HTTP request. URL / headers / query / body rendered as Go templates. Retry policy + parse_response shape control.
| Source | internal/agents/workflow/nodes/http.go |
| When to use | Direct external API calls without a typed connector module. For repeated calls to the same API, write a connector instead — typed inputs + audit log + tag visibility. |
Schema
| Field | Type | Required | Notes |
|---|---|---|---|
method | dropdown | ✅ | GET / POST / PUT / PATCH / DELETE. |
url | template | ✅ | Full URL. Rendered as Go template — pull values from upstream nodes via {{.Node.x.y}} or {{.Event.Payload.z}}. |
headers | kvlist (templated) | Each value is rendered as a Go template — e.g. Authorization: Bearer {{.Node.login.token}}. | |
query | kvlist (templated) | Query string parameters. Each value templated. | |
body | textarea (template) | Request body as string. Use YAML block scalar | for multiline JSON. Visible only for POST/PUT/PATCH/DELETE. | |
parse_response | dropdown | raw (default) / json / bytes. | |
timeout_sec | int | Request timeout in seconds. Default 30. |
Output
| Field | Type | What |
|---|---|---|
status | int | HTTP status code. Branch on it via a downstream branch node ({{.Node.x.status}} >= 400). |
body | string | Response body as string. Always populated regardless of parse_response. |
headers | map | Flat map of response headers — first value per key. |
json | any | Parsed JSON body. Populated when parse_response: json or unset and the body is valid JSON. Use {{.Node.x.json.<field>}}. |
bytes | bytes | Raw bytes — populated only when parse_response: bytes. |
Example
json
{
"id": "file_ticket",
"type": "http",
"method": "POST",
"url": "https://api.example.com/tickets",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {{.Env.TICKETS_TOKEN}}"
},
"body": "{\n \"title\": \"{{jsonEscape (index .Event.Payload \\\"text\\\")}}\",\n \"user\": \"{{jsonEscape (index .Event.Payload \\\"user\\\")}}\"\n}",
"parse_response": "json"
}Templates: escape your strings
The most common mistake is putting raw user text into a JSON body without escaping:
body: '{"text": "{{.Event.Payload.text}}"}' // ❌ quotes in text break JSON
body: '{"text": "{{jsonEscape .Event.Payload.text}}"}' // ✅The jsonEscape helper escapes ", \, and control characters. For multiline payloads use the YAML block scalar | so newlines render predictably.
Response size limit
The node buffers the full response body into memory before passing it downstream. Responses larger than 64 MiB are rejected with an error — the run fails and no output is produced. This limit exists to prevent runaway memory use; design workflows to avoid fetching large binary blobs through this node (use a connector with streaming support instead).