Back to n8n Fundamentals
n8n Fundamentals

How to Use the HTTP Request Node

Making API calls to any service. GET, POST, auth headers, body mapping.

How to Use the HTTP Request Node

The HTTP Request node is n8n's Swiss Army knife for API integration. You'll use it to connect to Clio, QuickBooks, Salesforce, or any service with a REST API

. This guide shows you exactly how to configure GET and POST requests, handle authentication, and map response data.

No theory. Just the specific settings you need to make API

calls work.

When to Use the HTTP Request Node

Use the HTTP Request node when:

  • n8n doesn't have a pre-built node for your service
  • You need custom API
    endpoints the pre-built node doesn't support
  • You're building internal integrations with your firm's custom systems
  • You need precise control over headers, authentication, or request formatting

Skip it when a dedicated node exists (Slack, Google Sheets, etc.). Those nodes handle authentication and data formatting automatically.

Core Configuration Fields

Open any HTTP Request node and you'll see these sections:

Method: GET (retrieve data), POST (create records), PUT (update entire records), PATCH (update specific fields), DELETE (remove records).

URL: The full API

endpoint. Example: https://api.clio.com/v4/matters.json

Authentication: Where you configure API

keys, OAuth tokens, or basic auth credentials.

Headers: Key-value pairs for content type, custom authorization, or API

versioning.

Body: The data payload for POST/PUT/PATCH requests.

Query Parameters: URL parameters like ?status=active&limit=50

Options: Timeout settings, redirect handling, SSL verification toggles.

Making a GET Request

GET requests retrieve data. Here's how to pull active matters from Clio:

  1. Add HTTP Request node to your canvas
  2. Set Method to GET
  3. Enter URL: https://app.clio.com/api/v4/matters.json
  4. Click Add Authentication > Header Auth
  5. Set Header Name: Authorization
  6. Set Header Value: Bearer YOUR_ACCESS_TOKEN
  7. Under Query Parameters, click Add Parameter
  8. Set Name: fields, Value: id,display_number,description,status
  9. Add another parameter: Name: status, Value: Open

Execute the node. You'll get a JSON array of open matters with only the fields you specified.

Common GET mistakes:

  • Forgetting to URL-encode query parameters with special characters
  • Not setting the Accept: application/json header when APIs
    support multiple formats
  • Hardcoding pagination limits instead of using loop nodes for complete data pulls

Making a POST Request

POST requests create new records. Here's how to create a time entry in Clio:

  1. Add HTTP Request node
  2. Set Method to POST
  3. Enter URL: https://app.clio.com/api/v4/activities.json
  4. Configure authentication (same as GET example)
  5. Under Headers, click Add Header
  6. Set Name: Content-Type, Value: application/json
  7. Under Body, select JSON
  8. Enter this structure:
{
  "data": {
    "type": "TimeEntry",
    "date": "`{{$now.format('yyyy-MM-dd')}}`",
    "quantity": "`{{$json.hours}}`",
    "price": "`{{$json.rate}}`",
    "matter": {
      "id": "`{{$json.matter_id}}`"
    },
    "user": {
      "id": "`{{$json.user_id}}`"
    },
    "note": "`{{$json.description}}`"
  }
}

This assumes previous nodes output hours, rate, matter_id, user_id, and description fields.

POST request checklist:

  • Always set Content-Type: application/json header
  • Wrap your data in the API
    's required structure (some use data, others use payload or no wrapper)
  • Test with static values first, then replace with dynamic expressions
  • Check the API
    docs for required vs. optional fields

Authentication Methods

API
Key in Header

Most modern APIs

use this approach:

  1. Authentication: Header Auth
  2. Header Name: X-API-Key (or Authorization, check docs)
  3. Header Value: YOUR_API_KEY

Bearer Token

OAuth2 APIs

typically use bearer tokens:

  1. Authentication: Header Auth
  2. Header Name: Authorization
  3. Header Value: Bearer YOUR_ACCESS_TOKEN

Basic Auth

Older APIs

use username/password:

  1. Authentication: Basic Auth
  2. Username: your_username
  3. Password: your_password

n8n automatically encodes these as Base64 in the Authorization header.

OAuth2

For services like Microsoft Graph or QuickBooks:

  1. Authentication: OAuth2
  2. Grant Type: Authorization Code
  3. Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
  4. Access Token URL: https://login.microsoftonline.com/common/oauth2/v2.0/token
  5. Client ID: From your app registration
  6. Client Secret: From your app registration
  7. Scope: https://graph.microsoft.com/.default

