Editorial basis: This guide is derived from official n8n node documentation. Examples are instructional and have not been executed on TemplateFlows’ own n8n instance.
The HTTP Request node connects n8n to REST APIs even when a dedicated integration node does not offer the operation you need. It can send GET and POST requests, attach credentials, map query parameters, send JSON and handle paginated responses. The critical skill is understanding the API contract before configuring the node.
Before you build: read the API contract
Find the provider’s API documentation and identify the base URL, endpoint, HTTP method, authentication type, required headers, request body and response schema. Also check rate limits and pagination. An n8n workflow cannot compensate for an incorrect endpoint or missing permissions.
Example workflow architecture
Use Manual Trigger → HTTP Request → Edit Fields → destination. The destination might be Google Sheets or a database. During development, send requests to a sandbox or test endpoint and avoid modifying live customer records.
Step 1: Configure a GET request
Add an HTTP Request node. Select GET, enter the endpoint from your API provider and use the node’s test action. If the API supports filters, enable Send Query Parameters and add name/value pairs or JSON. Query parameters belong in the request URL; they are not a substitute for authorization.
As a schematic example, an inventory API might support GET https://api.example.com/v1/items?status=active. The api.example.com hostname is a placeholder, not a working service. Replace it with your provider’s real endpoint.
Step 2: Add authentication safely
In Authentication, prefer n8n’s Predefined Credential Type when your provider is supported. Otherwise configure a suitable generic credential such as a header token, basic authentication or OAuth2, as required by the API. Keep secrets in n8n’s credential manager rather than writing API keys into plain-text workflow fields, examples or shared screenshots.
Some APIs use a header such as Authorization: Bearer YOUR_TOKEN; the exact syntax comes from the provider. Never copy a real token into a published workflow JSON file.
Step 3: Send a POST request with JSON
For a create or update endpoint, switch to the method the API specifies, such as POST. Enable Send Body and select the appropriate JSON body format. Map fields from the preceding node, using expressions only after checking the actual input item structure.
Example illustrative body: {"name":"Demo Item","source":"n8n"}. Before using a write operation, test with disposable data and confirm whether the API requires an idempotency key to prevent duplicate records after retries.
Step 4: Handle pagination and batching
Many APIs return only one page of results. The HTTP Request node has Pagination options; configure them according to the API’s page number, cursor or next-link rules. Do not assume all APIs paginate alike. For bulk calls, consider the node’s Batching option and respect documented rate limits.
Track whether the last page is reached, and set a practical cap while testing so a bad pagination condition cannot create an unbounded run.
Step 5: Configure response and error behavior
Inspect the response format and status codes. Set a reasonable Timeout; use redirects or proxy options only when needed. Treat HTTP 401/403 as authentication or authorization issues, 404 as a likely endpoint or resource issue, 429 as a rate-limit response, and 5xx as a provider or upstream failure. These are diagnostic starting points, not universal rules.
For production workflows, add a monitored error path, retry only when safe and avoid logging sensitive response bodies. Replaying a POST can create duplicate objects if the provider does not support idempotency.
Step 6: Import a curl command when useful
The HTTP Request node supports Import curl command. This can help translate a provider’s API example into node settings, but inspect every imported header and field. Remove or move embedded secrets to credentials before saving or sharing the workflow.
Troubleshooting checklist
- 401 Unauthorized: verify token type, expiration and header formatting.
- 403 Forbidden: confirm permissions and scopes.
- 400 Bad Request: compare required JSON fields, types and content type with API docs.
- 429 Too Many Requests: reduce concurrency and implement a provider-compliant retry delay.
- Unexpected empty data: check pagination, query filters and the selected response field.
Related TemplateFlows guides
Official reference
n8n HTTP Request node: parameters, pagination and options
Documentation reviewed: October 2026. Confirm settings against the node version in your workspace.
