Is it possible for HTTP Request node to trigger a redirection in NGINX?

Describe the problem/error/question

Tested the url (tried to paste the url but always blocked, this is not promoting but url for redirection) in the browser, it does redirect to the target url.

So I had created a very simple workflow in n8n, Triggered when clicking “Test workflow” node, then followed with HTTP Request node, Method: GET, URL: same as above. The output Node executed successfully, but statusCode 200.

Consulted ChatGPT answered: statusCode 200 means that the request was successful but no redirection was triggered by the HTTP Request node.

Is it possible for HTTP Request node to trigger a redirection in NGINX ?

What is the error message (if any)?

statusCode 200

Please share your workflow

{
“meta”: {
“instanceId”: “b1e44cda4a355207a3921fbf7b887436da8c4b1dde703b668945eef3f059c4cc”
},
“nodes”: [
{
“parameters”: {
“url”: " (tried to paste the url but always blocked, this is not promoting but url for redirection)",
“options”: {
“response”: {
“response”: {
“fullResponse”: true
}
}
}
},
“id”: “e58020a8-3f14-4b41-b4fa-10011aace697”,
“name”: “HTTP Request”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
960,
380
]
}
],
“connections”: {},
“pinData”: {}
}

(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

statusCode 200, expect 301

Information on your n8n setup

  • **n8n version: 1.64.3
  • **Database (default: SQLite): default
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • **Operating system: Windows

Status code 200 means that your request was a success.

It is not an error. I don’t understand, what are you trying to achieve? Can you explain a little more? And what is the problem?

Hi @Azradex

I created an automation workflow to get 2 parameters from WordPress to n8n Webhook node, after comparing the course that the user attempted to take and the courses that the user had enrolled before in Moodle, to determine whether the user needs to attend the Pre-Course or not.

At the last step, I want to use HTTP Request to trigger a redirection to the target url in WordPress if the Pre-Course is needed.

The workflow executed successfully with statusCode 200, means that the request was successful but no redirection was triggered by the HTTP Request node.

Do you have any idea why it is not returning statusCode 301?
Thanks

Ooo, I see it now.

I don’t know why the HTTP request doesn’t do redirection or if it can do it.

But as I understand, you want to redirect the user who calls n8n web hook.

If that is the case you can try “response to web hook”

And use redirection option.

Tried, but did not work.

Did you check if the webhook is set to return with respond block.

Default should be respond immediately.

If it is set to default it would make sense.

Tried both immediately and Using ‘Response to Webhook’ node, but did not work.
Thanks

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