How to Use HTTP Node in n8n | Connect Any API or Service in n8n

Learn How to Use HTTP Node in n8n | Connect Any API or Service in n8n in this comprehensive n8n tutorial. Step-by-step guide with video, code examples, and expert tips from the n8n Zero to Hero course.

Table of Contents

Overview

This lesson is part of the n8n AI Automation - Zero to Hero course, Section: 3. Deep Dive Concepts.

Watch the video above for the full tutorial, or read the written guide below.

What is the HTTP Request node in n8n?

The HTTP Request node is n8n's built-in API client, comparable to Postman, that lets you make GET, POST, PUT, and DELETE requests to any external service with a REST API. It's the correct tool when no dedicated n8n integration exists for the app you want to connect. You configure a method, URL, authentication, query parameters, headers, and an optional request body, then the node returns the response data for downstream use in your workflow.

How do you configure the HTTP Request node in n8n?

The HTTP Request node offers two configuration paths. The first is parameter-by-parameter: set the Method (GET to fetch data, POST to create, PUT to update, DELETE to remove), paste the API's endpoint URL, choose an authentication type, and add any query parameters or headers the API requires. For the AccuWeather one-day forecast API, that means selecting GET, pasting the location-specific endpoint URL, leaving authentication as None, turning on query parameters, and adding the apikey field with your key. The node executes and returns the forecast response (minimum and maximum temperature, conditions) for the requested location.

Authentication splits into two buckets. Predefined credential types cover popular services n8n already supports, including Airtable and Slack, so you pick the service name and supply your credentials. Generic credential types handle everything else: Basic (username and password), Bearer Token, and OAuth2. When an API authenticates via an API key sent as a query parameter, like AccuWeather, you select None in the authentication field and pass the key in the query parameters section instead, bypassing the credential system entirely.

The second path is Import cURL. Most API documentation pages include a sample cURL command you can copy directly. Paste it into the Import cURL dialog and the node auto-fills the method, URL, query parameters, and headers in one step. The AccuWeather cURL sample produces the same New York forecast result as the manual setup, confirming both paths are equivalent. For complex requests with many parameters or headers, cURL import eliminates the bulk of manual entry. Query parameters and URL segments can also be set dynamically using n8n expressions, letting earlier nodes in your workflow drive the API call.

Key Takeaways

  • The HTTP Request node acts as a Postman-style REST API client inside n8n, covering any service that lacks a dedicated built-in node.
  • GET fetches data, POST sends new data, PUT updates a record, and DELETE removes one. For soft deletes (flagging a record rather than permanently removing it), PUT is the correct method because you're updating, not deleting.
  • Predefined credential types handle popular services n8n already knows (Airtable, Slack, and others). Generic types cover Basic, Bearer Token, and OAuth2 for everything else. API-key-in-query-parameter services like AccuWeather need no credential record at all.
  • The cURL Import option auto-configures the node from a copied cURL command, saving significant setup time for requests with many headers and parameters.
  • Query parameters can be set dynamically with n8n expressions, so values from earlier nodes can populate API call fields at runtime.

Next Steps

Continue your n8n journey with the full n8n AI Automation - Zero to Hero course.

Frequently Asked Questions

The HTTP Request node supports GET, POST, PUT, and DELETE. GET fetches data from an external service, POST sends new data to it, PUT updates an existing record, and DELETE removes one. GET and POST are the most common. For soft deletes, where you flag a record as deleted rather than permanently removing it, PUT is the right choice because you're updating a field, not destroying the record.

The HTTP Request node provides two authentication buckets. Predefined credential types cover popular services n8n has already integrated, such as Airtable and Slack, so you select the service and enter your credentials. Generic credential types cover everything else: Basic (username and password), Bearer Token, and OAuth2. If an API uses an API key passed as a query parameter, like AccuWeather, select None for authentication and add the key in the query parameters section.

Query parameters in the HTTP Request node are name/value pairs appended to the request URL, such as the `apikey` field the AccuWeather forecast API requires. A request body carries data inside the HTTP request itself and is used when the external service requires a structured payload or doesn't support query parameters. The node supports JSON, form URL encoded, form data, and n8n binary file as body content types, with JSON being the most common for REST APIs.

The cURL Import option in the HTTP Request node accepts a cURL command copied from an API documentation page and automatically fills in the method, URL, query parameters, and headers. Pasting the AccuWeather sample cURL command configures the node identically to a manual parameter-by-parameter setup and returns the same forecast response. This is especially useful for complex requests that carry many headers or query parameters, where manual entry is error-prone.

Dheeraj Sharma

Dheeraj Sharma

AI Systems Builder
Creator of the n8n Zero to Hero course (42 lessons, 31+ hours). I help solopreneurs build AI systems that grow revenue without growing workload.

Get the n8n Mastery Bundle

All workflows, cheat sheets, and premium resources from the entire course in one package.

Get Premium Resources