The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "HTTP Request Builder",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "http-request",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-trigger",
"name": "Webhook Input",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"jsCode": "// Build HTTP request configuration\nconst input = $input.first().json.body || $input.first().json;\n\n// Default configuration\nconst config = {\n method: input.method || 'GET',\n url: input.url,\n headers: input.headers || {},\n timeout: input.timeout || 30000,\n retry: {\n maxAttempts: input.retry?.maxAttempts || 3,\n backoffMultiplier: input.retry?.backoffMultiplier || 2,\n initialDelay: input.retry?.initialDelay || 1000\n }\n};\n\n// Add body for POST/PUT/PATCH\nif (['POST', 'PUT', 'PATCH'].includes(config.method)) {\n config.body = input.body || {};\n}\n\n// Validate required fields\nif (!config.url) {\n throw new Error('URL is required');\n}\n\nreturn {\n config,\n attempt: 0,\n startTime: Date.now()\n};"
},
"id": "build-request",
"name": "Build Request",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
450,
300
]
},
{
"parameters": {
"method": "={{ $json.config.method }}",
"url": "={{ $json.config.url }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": "={{ ['POST', 'PUT', 'PATCH'].includes($json.config.method) }}",
"bodyParameters": {
"parameters": [
{
"name": "body",
"value": "={{ JSON.stringify($json.config.body) }}"
}
]
},
"options": {
"timeout": "={{ $json.config.timeout }}"
}
},
"id": "http-request",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
650,
300
]
},
{
"parameters": {
"jsCode": "// Process response\nconst response = $input.first().json;\nconst previous = $('Build Request').first().json;\n\nconst duration = Date.now() - previous.startTime;\n\n// Check for errors\nif (response.statusCode >= 400) {\n const errorType = \n response.statusCode === 429 ? 'RATE_LIMIT' :\n response.statusCode >= 500 ? 'SERVER' :\n 'VALIDATION';\n \n return {\n success: false,\n error: {\n type: errorType,\n message: response.message || 'Request failed',\n statusCode: response.statusCode,\n attempt: previous.attempt + 1,\n maxAttempts: previous.config.retry.maxAttempts,\n retryable: response.statusCode === 429 || response.statusCode >= 500\n },\n duration,\n config: previous.config\n };\n}\n\n// Success\nreturn {\n success: true,\n data: response,\n metadata: {\n statusCode: response.statusCode || 200,\n duration,\n attempt: previous.attempt + 1\n }\n};"
},
"id": "parse-response",
"name": "Parse Response",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
850,
300
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "retry-condition",
"leftValue": "={{ $json.success }}",
"rightValue": false,
"operator": {
"type": "boolean",
"operation": "equals"
}
},
{
"id": "retryable",
"leftValue": "={{ $json.error.retryable }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "equals"
}
},
{
"id": "attempts-left",
"leftValue": "={{ $json.error.attempt }}",
"rightValue": "={{ $json.error.maxAttempts }}",
"operator": {
"type": "number",
"operation": "smaller"
}
}
],
"combinator": "and"
}
},
"id": "should-retry",
"name": "Should Retry?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1050,
300
]
},
{
"parameters": {
"amount": 5,
"unit": "seconds"
},
"id": "wait-node",
"name": "Wait (Backoff)",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
1250,
200
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify($json) }}",
"options": {}
},
"id": "respond-node",
"name": "Respond",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1250,
400
]
}
],
"connections": {
"Webhook Input": {
"main": [
[
{
"node": "Build Request",
"type": "main",
"index": 0
}
]
]
},
"Build Request": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Parse Response",
"type": "main",
"index": 0
}
]
]
},
"Parse Response": {
"main": [
[
{
"node": "Should Retry?",
"type": "main",
"index": 0
}
]
]
},
"Should Retry?": {
"main": [
[
{
"node": "Wait (Backoff)",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond",
"type": "main",
"index": 0
}
]
]
},
"Wait (Backoff)": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 0,
"updatedAt": "2026-03-02T19:00:00.000Z",
"versionId": "1"
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
HTTP Request Builder. Uses httpRequest. Webhook trigger; 7 nodes.
Source: https://github.com/kcurtet/n8n-workflows/blob/4c219a8a1bf2c2d5f89cf34542ce0f5b26c870ef/templates/http-request-builder/workflow.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.
This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c