Click Connect my account and complete the OAuth flow. n8n stores and refreshes tokens automatically.

Dynamic Body Mapping

Pull data from previous nodes using expressions. If a Webhook node receives this JSON:

{
  "client_name": "Acme Corp",
  "email": "legal@acme.com",
  "matter_type": "Corporate"
}

Map it to your API

's format:

{
  "contact": {
    "name": "`{{$json.client_name}}`",
    "email_addresses": [
      {
        "address": "`{{$json.email}}`",
        "default_email": true
      }
    ]
  },
  "matter": {
    "description": "`{{$json.matter_type}}` matter for `{{$json.client_name}}`"
  }
}

Expression tips:

  • Use {{$json.field_name}} for data from the previous node
  • Use {{$node["Node Name"].json.field}} to reference specific nodes
  • Use {{$now.format('yyyy-MM-dd')}} for current date
  • Use {{$json.amount.toFixed(2)}} for number formatting

Handling Arrays and Loops

APIs

often return arrays. To process each item:

  1. HTTP Request node fetches array of matters
  2. Add Split In Batches node after it
  3. Set Batch Size to 1
  4. Process each matter individually in subsequent nodes
  5. Loop back to Split In Batches until complete

For sending arrays in POST bodies:

{
  "time_entries": [
    {{$json.entries.map(e => `{
      "date": "${e.date}",
      "hours": ${e.hours},
      "matter_id": ${e.matter_id}
    }`).join(',')}}
  ]
}

This maps an array from a previous node into the API

's expected format.

Response Handling

By default, n8n passes the entire API

response to the next node. To extract specific data:

Option 1: Use Set node

After HTTP Request, add a Set node:

  • Keep only: data.id, data.attributes.name, data.attributes.status

Option 2: Use expressions in subsequent nodes

Reference nested response data:

  • {{$json.data[0].attributes.client_name}}
  • {{$json.included.find(i => i.type === 'User').attributes.email}}

Option 3: Enable "Ignore SSL Issues" for internal APIs

Under Options > SSL Certificates, toggle Ignore SSL Issues if you're hitting internal APIs

with self-signed certificates. Never use this for production external APIs
.

Error Handling

Add an Error Trigger node to catch failed requests:

  1. Add Error Trigger node to canvas
  2. Connect it to a Slack or email notification node
  3. In the HTTP Request node, under Options, set:
    • Timeout: 30000 (30 seconds)
    • Retry on Fail: Yes
    • Max Tries: 3
    • Wait Between Tries: 5000 (5 seconds)

This retries transient failures (network hiccups, rate limits) before triggering your error handler.

Rate Limiting

APIs

limit request frequency. Handle this:

  1. Add Wait node between HTTP Request and loop nodes
  2. Set wait time based on API
    limits (e.g., 1000ms for 60 requests/minute)
  3. For burst limits, use Split In Batches with appropriate batch sizes

Example: QuickBooks allows 500 requests per minute. Set batch size to 400 and wait 60 seconds between batches.

Testing Checklist

Before deploying:

  • [ ] Test with invalid authentication (should fail gracefully)
  • [ ] Test with malformed request body (check error messages)
  • [ ] Test with missing required fields
  • [ ] Verify response data structure matches your expectations
  • [ ] Check that dynamic expressions resolve correctly
  • [ ] Test error handling with intentionally broken requests
  • [ ] Confirm rate limiting doesn't break your workflow

Use n8n's Execute Node button to test individual nodes without running the entire workflow.

Common Patterns

Pagination loop:

  1. HTTP Request with ?page=1&limit=100
  2. Set node to increment page counter
  3. IF node: Does response have data?
  4. Loop back to HTTP Request if yes
  5. Continue workflow if no

Conditional requests:

  1. IF node checks condition
  2. True branch: HTTP Request to API
    A
  3. False branch: HTTP Request to API
    B
  4. Merge node combines results

Batch processing:

  1. Trigger pulls 500 records
  2. Split In Batches (50 per batch)
  3. HTTP Request processes batch
  4. Wait 10 seconds
  5. Loop until complete

The HTTP Request node handles 90% of API

integration scenarios. Master these patterns and you'll connect any service to your workflows.

Revenue Institute

Reviewed by Revenue Institute

This guide is actively maintained and reviewed by the implementation experts at Revenue Institute. As the creators of The AI Workforce Playbook, we test and deploy these exact frameworks for professional services firms scaling without new headcount.

Revenue Institute

Need help turning this guide into reality? Revenue Institute builds and implements the AI workforce for professional services firms.

RevenueInstitute.com