Book Free Demo WhatsApp Us

How to Connect APIs with n8n’s HTTP Request Node

Book a Free Demo

We'll only use these details to contact you about the training. No spam.

By N8N Trainer Team · Published · 5 min read

Quick Answer

The HTTP Request node lets n8n connect to virtually any API, even ones without a dedicated node built for them. Configure the method (GET, POST, PUT, DELETE), any required headers and authentication, and a body for data being sent, then reference the returned JSON response in later nodes using n8n's expressions.

Sooner or later, every serious n8n user hits a service that doesn’t have its own dedicated node. That’s exactly the moment the HTTP Request node earns its keep - it’s the generic, universal connector that lets n8n talk to nearly any API on the internet, dedicated node or not.

This guide covers how APIs work conceptually, then walks through configuring the HTTP Request node with a real worked example.

What Is an API, in Plain Terms?

An API (Application Programming Interface) is just a defined way for two pieces of software to swap data. Instead of a human clicking through a website, your workflow sends a structured request straight to the service’s server and gets a structured response back, usually as JSON. Nearly every modern SaaS product - CRMs, payment processors, messaging platforms, AI providers - exposes an API for exactly this reason.

Core Concepts You Need Before Configuring a Request

Methods

APIs use HTTP methods to signal what kind of action is being requested: GET retrieves data, POST creates something new, PUT/PATCH updates existing data, and DELETE removes it. Getting the method right is the first thing worth checking when a request isn’t behaving.

Headers

Headers carry metadata about the request - most often authentication tokens and the content format being sent (something like application/json). Almost every real API call needs at least one header.

Authentication

Most APIs need proof you’re allowed in. Common methods include API keys (a static token included in a header), OAuth (a guided login flow n8n handles through its credentials system for supported services), and Bearer tokens. n8n’s HTTP Request node supports all of these through its credentials setup.

Body

For POST, PUT, and PATCH requests, the body carries the actual data being sent - usually JSON, structured as key-value pairs matching whatever the API’s documentation asks for.

Reading API Documentation (Without Getting Overwhelmed)

Every API worth using publishes documentation for its available endpoints. You don’t need to read all of it. Focus on three things for the action you want: the endpoint URL, the required method, and the required parameters or body fields. Most documentation includes a working example request, and that example is usually enough to copy directly into the HTTP Request node.

Worked Example: Fetching Weather Data for a Notification Workflow

A simple, realistic case: pulling current weather data from a public weather API for use in a daily notification workflow.

  1. Add an HTTP Request node to your canvas, connected after a trigger (a Schedule Trigger works well).
  2. Set the method to GET, since you’re retrieving data, not creating or changing anything.
  3. Enter the endpoint URL exactly as the weather API provider documents it, including your city or coordinates as a parameter.
  4. Add authentication - most weather APIs need a free API key, added either as a header or a query parameter depending on that provider’s documentation.
  5. Execute the node and check the returned JSON in the data panel - you’ll see fields like temperature, conditions, and forecast data.
  6. Reference the response in a later node using an expression, pulling the temperature value into a formatted message for Slack or email, say.
Method Purpose Typical Use
GET Retrieve data Fetching records, checking status
POST Create new data Submitting a form, creating a record
PUT/PATCH Update existing data Editing a record’s fields
DELETE Remove data Deleting a record

Debugging a Failed Request

  • Check the response status code first - it usually points straight at the category of problem (authentication, missing field, wrong URL).
  • Confirm the method matches what the documentation specifies.
  • Double-check header names and values, especially authentication tokens - a single typo is the most common reason things fail.
  • Verify the body is formatted exactly as the API expects, including required fields.

Why This Node Matters So Much

Dedicated nodes cover the popular services, but the HTTP Request node covers everything else - which in practice means most of the internet. Once you’re comfortable with it, “does n8n support X service?” stops being a blocker, because the answer is almost always yes, through the HTTP Request node, even without a dedicated integration.

This same skill underpins building AI agents that need to call external tools and services as part of their reasoning, and it pairs naturally with webhooks for two-way integrations.

Key Takeaways

  • The HTTP Request node connects n8n to virtually any API, even ones without a dedicated node.
  • Understand method, headers, authentication, and body before configuring your first request.
  • Reading API documentation for just the endpoint, method, and required fields is usually enough to get moving.
  • Status codes are the fastest way to diagnose a failed request.
  • This node is foundational for advanced use cases, including AI agents that call external tools.

Working with APIs hands-on alongside an instructor speeds this up considerably. Book a free n8n demo or explore n8n training to go deeper into real-world API integrations.

Call WhatsApp Free Demo