n8n HTTP Request Node guide - browser to server API request flow illustration
Tutorial

n8n HTTP Request Node: Complete Documentation & Guide (2026)

14 min read

Quick Summary

  • The HTTP Request node connects n8n to any API with all HTTP methods, auth types, and response formats
  • Authentication includes API Key, Bearer Token, OAuth2, and Basic Auth
  • Use Continue on Fail and error workflows for resilient automations
  • Paginated API calls use Loop Over Items paired with HTTP Request
  • Synta generates complete HTTP Request configs from plain English

The n8n HTTP Request node is the most versatile node in the entire platform. It connects your workflows to any REST API, webhook, or external service that speaks HTTP. If an app doesn't have a dedicated n8n integration, the HTTP Request node is how you talk to it.

This guide covers everything you need to configure it properly - methods, authentication, headers, body data, pagination, and error handling. No guesswork.

What does the n8n HTTP Request node do?

The HTTP Request node sends HTTP requests to any URL and returns the response data to your workflow. It supports GET, POST, PUT, PATCH, and DELETE methods with full control over headers, query parameters, authentication, and request body. Think of it as n8n's universal API connector.

You'll use it when: - The service you need doesn't have a dedicated n8n node - You need to call a custom API or internal service - You want to hit a webhook endpoint - You need more control than a pre-built integration offers

How do I configure HTTP methods?

The HTTP Request node supports five standard HTTP methods. Each serves a different purpose:

Method | Purpose | When to Use

**GET** | Retrieve data | Fetching records, reading API responses, checking status

**POST** | Create data | Submitting forms, creating records, sending payloads

**PUT** | Replace data | Full updates to existing records

**PATCH** | Partial update | Updating specific fields on a record

**DELETE** | Remove data | Deleting records or resources

Set the method in the node's Method dropdown. The URL field accepts both static URLs and expressions:

https://api.example.com/v1/users

Or dynamically with expressions:

https://api.example.com/v1/users/{{ $json.userId }}

How do I authenticate with the HTTP Request node?

Authentication is where most people get stuck. The HTTP Request node supports several auth methods, and picking the right one depends on the API you're connecting to.

API Key Authentication

Most APIs use API keys. Configure this under Authentication → Generic Credential Type → Header Auth or Query Auth.

Header Auth (most common):

{
"name": "X-API-Key",
"value": "your-api-key-here"
}

Some APIs want the key as Authorization: ApiKey your-key or a custom header like X-Api-Token. Check the API docs for the exact header name.

Query Auth (less common, less secure):

{
"name": "api_key",
"value": "your-api-key-here"
}

This appends ?api_key=your-key to the URL. Avoid this for sensitive keys since they show up in server logs.

Bearer Token Authentication

For APIs using OAuth tokens or JWTs:

1. Set Authentication → Generic Credential Type → Header Auth 2. Name: Authorization 3. Value: Bearer your-token-here

Or use the dedicated Bearer Auth credential type which handles the Bearer prefix automatically.

OAuth2 Authentication

For services like Google, GitHub, Slack, and other OAuth2 providers:

