HTTPS Over Proxy
Overview
This node enables making HTTP and HTTPS requests through HTTP proxies, addressing common proxy tunnel issues that the standard HTTP Request node in n8n cannot handle. It supports a wide range of HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS) and allows detailed configuration of request parameters including headers, query parameters, body content, authentication, proxy settings, pagination, batching, and connection pooling.
Typical use cases include:
- Accessing APIs or web services that require routing traffic through corporate or custom HTTP/HTTPS proxies.
- Handling complex authentication schemes with predefined or generic credentials.
- Managing large data retrievals via automatic pagination.
- Uploading files or sending binary data through multipart/form-data or raw body types.
- Overcoming SSL certificate validation issues by optionally ignoring SSL errors.
- Optimizing response data for further processing or cost reduction in workflows involving large responses.
Practical examples:
- Making authenticated API calls to a service behind a corporate proxy.
- Uploading files to a remote server using multipart form data while routing through a proxy.
- Fetching paginated data from an API that provides next-page URLs in the response.
- Sending JSON payloads with custom headers and handling redirects automatically.
Properties
| Name | Meaning |
|---|---|
| curlImport | Import cURL command to auto-fill request parameters. |
| Method | HTTP method to use: DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT. |
| URL | The target URL for the HTTP request. Must be a valid HTTP or HTTPS URL. |
| Authentication | Authentication method: None, Predefined Credential Type (many services supported), Generic Credential Type (customizable like basic, header, OAuth2). |
| Credential Type | Select credential for predefined authentication (shown only if Predefined Credential Type is selected). |
| Generic Auth Type | Select generic authentication type (basic, bearer token, digest, header, query, custom) when Generic Credential Type is selected. |
| Send Query Parameters | Boolean to include query parameters in the request URL. |
| Specify Query Parameters | How to specify query parameters: Using Fields Below (name-value pairs) or Using JSON object. |
| Query Parameters | List of query parameters as name-value pairs (if Using Fields Below selected). |
| Query Parameters (JSON) | Query parameters specified as a JSON object (if Using JSON selected). |
| Send Headers | Boolean to include custom headers in the request. |
| Specify Headers | How to specify headers: Using Fields Below (name-value pairs) or Using JSON object. |
| Headers | List of headers as name-value pairs (if Using Fields Below selected). |
| Headers (JSON) | Headers specified as a JSON object (if Using JSON selected). |
| Send Body | Boolean indicating if the request has a body. |
| Content Type | Format of the request body: Form-Urlencoded, Form-Data (multipart), JSON, n8n Binary File, Raw text. |
| Specify Body | How to specify body parameters for JSON or form-urlencoded: Using Fields Below (name-value pairs) or Using JSON object. |
| Body Parameters | Body parameters as name-value pairs (for JSON, form-urlencoded, or multipart-form-data). For multipart, supports binary file upload from workflow data. |
| Body Parameters (JSON) | Body parameters as a JSON object (for JSON or form-urlencoded). |
| Input Data Field Name | Name of the incoming field containing binary file data to send (for binary data body type). |
| Raw Content Type | Content-Type header for raw body data (e.g., text/plain, application/xml). |
| Body | Raw text content to send in the request body (for raw content type). |
| Options | Collection of additional options: |
| - Allow Internal Network Access | Whether to allow access to internal network addresses (localhost, 127.0.0.1, private IP ranges). Disabled by default for security. |
| - Batching | Control batch size and interval between batches to avoid overwhelming target servers. |
| - Proxy | Configure HTTP/HTTPS proxy server URL and optional authentication credentials. |
| - Ignore SSL Issues | Whether to ignore SSL certificate validation errors (insecure, recommended only for trusted environments). |
| - Lowercase Headers | Convert all response header names to lowercase for consistent handling. |
| - Redirects | Control following HTTP redirects and max number of redirects. |
| - Full Response | Return full response object including status code, headers, etc., instead of just response body. |
| - Never Error | Treat HTTP error status codes (4xx, 5xx) as successful responses instead of throwing errors. |
| - Response Format | How to interpret response data: Autodetect, File (binary), JSON, Text. |
| - Put Output in Field | Name of output field to put binary file data or text in (for File or Text response formats). |
| - Timeout | Request timeout in milliseconds (default 30000 ms). Increase if proxy or target is slow. |
| - Connection Pool | Settings for HTTP connection pooling: enable keep-alive, max sockets per host, max free sockets per host. |
| - Pagination | Automatic handling of paginated API responses with modes: Off, Update a Parameter in Each Request, Response Contains Next URL. Includes controls for completion conditions, limits, and intervals between requests. |
| - Optimize Response | Enable response optimization to reduce data size for downstream processing. Supports JSON, HTML, Text response types with options to select fields, CSS selectors, omit elements, truncate response, and max character length. |
Output
The node outputs an array of items corresponding to each input item processed (or batches if batching enabled). Each output item contains a json property with the response data structured as follows:
If Full Response option is disabled (default):
jsoncontains the parsed response body according to the selected Response Format:- JSON: Parsed JSON object.
- Text: Plain text string under a configurable field name (default "data").
- File: Binary data prepared as a file under a configurable field name (default "data").
- Autodetect: Attempts to parse JSON if content-type indicates JSON; otherwise returns text.
- If response optimization is enabled, the response data may be filtered or truncated accordingly.
If Full Response option is enabled:
jsonincludes:status: HTTP status code.statusText: HTTP status message.headers: Response headers.data: Parsed response body as above.
Additionally, a
$responseproperty is included with metadata:statusCode,statusText,headers,body(raw response body).redirectHistoryif redirects occurred.
If errors occur and Continue On Fail is enabled, output items contain error details in
json.Binary data can be sent in the request body (upload) and received in the response (file response format).
Dependencies
- Requires an active internet connection or network access to the target URL and proxy server.
- Supports various authentication methods requiring appropriate credentials configured in n8n (API keys, OAuth tokens, basic auth, etc.).
- Uses Axios HTTP client internally.
- Supports HTTP/HTTPS proxy servers with optional authentication.
- Optional environment variable
NODE_TLS_REJECT_UNAUTHORIZEDis set dynamically based on SSL ignore setting. - No external dependencies beyond those bundled with n8n.
Troubleshooting
Common Issues
- Proxy connection failures: Errors like "tunneling socket could not be established" often indicate incorrect proxy URL, missing port, or proxy server unreachable.
- Timeouts: Requests may time out if the target server or proxy is slow. Increase the timeout setting.
- SSL certificate errors: Self-signed or invalid certificates cause errors unless "Ignore SSL Issues" is enabled.
- Invalid URLs: Malformed URLs cause immediate errors.
- Internal network access blocked: By default, requests to localhost or private IPs are blocked for security. Enable the option explicitly if needed.
- Authentication errors: Misconfigured credentials or unsupported auth types cause failures.
Error Messages and Solutions
"Request canceled due to timeout": Increase the timeout value in node options."Unable to connect to proxy server: host not found": Verify proxy hostname or try IP address."Proxy server connection refused": Check if proxy server is running and port is correct."Proxy server connection timeout": Check network connectivity and proxy availability."SSL certificate error": Enable "Ignore SSL Issues" if you trust the server."Invalid proxy address format": Use correct proxy URL format likehttp://myproxy:3128."Invalid URL": Correct the target URL syntax."Response is not valid JSON": Change response format to "Auto-detect" or "Text" if response is not JSON.