Http request 502 bad gateway cloudflare error

Hey i havnt shared my workflow as i only made it to the second step lol im having issues with using the http request to access my opencart stores api and get products.

I keep getting 502 bad gateway cloudflare error

Previously it seemed to just scrape my home page but not the all the products like im aiming for

Im trying to create a n8n workflow to import all my products from opencart using opencarts api so i can use ai to rewrite all my product discriptions

Then use the opencart api to update the products discriptions

i have 6000 plus products listed on my store so i set pagination and limited it to 100 products at a time.

Any advice would be greatly appreciated! :slight_smile:

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n locally via Docker,
  • **Operating system: windows 11{ "name": "My workflow", "nodes": [ { "parameters": {}, "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ -500, -100 ], "id": "bd1c6e79-127d-46dd-9f60-57a82c1c66cb", "name": "When clicking ‘Test workflow’" }, { "parameters": { "url": "https://www.perfectlynaughty.co.uk/index.php?", "authentication": "genericCredentialType", "genericAuthType": "httpBasicAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "route=api/rest/", "value": "QlBbEPCMeMW3aAoeC6ivDLbgAUZRibXlIbZqMX6qfPkiKDzo7jvpMsbEBEJf0nKo7iQWtzQfGxG87piGsW6HmchrDEmQ7hQ3OsoilCFEHHQQf3Qguo6gg8T7BeaELwNf7tmrpaKEZO2ge3zFRprGP74Xl60obaDrRgaXumCyZN6wmHejTr8bogrXYchwWwlEbU35WfDocMZ4JWdiHNvOuRakCN4RMQpvXrOG3B1g0uGrlKC3MxTwfnjSsxQTIZyd" } ] }, "options": {} }, "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ -280, -100 ], "id": "86830404-d347-4bd1-8c8b-3a12c3f02e51", "name": "HTTP Request", "credentials": { "httpBasicAuth": { "id": "eeN0HjkJUtbZiMzo", "name": "Unnamed credential" } } } ], "pinData": {}, "connections": { "When clicking ‘Test workflow’": { "main": [ [ { "node": "HTTP Request", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1" }, "versionId": "d9fbe562-906e-44d2-868b-3937e8f26a5f", "meta": { "templateCredsSetupCompleted": true, "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a" }, "id": "4TxGHJVIdtBej21j", "tags": [] }

Can you provide the http node setup pasted into the ‘</>’ field on forums where the entry appears?

You most likely have a wrong url, a parameter/field was missing/misspelled, or the credentials have an issue.

1 Like

first of all thank you for your advice :slight_smile: im hoping it is a easy fix i have spent days trying to get it right. i have attached my workflow as you suggested i tryed it again just now and it seems to be giving me everything off my home page rather than my products.

Can you try paste that info within the field that appears when clicking the ‘</>’ button on the forums? Any success?

I edited the initial post and copied the code from my module into the ‘</>’ like you recommended can you see it now ?? Or did i get the wrong end of the stick ?? Im still having the issue with the api request but it apears that opencarts native api dosnt support importing and exporting products i installed a extention module that should have added it however im still getting the same issue heres the coppy of my module if you have any pointers on where i could be going wrong it would be greatly appreciated thank you

  • { "name": "My workflow", "nodes": [ { "parameters": {}, "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ -500, -100 ], "id": "bd1c6e79-127d-46dd-9f60-57a82c1c66cb", "name": "When clicking ‘Test workflow’" }, { "parameters": { "url": "https://www.perfectlynaughty.co.uk/index.php?", "authentication": "genericCredentialType", "genericAuthType": "httpBasicAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "route=api/rest/", "value": "QlBbEPCMeMW3aAoeC6ivDLbgAUZRibXlIbZqMX6qfPkiKDzo7jvpMsbEBEJf0nKo7iQWtzQfGxG87piGsW6HmchrDEmQ7hQ3OsoilCFEHHQQf3Qguo6gg8T7" } ] }, "options": {} }, "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ -280, -100 ], "id": "86830404-d347-4bd1-8c8b-3a12c3f02e51", "name": "HTTP Request", "credentials": { "httpBasicAuth": { "id": "eeN0HjkJUtbZiMzo", "name": "Unnamed credential" } } } ], "pinData": {}, "connections": { "When clicking ‘Test workflow’": { "main": [ [ { "node": "HTTP Request", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1" }, "versionId": "d9fbe562-906e-44d2-868b-3937e8f26a5f", "meta": { "templateCredsSetupCompleted": true, "instanceId": "558d88703fb65b2d0e446a" }, "id": "4TxGHJVIdtBej21j", "tags": [] }

I was able to do it above by pasting it into the backticks. I removed half of your key.

In your previous messages, remove half of your key so no one can use it.

Otherwise it looks like you need to first make a login request to get a valid key to use with other endpoints, according to the docs:

https://docs.opencart.com/en-gb/system/users/api/

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