1. Set Authentication → OAuth2 2. Create a new OAuth2 credential 3. Fill in: - Client ID and Client Secret (from the service's developer console) - Authorization URL (where users grant access) - Access Token URL (where n8n exchanges the code for a token) - Scope (permissions you need)

{
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
"accessTokenUrl": "https://oauth2.googleapis.com/token",
"scope": "https://www.googleapis.com/auth/spreadsheets"
}

OAuth2 handles token refresh automatically in n8n. Once configured, you don't need to manage tokens manually.

Basic Auth

For APIs using username/password:

1. Set Authentication → Generic Credential Type → Basic Auth 2. Enter username and password

n8n encodes these as a Base64 Authorization: Basic header automatically.

How do I send headers and query parameters?

Custom Headers

Add headers under Options → Headers. Common ones:

{
"Content-Type": "application/json",
"Accept": "application/json",
"X-Custom-Header": "value"
}

Headers are sent with every request. Use them for API versioning (Accept: application/vnd.api+json), content negotiation, or custom metadata.

Query Parameters

Add query params under Options → Query Parameters:

{
"page": "1",
"limit": "100",
"sort": "created_at",
"order": "desc"
}

These append to the URL as ?page=1&limit=100&sort=created_at&order=desc. You can use expressions here too:

{{ $json.nextPage }}

How do I send JSON body data?

For POST, PUT, and PATCH requests, you'll usually send a JSON body.

1. Set Body Content Type → JSON 2. Choose between From Fields or Using JSON

Using JSON (recommended for complex payloads):

{
"name": "{{ $json.customerName }}",
"email": "{{ $json.email }}",
"plan": "pro",
"metadata": {
"source": "n8n-automation",
"created_at": "{{ $now.toISO() }}"
}
}

From Fields works for flat key-value pairs but gets messy with nested objects. Use JSON mode for anything beyond simple fields.

Sending Form Data

For APIs expecting multipart/form-data or application/x-www-form-urlencoded:

1. Set Body Content Type → Form-URL Encoded or Multipart Form Data 2. Add fields as key-value pairs

Multipart is required when uploading files alongside other data.

How do I handle errors with the HTTP Request node?

APIs fail. Servers go down. Rate limits get hit. Your workflows need to handle this gracefully.

Continue on Fail

The "Continue on Fail" setting is the single most important error handling option. Enable it under the node's Settings tab.

When enabled: - The workflow continues executing even if the HTTP request returns a 4xx or 5xx error - The error details are available in the output for the next node to handle - Your workflow doesn't crash at 3am because an API had a hiccup

When disabled (default): - Any HTTP error stops the entire workflow - The error triggers your Error Workflow (if configured)

Error Workflow Pattern

For production workflows, combine Continue on Fail with an IF node:

HTTP Request (Continue on Fail: ON)
→ IF node (check $json.error or status code)
→ True (error): Send Slack alert / retry / log
→ False (success): Continue normal flow

Retry on Fail

Under Settings, you can also configure: - Retry On Fail: Automatically retry failed requests - Max Retries: How many times to retry (default: 3) - Wait Between Retries: Milliseconds between attempts

For rate-limited APIs, set wait time to match the API's rate limit window (often 1000ms or more).

Status Code Handling

Check the response status code to handle different error types:

// In a Function node after HTTP Request
const statusCode = $json.statusCode;

if (statusCode === 429) {
// Rate limited - wait and retry
return { shouldRetry: true, waitMs: 2000 };
} else if (statusCode >= 500) {
// Server error - alert the team
return { shouldAlert: true, error: 'Server error' };
} else if (statusCode === 401) {
// Auth expired - refresh token
return { shouldRefresh: true };
}

What are some real-world HTTP Request examples?

Example 1: Fetching data from a REST API

Pull user data from a CRM API on a schedule:

Schedule Trigger (every hour)
→ HTTP Request (GET https://api.crm.com/v1/contacts?updated_since=1h)
→ Split In Batches
→ Process each contact

Configuration: - Method: GET - URL: https://api.crm.com/v1/contacts - Auth: Header Auth with API key - Query Params: updated_since={{ $now.minus(1, 'hour').toISO() }}

Example 2: Posting data to a webhook

Send processed data to a downstream service:

Trigger → Transform data → HTTP Request (POST)

Configuration: - Method: POST - URL: https://hooks.service.com/webhook/abc123 - Body: JSON with the transformed payload - Headers: Content-Type: application/json

Example 3: Paginated API calls

Many APIs return results in pages. Use the Loop Over Items node:

Set page = 1
→ Loop
→ HTTP Request (GET /api/items?page={{ $json.page }})
→ IF (results.length > 0)
→ True: Increment page, continue loop
→ False: Break loop
→ Merge all results

This pattern works for any paginated API. Adjust the pagination logic based on whether the API uses page numbers, cursors, or offset/limit.

What are common HTTP Request node errors and fixes?

Error | Cause | Fix

`ECONNREFUSED` | Target server is down or URL is wrong | Verify the URL, check if the service is running

`401 Unauthorized` | Invalid or expired credentials | Refresh your API key or OAuth token

`403 Forbidden` | Missing permissions or IP not whitelisted | Check API permissions, verify IP allowlist

`429 Too Many Requests` | Rate limit exceeded | Add wait time between requests, reduce batch size

`ETIMEDOUT` | Request took too long | Increase timeout in Settings, check network

`SSL Error` | Certificate issue | Enable "Ignore SSL Issues" in Settings (dev only)

Pro tip: Enable Response → Include Full Response to see headers, status code, and body together. This makes debugging much easier.

Frequently Asked Questions

Can I use the HTTP Request node to upload files?

Yes. Set Body Content Type to "Multipart Form Data" and use the binary data from a previous node (like Read Binary File) as the file field. The node handles the multipart encoding automatically.

How do I handle APIs that return XML instead of JSON?

Set Response Format to Text, then use a Function node or XML node to parse the response. Most modern APIs return JSON, but legacy systems often use XML.

What's the maximum timeout for an HTTP request in n8n?

The default timeout is 300 seconds (5 minutes). You can adjust this in the node's Settings under Timeout. For long-running API calls, increase this value. For production workflows, keep it reasonable and handle timeouts with Continue on Fail.

Can I send multiple HTTP requests in parallel?

Not within a single HTTP Request node. But you can use the Split In Batches node upstream to process items concurrently. Set the batch size to control parallelism.

How do I chain multiple API calls where the second depends on the first?

Connect HTTP Request nodes in sequence. The output of the first node is available as $json in the second node's URL, headers, and body expressions. For example: first call gets a user ID, second call fetches that user's details.

Building HTTP Request configurations manually gets repetitive, especially for complex APIs with nested auth and pagination. Synta generates complete n8n workflows from plain English - including HTTP Request nodes with the right auth, headers, and error handling configured automatically. Describe what you need, and Synta's MCP tools build it for you.