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
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.
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.
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
}