Connect to Odoo through HTTP Request

I’m trying to connect to Odoo using n8n, specifically via HTTP Request login/password, but something is not working, I would like to ask for help with this, I get the session id and csrf token using GET, but with POST it looks like it is not logging in correctly because it neither returns cookies nor redirects, even though I have set the redirect x times already, I am also sending the workflow(couldnt send it so showing GET and POST settings , maybe you will see where the error is or something similar



Output from http request post is kinda long so i dont wanna post it
body is just html login site

“headers”:
{
“server”:
“nginx/1.18.0 (Ubuntu)”,
“date”:
“Mon, 26 May 2025 17:15:56 GMT”,
“content-type”:
“text/html; charset=utf-8”,
“transfer-encoding”:
“chunked”,
“connection”:
“keep-alive”,
“x-frame-options”:
“SAMEORIGIN”,
“content-security-policy”:
“frame-ancestors ‘self’”
},
“statusCode”:
200,
“statusMessage”:
“OK”
}

Information on your n8n setup

  • n8n version: 1.91.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own):
  • Running n8n via (Docker, linux server):
  • Operating system:
1 Like

Hello,

So alot of the time, sites block scapers’ ‘user agents’, I would say check the terms and conditions, see if this is okay with doing it, they may even have a private API which they allow access to.

Others use some browser automation tools like Puppeteer.

Regards,

Samuel

Well, I would need n8n to log in as a user (user-agent) and theoretically everything looks good for it to work, but it doesn’t work, if anyone has a solution or something similar to do this, or even tools or a way to check why it doesn’t go through as it should, I would be very grateful.

1 Like

btw, I just helped on another post and they used https://account.browserless.io/

Hope this helps.

Samuel

Did it on my own with http req to self hosted playwright

Do you know there is already a odoo node that can perform following actions ?

Just curiout what kind of action you want to achieve here that API can not help you.

Like @King_Samuel_David said : performing browser automation is not an easy way.

It is if ure the owner of database that is hosted on odoo not if ure an user, if ure user this is useless cause u dont have info about db

The current Odoo node there is no way to call methods (e.g. confirm order).
I managed to achieve it using HTTP Request node:

POST https://your-odoo-instance.com/jsonrpc

{
  "jsonrpc": "2.0",
  "method": "call",
  "params": {
    "service": "object",
    "method": "execute_kw",
    "args": [
      "odoo_database_name",  
      17,     //  uid of your odoo user you want to login with
      "user_password",    
      "purchase.order",  // model
      "button_confirm",    // action or method
      [[ id_of_item ]]             
    ]
  },
  "id": 1
}

remove comments from body before running the node