Skip to content

http

Outbound HTTP request. URL / headers / query / body rendered as Go templates. Retry policy + parse_response shape control.

Sourceinternal/agents/workflow/nodes/http.go
When to useDirect 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

FieldTypeRequiredNotes
methoddropdownGET / POST / PUT / PATCH / DELETE.
urltemplateFull URL. Rendered as Go template — pull values from upstream nodes via {{.Node.x.y}} or {{.Event.Payload.z}}.
headerskvlist (templated)Each value is rendered as a Go template — e.g. Authorization: Bearer {{.Node.login.token}}.
querykvlist (templated)Query string parameters. Each value templated.
bodytextarea (template)Request body as string. Use YAML block scalar | for multiline JSON. Visible only for POST/PUT/PATCH/DELETE.
parse_responsedropdownraw (default) / json / bytes.
timeout_secintRequest timeout in seconds. Default 30.

Output

FieldTypeWhat
statusintHTTP status code. Branch on it via a downstream branch node ({{.Node.x.status}} >= 400).
bodystringResponse body as string. Always populated regardless of parse_response.
headersmapFlat map of response headers — first value per key.
jsonanyParsed JSON body. Populated when parse_response: json or unset and the body is valid JSON. Use {{.Node.x.json.<field>}}.
bytesbytesRaw 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).

Pair with

  • connector — typed alternative once you call the same API repeatedly.
  • transform — reshape body / json between calls.
  • branch — route on status.
Built with ❤️ by a developer, for developers.