The HTTP Request node calls any external REST API. Use it when an integration isn't available as an Action node, or when you need full control over the request.
Configuration
| Field | Description |
|---|---|
| Method | GET, POST, PUT, PATCH, DELETE |
| URL | Full endpoint URL, supports {{templates}} |
| Headers | Key-value pairs (Content-Type, Authorization, etc.) |
| Body | Request body for POST/PUT/PATCH (JSON template) |
| Timeout | Maximum wait time in milliseconds |
Example — fetch weather data
Method: GET
URL: https://api.openweathermap.org/data/2.5/weather?q={{inputs.city}}&appid={{variables.weatherApiKey}}
Store your API key as a workflow variable rather than hardcoding it in the URL.
Example — POST JSON
Method: POST
URL: https://api.example.com/v1/events
Headers:
Content-Type: application/json
Authorization: Bearer {{variables.apiToken}}
Body:
{
"event": "order_created",
"data": {{lastOutput}}
}
Authentication patterns
| Pattern | Setup |
|---|---|
| API key in header | X-API-Key: {{variables.apiKey}} |
| Bearer token | Authorization: Bearer {{variables.token}} |
| Basic auth | Authorization: Basic {{variables.basicAuth}} |
| Query parameter | Append ?api_key={{variables.key}} to the URL |
Output
The node's output includes:
- Response body (parsed as JSON when possible)
- HTTP status code
- Response headers
Access via {{lastOutput}} in downstream nodes. If the response is JSON, use dot notation: {{lastOutput.data.items}}.
Error handling
Failed requests (4xx/5xx status codes) mark the node as failed and stop the workflow. To handle errors gracefully:
- Add a Condition node after the HTTP node to check
{{lastOutput.status}} - Branch to a retry or fallback path
Tips
- Use GET for fetching data, POST for creating, PUT/PATCH for updating.
- Set
Content-Type: application/jsonwhen sending JSON bodies. - Test with a Manual trigger and inspect the Execution Data tab to see the raw response.
- For APIs with built-in TogoFlow integrations (Stripe, GitHub, etc.), prefer the Action node — it handles auth and field mapping for you.