HTTP Request

Makes an HTTP request to any external API and outputs the response. Use it to call REST APIs, internal services, or any HTTP endpoint from within a workflow.

When to Use

Use HTTP Request for any outbound API call:

  • Fetching data from a third-party API
  • Sending data to an external service
  • Calling internal microservices or your own APIs

Inputs

HandleTypeDescription
bodyanyThe request body. Connect an upstream output to send data as the request payload.

Output

HandleTypeDescription
responseobjectThe HTTP response

The response (accessed as {{ http_request.* }}) shape:

FieldTypeDescription
statusnumberHTTP status code (e.g., 200, 404, 500)
dataanyParsed response body (JSON if Content-Type is application/json, otherwise raw text)
headersobjectResponse headers

Settings

SettingTypeDefaultDescription
methodselectGETHTTP method: GET, POST, PUT, PATCH, or DELETE
urlstringTarget URL. Supports template bindings for dynamic URLs.
headersobjectRequest headers as a JSON object. Supports bindings.
queryobjectQuery parameters appended to the URL. Supports bindings.
timeoutnumber30Request timeout in seconds.

Example

Call the GitHub API to fetch repository information:

  • Method: GET
  • URL: https://api.github.com/repos/{{ webhook.body.repository }}
  • Headers:
    {
      "Authorization": "Bearer {{ env.GITHUB_TOKEN }}",
      "Accept": "application/vnd.github+json"
    }
    

Access the response in a downstream node:

{{ http_request.data.stargazers_count }}
{{ http_request.data.description }}
{{ http_request.status }}

Sending a Body

Connect an upstream node's output to the body input handle. The connected value is serialized and sent as the request body. The Content-Type header is set to application/json automatically.

To send a transformed or reshaped body, connect a Transform or Code node between your trigger and this node.

Dynamic URLs

Build URLs dynamically using {{ }} expressions in the URL field:

https://api.example.com/users/{{ webhook.body.userId }}/profile

Common Gotchas

  • Status codes: HTTP Request always succeeds at the node level regardless of the response status code. Check {{ http_request.status }} in a downstream If node to handle errors.
  • Timeout: Requests that take longer than timeout seconds will fail the node and halt execution on that path.
  • Authentication: Put API keys in headers or query parameters using env var bindings ({{ env.MY_API_KEY }}). Do not hardcode secrets in the settings.

See Also

On this page