When running the flow and doing a POST request to the endpoint I get back:
“ERROR: Cannot create property ‘x-api-key’ on string ‘form-data; name=“image_file”; filename=Webbplats1_2023-08-12 15:13:05.png’”
TypeError: Cannot create property 'x-api-key' on string 'form-data; name="image_file"; filename=Webbplats1_2023-08-12 15:13:05.png'
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V2/HttpRequestV2.node.js:833:61)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:646:28)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:631:53
Information on your n8n setup
n8n version: 1.0.4
Database (default: SQLite): SQLite
n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
Hi @Profit_Media This sounds like you’re not sending over the API token correctly. Can you take another look at your authentication settings? (Please don’t post screenshots with those details here Or you’ll need to rotate all your keys! )
So I just signed up for an account to see if I could successfully make a request, and had no problems doing so with this workflow:
You might be using an older version of the HTTP Request node - Photoroom’s API suggests sending the binary data in the image_file field, which your version of the node won’t let you specify.
In a more recent version of the node, you can specify the Form Data, like so:
Which then gives you a successful request Can you try either using the workflow I posted as a base, or maybe remove the current HTTP node you have and re-add it through the node menu (instead of copying and pasting from an older workflow)? That might fix this up!