HTTP request node shows a 301 error

Describe the problem/error/question

Hi folks,

Has anyone encountered this problem? I finally got over the CloudFlare issue and set up a Telegram trigger, but the HTTP request shows a 301 error. Not sure how to deal with it :slight_smile:

Thank you :slight_smile:

What is the error message (if any)?

HTTP Code 301

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

ERROR: UNKNOWN ERROR - check the detailed error for more information
4/12/2023, 2:25:14 PM
Data below may contain sensitive information. Proceed with caution when sharing.

"301 - """,
"Error: 301 - "" at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11) at IncomingMessage.emit (node:events:525:35) at IncomingMessage.emit (node:domain:489:12) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)"
NodeApiError: UNKNOWN ERROR - check the detailed error for more information
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1181:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:653:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:590:53

Information on your n8n setup

  • n8n version: Docker image: n8nio/n8n:latest
  • Database (default: SQLite): not using with docker-compose
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker compose with Caddy on DigitalOcean + Cloudflare
  • Operating system: Ubuntu 22.04

A 301 response suggests a redirect takes place which n8n doesnโ€™t handle by default. You would need to specifically add and enable the Redirect option on the HTTP Request node like so:


Let me know if you still face any trouble after doing so :slight_smile:

1 Like

Ohh right. Thank you very much for your quick help :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.