The HTTP Request node is arguably the most powerful node in n8n. It lets you connect to any REST API in existence — not just the services with dedicated nodes. If the service has an HTTP API (and they all do), you can integrate it with n8n using this node.
In this guide we go deep on every aspect: methods, headers, authentication strategies, pagination handling, error management, and real-world examples with OpenAI, Stripe, and GitHub APIs.
Describe your API integration in plain English at Scriflow and get a complete n8n workflow JSON with the HTTP Request node pre-configured.
HTTP Request Node Overview
The HTTP Request node lives in the Core section of n8n's node library. It handles all standard HTTP verbs and supports virtually every authentication scheme used by modern APIs.
Basic Node Configuration
Every HTTP Request node needs at minimum a Method and a URL. Here's how to configure a basic GET request:
Setting Headers
Most APIs require specific headers. You can add them in the Headers section of the node. Common headers include:
Sending a Request Body
For POST/PUT/PATCH requests, configure the body in the Body section. Set Content Type to JSON and provide the payload:
Authentication Methods
This is where most workflows live or die. The HTTP Request node supports all major authentication patterns:
| Auth Method | Header Sent | Best For |
|---|---|---|
| API Key (Header) | X-API-Key: your_key | Internal tools, many SaaS APIs |
| API Key (Query Param) | ?api_key=your_key | Legacy APIs, maps APIs |
| Bearer Token | Authorization: Bearer token | JWTs, most modern REST APIs |
| Basic Auth | Authorization: Basic base64(u:p) | GitHub PAT, Jira, older services |
| OAuth2 | Authorization: Bearer access_token | Google, Salesforce, HubSpot |
| Digest Auth | WWW-Authenticate handshake | Legacy enterprise systems |
API Key Authentication
The simplest option. Select Predefined Credential Type → HTTP Header Auth or use Generic Auth to inject the key manually:
Bearer Token Authentication
OAuth2 Authentication
For OAuth2, create a dedicated credential in n8n's Credentials section first. The node will automatically refresh tokens before they expire — a major advantage over manual token management.
Always store API keys as n8n credentials, never hardcode them in node parameters. Credentials are encrypted at rest and can be shared across workflows without exposing the raw value.
Handling JSON Responses
By default, n8n parses JSON responses automatically. The response data is available on the next node as $json. For nested objects, use dot notation in expressions:
Working with Arrays in Responses
When an API returns an array of items, enable Split Into Items in the node's output settings. This converts the array into individual n8n items, allowing downstream nodes to process each one independently:
Pagination with Split In Batches
APIs often return paginated results. n8n handles this elegantly using a loop pattern with Split In Batches:
Cursor-Based Pagination Pattern
- Set an initial
pageorcursorvalue using a Set node. - Make the HTTP Request with the current page parameter.
- Use an IF node to check if
next_cursorexists in the response. - If yes — update the cursor with a Set node and loop back to step 2.
- If no — continue to downstream processing.
When paginating through large datasets, add a Wait node (e.g. 500ms) between requests to avoid hitting rate limits. Most APIs limit to 100–1000 requests/minute.
Error Handling
By default, if an API returns a 4xx or 5xx status code, n8n throws an error and stops the workflow. You have two strategies for handling this gracefully:
Strategy 1: Continue on Error
In the node's settings, enable Continue on Error. The node outputs the error details as a regular item, allowing you to route errors differently:
Strategy 2: Retry on Fail
Enable Retry on Fail to automatically retry failed requests. Configure max retries (2–3) and wait between retries (1000ms+). This is ideal for handling transient 429 (Rate Limited) or 503 (Service Unavailable) errors.
Using Expressions in URL and Body
Expressions make the HTTP Request node dynamic. Here are the most useful patterns:
Real-World API Examples
Example 1: OpenAI Chat Completions
Example 2: Stripe Create Customer
Example 3: GitHub Create Issue
Debugging Tips
- Use the test execution button: Run the node individually to inspect the raw request and response without triggering the whole workflow.
- Check the input panel: Verify that expressions resolve to the correct values before the request fires.
- Enable "Full Response": In node settings, enable this option to access status codes, headers, and full body — crucial for debugging 4xx errors.
- Log to a Code node: Temporarily add a Code node after the HTTP Request to
console.log($input.all())and inspect the raw output. - Test with a Mock API: Use services like httpbin.org to test your request format before hitting the real API.
Frequently Asked Questions
{{ $binary.data }} expression.