Complete "Lesson 1: Introduction to n8n and the Integration Mindset" first to unlock this lesson.Go to previous lesson

Introduction

The HTTP Request node is the Swiss Army knife of n8n. Whenever a built-in integration does not exist for the service you need, this node lets you call any REST API directly — GET, POST, PUT, PATCH, DELETE, all of it. Once the response comes back, n8n gives you the full JSON payload, and you use expressions to pull out exactly the fields you care about.

This lesson walks through the complete cycle: configure the node, fire the request, read the response structure, and wire specific values into the next step of your workflow.

Configuring the HTTP Request Node

Add an HTTP Request node to your canvas, then fill in three things first: the HTTP method, the URL, and authentication (if the API requires it).

For a public endpoint that needs no auth, a minimal GET looks like this in n8n's expression field for the URL:

javascript
https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.1&current_weather=true

For an API that needs a key, go to the Authentication section, choose Header Auth, and set the header name (commonly Authorization) and value (commonly Bearer YOUR_TOKEN). You can store the token in an n8n Credential so it is never hard-coded in the node.

When you need to send a JSON body — for a POST request creating a resource — set the Body Content Type to JSON and write the payload in the Body field:

json
{
"name": "{{ $json.customerName }}",
"email": "{{ $json.customerEmail }}"
}

The double-curly syntax is n8n's expression engine, pulling values from the previous node's output at runtime.

flowchart showing HTTP Request node configuration steps: Method → URL → Authentication → Body → Execute

Reading the Response Structure

After you click Execute Node, n8n displays the response in the Output panel on the right. Every response surfaces three things: status code, headers, and body. By default n8n parses a JSON body automatically and returns it as structured data you can traverse.

Suppose the Open-Meteo API returns this:

json
{
"latitude": 51.5,
"longitude": -0.1,
"current_weather": {
"temperature": 14.2,
"windspeed": 11.3,
"weathercode": 3
}
}

In the Output panel you can click through the tree to see each nested field. This exploration step is important — do it before writing any expression, so you know the exact key path.

If the API returns a non-JSON response (plain text, XML), enable the option Return Full Response and change Response Format to Text, then handle parsing manually in a Code node downstream.

Extracting Data with Expressions

Once you know the structure, you reference fields using n8n's expression syntax in any downstream node. The root of the HTTP Request output is always accessible via the node name.

To grab the temperature from the example above in the next node:

javascript
{{ $node["HTTP Request"].json["current_weather"]["temperature"] }}

Or, if you are inside the node immediately after it (the implicit previous node), use the shorthand:

javascript
{{ $json["current_weather"]["temperature"] }}

When the API returns an array — for example a list of orders — the response body itself is the array, or it is nested under a key like data. To loop over it, connect the HTTP Request node to a Split In Batches node or use the Item Lists node set to Split Out Items, then each downstream execution receives one item at a time.

Here is how you would reference the third item's id field directly without splitting (zero-indexed):

javascript
{{ $json["data"][2]["id"] }}
diagram showing JSON response tree on the left with arrows mapping to expression references on the right side

Common Mistakes

Missing Content-Type header is the most frequent issue when POSTing data. If you set Body Content Type to JSON, n8n adds the header automatically. If you switch to Raw, add the header manually: Content-Type with value application/json.

Another common mistake is trying to reference a field that sits one level deeper than expected. Always use the Output panel to verify the exact path before writing expressions — assumptions about API response shapes are wrong more often than not.

Rate limiting is the third issue. If your workflow runs frequently against the same API, add a Wait node between iterations and check the API docs for the rate limit headers (Retry-After, X-RateLimit-Remaining). n8n does not handle rate limiting automatically.

Summary

The HTTP Request node covers three moves: set the method and URL, authenticate if needed, and send an optional body. After execution, use the Output panel to explore the response tree, then reference specific fields in downstream nodes with expressions using the $json shorthand or $node["NodeName"].json for cross-node access. For array responses, split items before processing them individually. Getting comfortable with this cycle unlocks integration with virtually any REST API in n8n.

Lesson practice

Lesson Checkpoint

Review what you learned and get feedback on your work.

0/7
01What is the correct shorthand expression to access a field called 'status' from the immediately preceding HTTP Request node's JSON response?
02When sending a POST request with a JSON body in n8n's HTTP Request node, which setting must be configured so n8n automatically includes the correct Content-Type header?
03You receive an API response where the data is nested as response.orders[0].id. Which expression correctly retrieves that value in a downstream node?
04An API returns a list of 50 products in a JSON array under the key 'items'. You want to process each product separately in downstream nodes. What is the recommended approach in n8n?
05Where is the best place to explore the exact key path of an API response before writing expressions that reference it?
06You want to pass an API token stored in an n8n Credential as a Bearer token. Which authentication approach in the HTTP Request node is designed for this?
07n8n automatically handles API rate limiting when you run a workflow that calls the same endpoint in rapid succession.
Answered · 0/7